[gnome-control-center] network: mark connection editor changed when editing IPv4/IPv6 pages
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: mark connection editor changed when editing IPv4/IPv6 pages
- Date: Thu, 14 Feb 2013 19:43:42 +0000 (UTC)
commit 510998041afa1310059a5123ea8cfbeb33f36c1d
Author: Dan Winship <danw gnome org>
Date: Wed Feb 13 15:14:24 2013 -0500
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
panels/network/connection-editor/ce-page-ip4.c | 11 +++++++++++
panels/network/connection-editor/ce-page-ip6.c | 11 +++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-ip4.c b/panels/network/connection-editor/ce-page-ip4.c
index e58ab06..2cd5cc2 100644
--- a/panels/network/connection-editor/ce-page-ip4.c
+++ b/panels/network/connection-editor/ce-page-ip4.c
@@ -85,6 +85,14 @@ method_changed (GtkComboBox *combo, CEPageIP4 *page)
}
static void
+switch_toggled (GObject *object,
+ GParamSpec *pspec,
+ CEPage *page)
+{
+ ce_page_changed (page);
+}
+
+static void
update_separator (GtkWidget **separator,
GtkWidget *child,
GtkWidget *before,
@@ -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;
diff --git a/panels/network/connection-editor/ce-page-ip6.c b/panels/network/connection-editor/ce-page-ip6.c
index 3a4fcd7..810a984 100644
--- a/panels/network/connection-editor/ce-page-ip6.c
+++ b/panels/network/connection-editor/ce-page-ip6.c
@@ -87,6 +87,14 @@ method_changed (GtkComboBox *combo, CEPageIP6 *page)
}
static void
+switch_toggled (GObject *object,
+ GParamSpec *pspec,
+ CEPage *page)
+{
+ ce_page_changed (page);
+}
+
+static void
update_separator (GtkWidget **separator,
GtkWidget *child,
GtkWidget *before,
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]