summaryrefslogtreecommitdiff
path: root/geyes/themes.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-24 18:20:32 +0100
committerStefano Karapetsas <[email protected]>2012-11-24 18:20:32 +0100
commit75d606567d8e4923e83a58ec8fce410bee89d473 (patch)
treedd6e3299b0e357bf9024ade99c5f8f83d6592af8 /geyes/themes.c
parent23536328cce34467f2a106662e2bb2c0d8507467 (diff)
downloadmate-applets-75d606567d8e4923e83a58ec8fce410bee89d473.tar.bz2
mate-applets-75d606567d8e4923e83a58ec8fce410bee89d473.tar.xz
geyes: migrate to gsettings
Diffstat (limited to 'geyes/themes.c')
-rw-r--r--geyes/themes.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/geyes/themes.c b/geyes/themes.c
index 7d08f1d1..6777cac4 100644
--- a/geyes/themes.c
+++ b/geyes/themes.c
@@ -23,8 +23,7 @@
#include <limits.h>
#include <ctype.h>
#include <gtk/gtk.h>
-#include <mateconf/mateconf-client.h>
-#include <mate-panel-applet-mateconf.h>
+#include <gio/gio.h>
#include "geyes.h"
#define NUM_THEME_DIRECTORIES 2
@@ -180,25 +179,6 @@ destroy_theme (EyesApplet *eyes_applet)
g_free (eyes_applet->theme_name);
}
-static gboolean
-key_writable (MatePanelApplet *applet, const char *key)
-{
- gboolean writable;
- char *fullkey;
- static MateConfClient *client = NULL;
-
- if (client == NULL)
- client = mateconf_client_get_default ();
-
- fullkey = mate_panel_applet_mateconf_get_full_key (applet, key);
-
- writable = mateconf_client_key_is_writable (client, fullkey, NULL);
-
- g_free (fullkey);
-
- return writable;
-}
-
static void
theme_selected_cb (GtkTreeSelection *selection, gpointer data)
{
@@ -227,8 +207,8 @@ theme_selected_cb (GtkTreeSelection *selection, gpointer data)
load_theme (eyes_applet, theme);
setup_eyes (eyes_applet);
- mate_panel_applet_mateconf_set_string (
- eyes_applet->applet, "theme_path", theme, NULL);
+ g_settings_set_string (
+ eyes_applet->settings, "theme-path", theme);
g_free (theme);
}
@@ -387,7 +367,7 @@ properties_cb (GtkAction *action,
G_CALLBACK (theme_selected_cb),
eyes_applet);
- if ( ! key_writable (eyes_applet->applet, "theme_path")) {
+ if ( ! g_settings_is_writable (eyes_applet->settings, "theme-path")) {
gtk_widget_set_sensitive (tree, FALSE);
gtk_widget_set_sensitive (label, FALSE);
}