gnome-power-manager r2815 - in trunk: . src



Author: rhughes
Date: Wed Jun  4 14:06:57 2008
New Revision: 2815
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=2815&view=rev

Log:
2008-06-04  Richard Hughes  <richard hughsie com>

* src/gpm-prefs-core.c: (pk_prefs_set_defaults_cb):
Matthias pointed out that we need to call gconf_client_suggest_sync() before calling into
the 'make settings default' service otherwise you push system-wide whatever is in the files
not your latest setting that is still in the gconf cache.


Modified:
   trunk/ChangeLog
   trunk/src/gpm-prefs-core.c

Modified: trunk/src/gpm-prefs-core.c
==============================================================================
--- trunk/src/gpm-prefs-core.c	(original)
+++ trunk/src/gpm-prefs-core.c	Wed Jun  4 14:06:57 2008
@@ -31,6 +31,7 @@
 #include <dbus/dbus-glib.h>
 #include <math.h>
 #include <string.h>
+#include <gconf/gconf-client.h>
 
 #include <libhal-gmanager.h>
 
@@ -999,6 +1000,10 @@
 		return;
 	}
 
+	GConfClient *client;
+	client = gconf_client_get_default ();
+	gconf_client_suggest_sync (client, NULL);
+	g_object_unref (client);
 	dbus_g_proxy_call (proxy, "SetSystem", &error,
 			   G_TYPE_STRV, keys,
 			   G_TYPE_STRV, NULL,



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