diff options
author | Stefano Karapetsas <[email protected]> | 2014-04-27 17:51:18 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-07-11 13:56:28 +0200 |
commit | 6a0ec4159139d0bb4fea0c11b790b4fc2ea774ab (patch) | |
tree | 6310f6a2a98090ecf5bdf5a9c947157c2f81e0ca /capplets/common | |
parent | 6cdaa33bf9057a66eb5da3147a03051444253d56 (diff) | |
download | mate-control-center-6a0ec4159139d0bb4fea0c11b790b4fc2ea774ab.tar.bz2 mate-control-center-6a0ec4159139d0bb4fea0c11b790b4fc2ea774ab.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')
-rw-r--r-- | capplets/common/mate-theme-info.c | 13 |
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); |