summaryrefslogtreecommitdiff
path: root/src/gpm-screensaver.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-03 16:02:16 -0700
committerStefano Karapetsas <[email protected]>2012-11-03 16:02:16 -0700
commit7fa7c26dce5c987539f70b323ae1ff9d40752b0b (patch)
tree1c65328c003c3a022d4c2c6aabb568b2252e6ca6 /src/gpm-screensaver.c
parent7c7b09026bde3ffd1ce886fd545e7bfa1e59aec7 (diff)
parent70aeb9c75a5eff23c16d6ce189e770dc22e8ff89 (diff)
downloadmate-power-manager-7fa7c26dce5c987539f70b323ae1ff9d40752b0b.tar.bz2
mate-power-manager-7fa7c26dce5c987539f70b323ae1ff9d40752b0b.tar.xz
Merge pull request #20 from bhull2010/master
Migrate screensaver setting to Gsettings and update panel requirements
Diffstat (limited to 'src/gpm-screensaver.c')
-rw-r--r--src/gpm-screensaver.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpm-screensaver.c b/src/gpm-screensaver.c
index 3856b3b..5d049dc 100644
--- a/src/gpm-screensaver.c
+++ b/src/gpm-screensaver.c
@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <dbus/dbus-glib.h>
-#include <mateconf/mateconf-client.h>
+#include <gio/gio.h>
#include "gpm-screensaver.h"
#include "gpm-common.h"
@@ -42,7 +42,7 @@ static void gpm_screensaver_finalize (GObject *object);
struct GpmScreensaverPrivate
{
DBusGProxy *proxy;
- MateConfClient *conf;
+ GSettings *settings;
};
enum {
@@ -137,7 +137,7 @@ gpm_screensaver_lock_enabled (GpmScreensaver *screensaver)
{
gboolean enabled;
g_return_val_if_fail (GPM_IS_SCREENSAVER (screensaver), FALSE);
- enabled = mateconf_client_get_bool (screensaver->priv->conf, GS_CONF_PREF_LOCK_ENABLED, NULL);
+ enabled = g_settings_get_boolean (screensaver->priv->settings, GS_SETTINGS_PREF_LOCK_ENABLED);
return enabled;
}
@@ -357,7 +357,7 @@ gpm_screensaver_init (GpmScreensaver *screensaver)
GS_LISTENER_SERVICE,
GS_LISTENER_PATH,
GS_LISTENER_INTERFACE);
- screensaver->priv->conf = mateconf_client_get_default ();
+ screensaver->priv->settings = g_settings_new (GS_SETTINGS_SCHEMA);
}
/**
@@ -374,7 +374,7 @@ gpm_screensaver_finalize (GObject *object)
screensaver = GPM_SCREENSAVER (object);
screensaver->priv = GPM_SCREENSAVER_GET_PRIVATE (screensaver);
- g_object_unref (screensaver->priv->conf);
+ g_object_unref (screensaver->priv->settings);
g_object_unref (screensaver->priv->proxy);
G_OBJECT_CLASS (gpm_screensaver_parent_class)->finalize (object);