diff options
Diffstat (limited to 'libwindow-settings/marco-window-manager.c')
-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);*/ |