aboutsummaryrefslogtreecommitdiff
path: root/src/gconf-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gconf-helper.c')
-rw-r--r--src/gconf-helper.c32
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) {