1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
$NetBSD: patch-aa,v 1.1.1.1 2003/06/01 11:38:16 jmmv Exp $
Patch obtained from gentoo: "metacity-setup doesn't really detect themes
properly". See bug #8822 on bugs.gentoo.org.
--- src/callbacks.c.orig 2002-10-05 12:36:03.000000000 -0500
+++ src/callbacks.c 2002-10-05 12:36:07.000000000 -0500
@@ -226,20 +226,20 @@
GDir *themeDirectory =
g_dir_open (possibleThemeDirs[i], 0, NULL);
- while ((filename =
- g_dir_read_name (themeDirectory)) != NULL)
- if (g_file_test
- (g_build_filename
- (possibleThemeDirs[i], filename, NULL),
- G_FILE_TEST_IS_DIR) &&
- (g_file_test
- (g_build_filename
- (possibleThemeDirs[i], filename, "metacity-theme-1.xml", NULL),
- G_FILE_TEST_IS_REGULAR)))
- {
- g_ptr_array_add (themeNameHolder,
- g_strdup (filename));
- }
+ while ((filename = g_dir_read_name (themeDirectory)) != NULL)
+ if (g_file_test (g_build_filename (possibleThemeDirs[i], filename, NULL), G_FILE_TEST_IS_DIR) &&
+ ((g_file_test (g_build_filename (possibleThemeDirs[i], filename, "metacity-theme-1.xml", NULL), G_FILE_TEST_IS_REGULAR))
+ /* new themes have metacity-theme-1.xml stored under a directory: metacity-1 */
+ ||(g_file_test (g_build_filename (possibleThemeDirs[i], filename, "metacity-1", NULL), G_FILE_TEST_IS_DIR)
+ && g_file_test (g_build_filename (possibleThemeDirs[i], filename, "metacity-1", "metacity-theme-1.xml",NULL),
+ G_FILE_TEST_IS_REGULAR)
+ )
+ )
+ )
+ {
+ g_ptr_array_add (themeNameHolder,
+ g_strdup (filename));
+ }
g_dir_close (themeDirectory);
}
}
@@ -690,4 +690,4 @@
else
metacity_version = "2.4";
on_treeview1_realize (treeview1_cheat, user_data);
-}
\ No newline at end of file
+}
|