[gnome-control-center] network: mark connection editor changed in a few more cases



commit 7bef593d71bb42e9c99a780093a526e2be0d6b98
Author: Kalev Lember <kalevlember gmail com>
Date:   Tue Apr 2 14:22:04 2013 +0200

    network: mark connection editor changed in a few more cases
    
    This makes sure the "Apply" button becomes sensitive when clicking on
    "Connect automatically" or "Make availabe to other users".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=697098

 .../network/connection-editor/ce-page-ethernet.c   |    3 +++
 panels/network/connection-editor/ce-page-wifi.c    |    4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-ethernet.c 
b/panels/network/connection-editor/ce-page-ethernet.c
index b4ebe17..50392b5 100644
--- a/panels/network/connection-editor/ce-page-ethernet.c
+++ b/panels/network/connection-editor/ce-page-ethernet.c
@@ -106,12 +106,15 @@ connect_ethernet_page (CEPageEthernet *page)
         g_object_bind_property (sc, "autoconnect",
                                 widget, "active",
                                 G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+        g_signal_connect_swapped (widget, "toggled", G_CALLBACK (ce_page_changed), page);
+
         widget = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder,
                                                      "all_user_check"));
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
                                       nm_setting_connection_get_num_permissions (sc) == 0);
         g_signal_connect (widget, "toggled",
                           G_CALLBACK (all_user_changed), page);
+        g_signal_connect_swapped (widget, "toggled", G_CALLBACK (ce_page_changed), page);
 
         widget = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder, "combo_zone"));
         firewall_ui_setup (sc, widget, CE_PAGE (page)->cancellable);
diff --git a/panels/network/connection-editor/ce-page-wifi.c b/panels/network/connection-editor/ce-page-wifi.c
index 6a19832..db4fc5b 100644
--- a/panels/network/connection-editor/ce-page-wifi.c
+++ b/panels/network/connection-editor/ce-page-wifi.c
@@ -118,13 +118,15 @@ connect_wifi_page (CEPageWifi *page)
         g_object_bind_property (sc, "autoconnect",
                                 widget, "active",
                                 G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+        g_signal_connect_swapped (widget, "toggled", G_CALLBACK (ce_page_changed), page);
+
         widget = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder,
                                                      "all_user_check"));
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
                                       nm_setting_connection_get_num_permissions (sc) == 0);
-
         g_signal_connect (widget, "toggled",
                           G_CALLBACK (all_user_changed), page);
+        g_signal_connect_swapped (widget, "toggled", G_CALLBACK (ce_page_changed), page);
 
         widget = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder, "combo_zone"));
         firewall_ui_setup (sc, widget, CE_PAGE (page)->cancellable);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]