summaryrefslogtreecommitdiff
path: root/capplets/common
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-02-26 16:29:26 +0100
committerStefano Karapetsas <[email protected]>2014-02-26 16:29:26 +0100
commit60c59865de73a524d2a341696c49277f507bf7eb (patch)
tree2b51e71f16a395156f2a06b4ee173c1b783532e2 /capplets/common
parent913a00b7708f8d5e28219212c2cc0992a90ebc97 (diff)
downloadmate-control-center-60c59865de73a524d2a341696c49277f507bf7eb.tar.bz2
mate-control-center-60c59865de73a524d2a341696c49277f507bf7eb.tar.xz
Use directly GSettings to set marco theme, avoiding libwindow-settings
Closes https://github.com/mate-desktop/mate-control-center/issues/44
Diffstat (limited to 'capplets/common')
-rw-r--r--capplets/common/mate-theme-apply.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/capplets/common/mate-theme-apply.c b/capplets/common/mate-theme-apply.c
index bd6d6caa..4489b302 100644
--- a/capplets/common/mate-theme-apply.c
+++ b/capplets/common/mate-theme-apply.c
@@ -23,7 +23,6 @@
#include <string.h>
#include <gio/gio.h>
-#include <mate-wm-manager.h>
#include "mate-theme-apply.h"
#include "gtkrc-utils.h"
@@ -33,6 +32,9 @@
#define ICON_THEME_KEY "icon-theme"
#define FONT_KEY "font-name"
+#define MARCO_SCHEMA "org.mate.Marco.general"
+#define MARCO_THEME_KEY "theme"
+
#define MOUSE_SCHEMA "org.mate.peripherals-mouse"
#define CURSOR_FONT_KEY "cursor-font"
#define CURSOR_THEME_KEY "cursor-theme"
@@ -47,6 +49,7 @@ void
mate_meta_theme_set (MateThemeMetaInfo *meta_theme_info)
{
GSettings *interface_settings;
+ GSettings *marco_settings;
GSettings *mouse_settings;
GSettings *notification_settings = NULL;
const char * const *schemas;
@@ -54,14 +57,9 @@ mate_meta_theme_set (MateThemeMetaInfo *meta_theme_info)
gint i;
gchar *old_key;
gint old_key_int;
- MateWindowManager *window_manager;
- MateWMSettings wm_settings;
-
- mate_wm_manager_init ();
-
- window_manager = mate_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
interface_settings = g_settings_new (INTERFACE_SCHEMA);
+ marco_settings = g_settings_new (MARCO_SCHEMA);
mouse_settings = g_settings_new (MOUSE_SCHEMA);
/* We need this because mate-control-center does not depend on mate-notification-daemon,
@@ -112,10 +110,7 @@ mate_meta_theme_set (MateThemeMetaInfo *meta_theme_info)
g_free (old_key);
/* Set the wm key */
- wm_settings.flags = MATE_WM_SETTING_THEME;
- wm_settings.theme = meta_theme_info->marco_theme_name;
- if (window_manager)
- mate_window_manager_change_settings (window_manager, &wm_settings);
+ g_settings_set_string (marco_settings, MARCO_THEME_KEY, meta_theme_info->marco_theme_name);
/* set the icon theme */
old_key = g_settings_get_string (interface_settings, ICON_THEME_KEY);
@@ -162,6 +157,7 @@ mate_meta_theme_set (MateThemeMetaInfo *meta_theme_info)
g_free (old_key);
g_object_unref (interface_settings);
+ g_object_unref (marco_settings);
g_object_unref (mouse_settings);
if (notification_settings != NULL)
g_object_unref (notification_settings);