Commit 78b7101d authored by Dan Williams's avatar Dan Williams
Browse files

editor: use duplicated connection, not original

Otherwise the original gets modified, which isn't what we want until
the use hits the Apply button.
parent 5a64e17a
......@@ -580,44 +580,44 @@ nm_connection_editor_set_connection (NMConnectionEditor *editor,
connection_type = nm_setting_connection_get_connection_type (s_con);
if (!strcmp (connection_type, NM_SETTING_WIRED_SETTING_NAME)) {
if (!add_page (editor, ce_page_wired_new, connection, error))
if (!add_page (editor, ce_page_wired_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_wired_security_new, connection, error))
if (!add_page (editor, ce_page_wired_security_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_ip4_new, connection, error))
if (!add_page (editor, ce_page_ip4_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_ip6_new, connection, error))
if (!add_page (editor, ce_page_ip6_new, editor->connection, error))
goto out;
} else if (!strcmp (connection_type, NM_SETTING_WIRELESS_SETTING_NAME)) {
if (!add_page (editor, ce_page_wireless_new, connection, error))
if (!add_page (editor, ce_page_wireless_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_wireless_security_new, connection, error))
if (!add_page (editor, ce_page_wireless_security_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_ip4_new, connection, error))
if (!add_page (editor, ce_page_ip4_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_ip6_new, connection, error))
if (!add_page (editor, ce_page_ip6_new, editor->connection, error))
goto out;
} else if (!strcmp (connection_type, NM_SETTING_VPN_SETTING_NAME)) {
if (!add_page (editor, ce_page_vpn_new, connection, error))
if (!add_page (editor, ce_page_vpn_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_ip4_new, connection, error))
if (!add_page (editor, ce_page_ip4_new, editor->connection, error))
goto out;
} else if (!strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME)) {
if (!add_page (editor, ce_page_dsl_new, connection, error))
if (!add_page (editor, ce_page_dsl_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_wired_new, connection, error))
if (!add_page (editor, ce_page_wired_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_ppp_new, connection, error))
if (!add_page (editor, ce_page_ppp_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_ip4_new, connection, error))
if (!add_page (editor, ce_page_ip4_new, editor->connection, error))
goto out;
} else if (!strcmp (connection_type, NM_SETTING_GSM_SETTING_NAME) ||
!strcmp (connection_type, NM_SETTING_CDMA_SETTING_NAME)) {
if (!add_page (editor, ce_page_mobile_new, connection, error))
if (!add_page (editor, ce_page_mobile_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_ppp_new, connection, error))
if (!add_page (editor, ce_page_ppp_new, editor->connection, error))
goto out;
if (!add_page (editor, ce_page_ip4_new, connection, error))
if (!add_page (editor, ce_page_ip4_new, editor->connection, error))
goto out;
} else {
g_warning ("Unhandled setting type '%s'", connection_type);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment