diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-08-19 12:50:36 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-08-19 12:50:36 +0100 |
commit | 0fe1ffdfdf9c06af2b6dad36e7472e6dd5c18a7f (patch) | |
tree | 2468188ef4c72faa508302e535b27b1d338cf054 | |
parent | 54d0bd428fb93559f34c298ff4926102bcd98467 (diff) | |
download | ayatana-indicator-session-0fe1ffdfdf9c06af2b6dad36e7472e6dd5c18a7f.tar.gz ayatana-indicator-session-0fe1ffdfdf9c06af2b6dad36e7472e6dd5c18a7f.tar.bz2 ayatana-indicator-session-0fe1ffdfdf9c06af2b6dad36e7472e6dd5c18a7f.zip |
the beginnings of using gsettings in the gconf helper
-rw-r--r-- | src/gconf-helper.c | 10 |
1 files 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 <http://www.gnu.org/licenses/>. */ - +#include <gio/gio.h> #include <gconf/gconf-client.h> #include <glib/gi18n.h> @@ -34,6 +34,8 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #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 |