summaryrefslogtreecommitdiff
path: root/capplets/common/mate-theme-info.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-04-27 17:51:18 +0200
committerStefano Karapetsas <[email protected]>2014-04-27 17:51:18 +0200
commit6b04f6e280bbdc5deaed82412e8c5f352cd96846 (patch)
tree934f9ca25c02b9b8a7d4e40ff6c81e15ea78772c /capplets/common/mate-theme-info.c
parentb4ff6c7fafc624f1db379675f36889ac70edef8e (diff)
downloadmate-control-center-6b04f6e280bbdc5deaed82412e8c5f352cd96846.tar.bz2
mate-control-center-6b04f6e280bbdc5deaed82412e8c5f352cd96846.tar.xz
Add support for metacity-theme-2.xml
Closes https://github.com/mate-desktop/mate-control-center/issues/92
Diffstat (limited to 'capplets/common/mate-theme-info.c')
-rw-r--r--capplets/common/mate-theme-info.c13
1 files changed, 10 insertions, 3 deletions
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);