[gnome-control-center] network: Don't leak the remote settings



commit 6f916b00b9b9882c952f962fb970cdbf41f69947
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 15 16:33:01 2011 -0400

    network: Don't leak the remote settings
    
    Instead, we keep it around; it will be useful later on.

 panels/network/cc-network-panel.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 713a9d9..4363972 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -54,13 +54,14 @@ G_DEFINE_DYNAMIC_TYPE (CcNetworkPanel, cc_network_panel, CC_TYPE_PANEL)
 
 struct _CcNetworkPanelPrivate
 {
-        GCancellable    *cancellable;
-        gchar           *current_device;
-        GPtrArray       *devices;
-        GSettings       *proxy_settings;
-        GtkBuilder      *builder;
-        NMClient        *client;
-        gboolean         updating_device;
+        GCancellable     *cancellable;
+        gchar            *current_device;
+        GPtrArray        *devices;
+        GSettings        *proxy_settings;
+        GtkBuilder       *builder;
+        NMClient         *client;
+        NMRemoteSettings *remote_settings;
+        gboolean          updating_device;
 };
 
 enum {
@@ -1522,7 +1523,6 @@ cc_network_panel_init (CcNetworkPanel *panel)
         GtkTreeSelection *selection;
         GtkTreeSortable *sortable;
         GtkWidget *widget;
-        NMRemoteSettings *remote_settings;
 
         panel->priv = NETWORK_PANEL_PRIVATE (panel);
 
@@ -1710,8 +1710,8 @@ cc_network_panel_init (CcNetworkPanel *panel)
                            error->message);
                 g_error_free (error);
         }
-        remote_settings = nm_remote_settings_new (bus);
-        g_signal_connect (remote_settings, NM_REMOTE_SETTINGS_CONNECTIONS_READ,
+        panel->priv->remote_settings = nm_remote_settings_new (bus);
+        g_signal_connect (panel->priv->remote_settings, NM_REMOTE_SETTINGS_CONNECTIONS_READ,
                           G_CALLBACK (notify_connections_read_cb), panel);
 
         /* is the user compiling against a new version, but running an



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