gnome-bluetooth r589 - trunk/applet



Author: hadess
Date: Thu Apr  9 00:26:32 2009
New Revision: 589
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=589&view=rev

Log:
Show the applet by default, even if the GConf schema isn't installed properly


Modified:
   trunk/applet/main.c

Modified: trunk/applet/main.c
==============================================================================
--- trunk/applet/main.c	(original)
+++ trunk/applet/main.c	Thu Apr  9 00:26:32 2009
@@ -703,6 +703,7 @@
 	UniqueApp *app;
 	GtkStatusIcon *statusicon;
 	GtkWidget *menu;
+	GConfValue *value;
 	GError *error = NULL;
 
 	bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
@@ -756,7 +757,13 @@
 
 	gconf = gconf_client_get_default();
 
-	show_icon_pref = gconf_client_get_bool(gconf, PREF_SHOW_ICON, NULL);
+	value = gconf_client_get (gconf, PREF_SHOW_ICON, NULL);
+	if (value == NULL) {
+		show_icon_pref = TRUE;
+	} else {
+		show_icon_pref = gconf_value_get_bool (value);
+		gconf_value_free (value);
+	}
 
 	gconf_client_add_dir(gconf, PREF_DIR, GCONF_CLIENT_PRELOAD_NONE, NULL);
 



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