summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wimpress <[email protected]>2017-03-28 14:01:46 +0100
committerMartin Wimpress <[email protected]>2017-03-28 14:01:46 +0100
commit3d1ce6544c43331dc9a2435b5dea39e5b3a7a8ba (patch)
tree2bbbbd35b4b9f73fead2b43bcd90711245603fc7
parent5473271cbd179ad7f910b2b2cdef051bdebef9f2 (diff)
downloadmate-control-center-3d1ce6544c43331dc9a2435b5dea39e5b3a7a8ba.tar.bz2
mate-control-center-3d1ce6544c43331dc9a2435b5dea39e5b3a7a8ba.tar.xz
Add support for switching themes on Metacity >= 3.20.
-rw-r--r--capplets/appearance/appearance-support.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/capplets/appearance/appearance-support.c b/capplets/appearance/appearance-support.c
index 35e4f263..4f46ed97 100644
--- a/capplets/appearance/appearance-support.c
+++ b/capplets/appearance/appearance-support.c
@@ -77,7 +77,7 @@ metacity_theme_apply(const gchar *theme, const gchar *font)
{
gchar *gsettings_cmd = NULL;
- /* for metacity <= 3.12 */
+ /* for GNOME3 */
gsettings_cmd = g_strdup_printf("gsettings set org.gnome.desktop.wm.preferences theme '%s'", theme);
g_spawn_command_line_async (gsettings_cmd, NULL);
g_free (gsettings_cmd);
@@ -90,6 +90,11 @@ metacity_theme_apply(const gchar *theme, const gchar *font)
gsettings_cmd = g_strdup_printf("gsettings set org.gnome.metacity theme '%s'", theme);
g_spawn_command_line_async (gsettings_cmd, NULL);
g_free (gsettings_cmd);
+
+ /* for metacity >= 3.20 */
+ gsettings_cmd = g_strdup_printf("gsettings set org.gnome.metacity.theme name '%s'", theme);
+ g_spawn_command_line_async (gsettings_cmd, NULL);
+ g_free (gsettings_cmd);
}
}