diff options
author | Ted Gould <ted@gould.cx> | 2011-08-19 11:06:40 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-08-19 11:06:40 -0500 |
commit | 1290c1032eea7ce2f8bdd28e3bebf618b47216ca (patch) | |
tree | 1c20858cfb15c0cb4980eecc222431c09e4922e8 /src/gconf-helper.c | |
parent | 0fe1ffdfdf9c06af2b6dad36e7472e6dd5c18a7f (diff) | |
download | ayatana-indicator-session-1290c1032eea7ce2f8bdd28e3bebf618b47216ca.tar.gz ayatana-indicator-session-1290c1032eea7ce2f8bdd28e3bebf618b47216ca.tar.bz2 ayatana-indicator-session-1290c1032eea7ce2f8bdd28e3bebf618b47216ca.zip |
Fix getting of all the keys to be settings functions
Diffstat (limited to 'src/gconf-helper.c')
-rw-r--r-- | src/gconf-helper.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/gconf-helper.c b/src/gconf-helper.c index 3bd254a..f9e73ad 100644 --- a/src/gconf-helper.c +++ b/src/gconf-helper.c @@ -41,36 +41,36 @@ static guint logout_notify = 0; static guint restart_notify = 0; static guint shutdown_notify = 0; -gboolean -supress_confirmations (void) { +static void +build_settings (void) { if(!settings) { - settings = g_settings_new ("com.canonical.indicators.sound"); + settings = g_settings_new (SESSION_SCHEMA); } - return g_settings_get_boolean (settings, SUPPRESS_KEY, NULL) ; + return; +} + +gboolean +supress_confirmations (void) { + build_settings(); + return g_settings_get_boolean (settings, SUPPRESS_KEY) ; } gboolean show_logout (void) { - if(!gconf_client) { - gconf_client = gconf_client_get_default (); - } - return !gconf_client_get_bool (gconf_client, LOGOUT_KEY, NULL) ; + build_settings(); + return !g_settings_get_boolean (settings, LOGOUT_KEY) ; } gboolean show_restart (void) { - if(!gconf_client) { - gconf_client = gconf_client_get_default (); - } - return !gconf_client_get_bool (gconf_client, RESTART_KEY, NULL) ; + build_settings(); + return !g_settings_get_boolean (settings, RESTART_KEY) ; } gboolean show_shutdown (void) { - if(!gconf_client) { - gconf_client = gconf_client_get_default (); - } - return !gconf_client_get_bool (gconf_client, SHUTDOWN_KEY, NULL) ; + build_settings(); + return !g_settings_get_boolean (settings, SHUTDOWN_KEY) ; } static void update_menu_entries_callback (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer data) { |