summaryrefslogtreecommitdiff
path: root/capplets/appearance/theme-save.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-10-23 19:03:44 +0200
committerStefano Karapetsas <[email protected]>2012-10-23 19:03:44 +0200
commitb3e27b1d6a0f11c5835f5829bac3861e2147b17e (patch)
treea74502d15d303f26fb2bc87f9ab4fb741a1a727a /capplets/appearance/theme-save.c
parent46787e474859801435542191480e2851f7fd870c (diff)
downloadmate-control-center-b3e27b1d6a0f11c5835f5829bac3861e2147b17e.tar.bz2
mate-control-center-b3e27b1d6a0f11c5835f5829bac3861e2147b17e.tar.xz
migrate appearance applet to gsettings
Diffstat (limited to 'capplets/appearance/theme-save.c')
-rw-r--r--capplets/appearance/theme-save.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/capplets/appearance/theme-save.c b/capplets/appearance/theme-save.c
index f4981468..fa90a2b0 100644
--- a/capplets/appearance/theme-save.c
+++ b/capplets/appearance/theme-save.c
@@ -23,6 +23,7 @@
#include <glib/gstdio.h>
#include <glib/gi18n.h>
+#include <gio/gio.h>
#include <string.h>
#include "theme-save.h"
@@ -182,7 +183,7 @@ write_theme_to_disk (MateThemeMetaInfo *theme_info,
gchar* str;
gchar* current_background;
- MateConfClient* client;
+ GSettings* settings;
const gchar* theme_header = ""
"[Desktop Entry]\n"
"Name=%s\n"
@@ -243,8 +244,8 @@ write_theme_to_disk (MateThemeMetaInfo *theme_info,
}
if (save_background) {
- client = mateconf_client_get_default ();
- current_background = mateconf_client_get_string (client, BACKGROUND_KEY, NULL);
+ settings = g_settings_new (WP_SCHEMA);
+ current_background = g_settings_get_string (settings, WP_FILE_KEY);
if (current_background != NULL) {
str = g_strdup_printf ("BackgroundImage=%s\n", current_background);
@@ -254,7 +255,7 @@ write_theme_to_disk (MateThemeMetaInfo *theme_info,
g_free (current_background);
g_free (str);
}
- g_object_unref (client);
+ g_object_unref (settings);
}
g_file_move (tmp_file, target_file, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, NULL);