From 6b04f6e280bbdc5deaed82412e8c5f352cd96846 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Sun, 27 Apr 2014 17:51:18 +0200 Subject: Add support for metacity-theme-2.xml Closes https://github.com/mate-desktop/mate-control-center/issues/92 --- capplets/common/mate-theme-info.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'capplets/common') diff --git a/capplets/common/mate-theme-info.c b/capplets/common/mate-theme-info.c index c73a3d5d..4da1ab4f 100644 --- a/capplets/common/mate-theme-info.c +++ b/capplets/common/mate-theme-info.c @@ -1062,8 +1062,8 @@ marco_dir_changed (GFileMonitor *monitor, affected_file = g_file_get_basename (file); - /* The only file we care about is marco-theme-1.xml */ - if (!strcmp (affected_file, "metacity-theme-1.xml")) { + /* The only file we care about is metacity-theme-(1|2).xml */ + if (!strcmp (affected_file, "metacity-theme-1.xml") || !strcmp (affected_file, "metacity-theme-2.xml")) { update_marco_index (file, monitor_data->priority); } @@ -1180,10 +1180,17 @@ add_common_theme_dir_monitor (GFile *theme_dir_uri, /* marco theme subdir */ subdir = g_file_get_child (theme_dir_uri, "metacity-1"); - uri = g_file_get_child (subdir, "metacity-theme-1.xml"); + uri = g_file_get_child (subdir, "metacity-theme-2.xml"); if (g_file_query_exists (uri, NULL)) { update_marco_index (uri, monitor_data->priority); } + else { + g_object_unref (uri); + uri = g_file_get_child (subdir, "metacity-theme-1.xml"); + if (g_file_query_exists (uri, NULL)) { + update_marco_index (uri, monitor_data->priority); + } + } g_object_unref (uri); monitor = g_file_monitor_directory (subdir, G_FILE_MONITOR_NONE, NULL, NULL); -- cgit v1.2.1