summaryrefslogtreecommitdiff
path: root/src/daemon/engines.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-08-03 12:26:32 +0200
committerStefano Karapetsas <[email protected]>2012-08-03 12:26:32 +0200
commit2d7e34441f4d33dc1edb5e9871b66b4977069bae (patch)
treeba425475d77dcca3c86c22b13db0b44ba4912bd9 /src/daemon/engines.c
parent597a9064e4d2df85d53726928e576a9be53d22fb (diff)
downloadmate-notification-daemon-2d7e34441f4d33dc1edb5e9871b66b4977069bae.tar.bz2
mate-notification-daemon-2d7e34441f4d33dc1edb5e9871b66b4977069bae.tar.xz
migrate to GSettings
Diffstat (limited to 'src/daemon/engines.c')
-rw-r--r--src/daemon/engines.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/daemon/engines.c b/src/daemon/engines.c
index 6d30f94..23a2ade 100644
--- a/src/daemon/engines.c
+++ b/src/daemon/engines.c
@@ -23,7 +23,6 @@
#include "config.h"
-#include <mateconf/mateconf-client.h>
#include "daemon.h"
#include "engines.h"
@@ -155,7 +154,7 @@ static void theme_engine_unref(ThemeEngine* engine)
}
}
-static void theme_changed_cb(MateConfClient* client, guint cnxn_id, MateConfEntry* entry, gpointer user_data)
+static void theme_changed_cb(GSettings *settings, gchar *key, gpointer user_data)
{
if (active_engine == NULL)
{
@@ -172,16 +171,14 @@ static ThemeEngine* get_theme_engine(void)
{
if (active_engine == NULL)
{
- MateConfClient* client = mateconf_client_get_default();
- char* enginename = mateconf_client_get_string(client, MATECONF_KEY_THEME, NULL);
+ GSettings* gsettings = g_settings_new (GSETTINGS_SCHEMA);
+ char* enginename = g_settings_get_string(gsettings, GSETTINGS_KEY_THEME);
if (theme_prop_notify_id == 0)
{
- theme_prop_notify_id = mateconf_client_notify_add(client, MATECONF_KEY_THEME, theme_changed_cb, NULL, NULL, NULL);
+ theme_prop_notify_id = g_signal_connect (gsettings, "changed::" GSETTINGS_KEY_THEME, G_CALLBACK (theme_changed_cb), NULL);
}
- g_object_unref(client);
-
if (enginename == NULL)
{
active_engine = load_theme_engine("standard");