summaryrefslogtreecommitdiff
path: root/libwindow-settings
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 /libwindow-settings
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 'libwindow-settings')
-rw-r--r--libwindow-settings/marco-window-manager.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/libwindow-settings/marco-window-manager.c b/libwindow-settings/marco-window-manager.c
index 2492eb99..5ce68dfb 100644
--- a/libwindow-settings/marco-window-manager.c
+++ b/libwindow-settings/marco-window-manager.c
@@ -121,18 +121,33 @@ add_themes_from_dir (GList *current_list, const char *path)
return current_list;
for (entry = readdir (theme_dir); entry != NULL; entry = readdir (theme_dir)) {
- theme_file_path = g_build_filename (path, entry->d_name, "metacity-1/metacity-theme-1.xml", NULL);
+ theme_file_path = g_build_filename (path, entry->d_name, "metacity-1/metacity-theme-2.xml", NULL);
if (g_file_test (theme_file_path, G_FILE_TEST_EXISTS)) {
for (node = current_list; (node != NULL) && (!found); node = node->next) {
found = (strcmp (node->data, entry->d_name) == 0);
}
-
+
if (!found) {
current_list = g_list_prepend (current_list, g_strdup (entry->d_name));
}
}
+ else {
+ g_free (theme_file_path);
+ theme_file_path = g_build_filename (path, entry->d_name, "metacity-1/metacity-theme-1.xml", NULL);
+
+ if (g_file_test (theme_file_path, G_FILE_TEST_EXISTS)) {
+
+ for (node = current_list; (node != NULL) && (!found); node = node->next) {
+ found = (strcmp (node->data, entry->d_name) == 0);
+ }
+
+ if (!found) {
+ current_list = g_list_prepend (current_list, g_strdup (entry->d_name));
+ }
+ }
+ }
found = FALSE;
/*g_free (entry);*/