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 /libwindow-settings | |
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 'libwindow-settings')
-rw-r--r-- | libwindow-settings/marco-window-manager.c | 19 |
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);*/ |