summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--capplets/appearance/theme-installer.c7
-rw-r--r--capplets/common/mate-theme-info.c13
-rw-r--r--libwindow-settings/marco-window-manager.c19
3 files changed, 34 insertions, 5 deletions
diff --git a/capplets/appearance/theme-installer.c b/capplets/appearance/theme-installer.c
index 8ce0c565..23c94f99 100644
--- a/capplets/appearance/theme-installer.c
+++ b/capplets/appearance/theme-installer.c
@@ -128,6 +128,13 @@ file_theme_type (const gchar *dir)
if (exists)
return THEME_GTK;
+ filename = g_build_filename (dir, "metacity-1", "metacity-theme-2.xml", NULL);
+ exists = g_file_test (filename, G_FILE_TEST_IS_REGULAR);
+ g_free (filename);
+
+ if (exists)
+ return THEME_MARCO;
+
filename = g_build_filename (dir, "metacity-1", "metacity-theme-1.xml", NULL);
exists = g_file_test (filename, G_FILE_TEST_IS_REGULAR);
g_free (filename);
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);
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);*/