From 0fe1ffdfdf9c06af2b6dad36e7472e6dd5c18a7f Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 19 Aug 2011 12:50:36 +0100 Subject: the beginnings of using gsettings in the gconf helper --- src/gconf-helper.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gconf-helper.c b/src/gconf-helper.c index 93ae96f..3bd254a 100644 --- a/src/gconf-helper.c +++ b/src/gconf-helper.c @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - +#include #include #include @@ -34,6 +34,8 @@ with this program. If not, see . #include "gconf-helper.h" static GConfClient * gconf_client = NULL; +static GSettings* settings = NULL; + static guint confirmation_notify = 0; static guint logout_notify = 0; static guint restart_notify = 0; @@ -41,10 +43,10 @@ static guint shutdown_notify = 0; gboolean supress_confirmations (void) { - if(!gconf_client) { - gconf_client = gconf_client_get_default (); + if(!settings) { + settings = g_settings_new ("com.canonical.indicators.sound"); } - return gconf_client_get_bool (gconf_client, SUPPRESS_KEY, NULL) ; + return g_settings_get_boolean (settings, SUPPRESS_KEY, NULL) ; } gboolean -- cgit v1.2.3