[network-manager-applet] applet: preload applet GConf preferences directories (bgo #578546)



commit 129f4735d60bfc5327ea634c6249a33a710b254e
Author: Behdad Esfahbod <behdad gnome org>
Date:   Wed Sep 22 20:37:28 2010 -0500

    applet: preload applet GConf preferences directories (bgo #578546)

 src/applet.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index d1d9b06..30ea876 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -3017,6 +3017,12 @@ constructor (GType type,
 	if (!applet->gconf_client)
 		goto error;
 
+	/* Note that we don't care about change notifications for prefs values... */
+	gconf_client_add_dir (applet->gconf_client,
+	                      APPLET_PREFS_PATH,
+	                      GCONF_CLIENT_PRELOAD_ONELEVEL,
+	                      NULL);
+
 	/* Load pixmaps and create applet widgets */
 	if (!setup_widgets (applet))
 		goto error;
@@ -3116,8 +3122,12 @@ static void finalize (GObject *object)
 	if (applet->info_dialog_xml)
 		g_object_unref (applet->info_dialog_xml);
 
-	if (applet->gconf_client)
+	if (applet->gconf_client) {
+		gconf_client_remove_dir (applet->gconf_client,
+		                         APPLET_PREFS_PATH,
+		                         NULL);
 		g_object_unref (applet->gconf_client);
+	}
 
 	if (applet->status_icon)
 		g_object_unref (applet->status_icon);



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