Commit 51099804 authored by Dan Winship's avatar Dan Winship

network: mark connection editor changed when editing IPv4/IPv6 pages

When this got rewritten to be different from nm-connection-editor's,
some of the ce_page_changed() calls accidentally got dropped, so
certain changes on these pages would not cause the "Apply" button to
become sensitive.

https://bugzilla.gnome.org/show_bug.cgi?id=693659
parent 9b15b77a
......@@ -84,6 +84,14 @@ method_changed (GtkComboBox *combo, CEPageIP4 *page)
ce_page_changed (CE_PAGE (page));
}
static void
switch_toggled (GObject *object,
GParamSpec *pspec,
CEPage *page)
{
ce_page_changed (page);
}
static void
update_separator (GtkWidget **separator,
GtkWidget *child,
......@@ -397,6 +405,7 @@ add_dns_section (CEPageIP4 *page)
gtk_container_add (GTK_CONTAINER (frame), list);
page->auto_dns = GTK_SWITCH (gtk_builder_get_object (CE_PAGE (page)->builder, "auto_dns_switch"));
gtk_switch_set_active (page->auto_dns, !nm_setting_ip4_config_get_ignore_auto_dns (page->setting));
g_signal_connect (page->auto_dns, "notify::active", switch_toggled, page);
add_section_toolbar (page, widget, G_CALLBACK (add_empty_dns_row));
......@@ -535,6 +544,7 @@ add_routes_section (CEPageIP4 *page)
gtk_container_add (GTK_CONTAINER (frame), list);
page->auto_routes = GTK_SWITCH (gtk_builder_get_object (CE_PAGE (page)->builder, "auto_routes_switch"));
gtk_switch_set_active (page->auto_routes, !nm_setting_ip4_config_get_ignore_auto_routes (page->setting));
g_signal_connect (page->auto_routes, "notify::active", switch_toggled, page);
add_section_toolbar (page, widget, G_CALLBACK (add_empty_route_row));
......@@ -588,6 +598,7 @@ connect_ip4_page (CEPageIP4 *page)
add_routes_section (page);
page->enabled = GTK_SWITCH (gtk_builder_get_object (CE_PAGE (page)->builder, "switch_enable"));
g_signal_connect (page->enabled, "notify::active", switch_toggled, page);
str_method = nm_setting_ip4_config_get_method (page->setting);
disabled = g_strcmp0 (str_method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0;
......
......@@ -86,6 +86,14 @@ method_changed (GtkComboBox *combo, CEPageIP6 *page)
ce_page_changed (CE_PAGE (page));
}
static void
switch_toggled (GObject *object,
GParamSpec *pspec,
CEPage *page)
{
ce_page_changed (page);
}
static void
update_separator (GtkWidget **separator,
GtkWidget *child,
......@@ -401,6 +409,7 @@ add_dns_section (CEPageIP6 *page)
gtk_container_add (GTK_CONTAINER (frame), list);
page->auto_dns = GTK_SWITCH (gtk_builder_get_object (CE_PAGE (page)->builder, "auto_dns_switch"));
gtk_switch_set_active (page->auto_dns, !nm_setting_ip6_config_get_ignore_auto_dns (page->setting));
g_signal_connect (page->auto_dns, "notify::active", switch_toggled, page);
add_section_toolbar (page, widget, G_CALLBACK (add_empty_dns_row));
......@@ -543,6 +552,7 @@ add_routes_section (CEPageIP6 *page)
gtk_container_add (GTK_CONTAINER (frame), list);
page->auto_routes = GTK_SWITCH (gtk_builder_get_object (CE_PAGE (page)->builder, "auto_routes_switch"));
gtk_switch_set_active (page->auto_routes, !nm_setting_ip6_config_get_ignore_auto_routes (page->setting));
g_signal_connect (page->auto_routes, "notify::active", switch_toggled, page);
add_section_toolbar (page, widget, G_CALLBACK (add_empty_route_row));
......@@ -586,6 +596,7 @@ connect_ip6_page (CEPageIP6 *page)
add_routes_section (page);
page->enabled = GTK_SWITCH (gtk_builder_get_object (CE_PAGE (page)->builder, "switch_enable"));
g_signal_connect (page->enabled, "notify::active", switch_toggled, page);
str_method = nm_setting_ip6_config_get_method (page->setting);
disabled = g_strcmp0 (str_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0;
......
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