summaryrefslogtreecommitdiffstats
path: root/meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@intel.com>2010-11-22 13:57:13 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-11-22 13:57:13 +0000
commitcfe12efb5ec9586dab6961f141d52b103bd8b1d1 (patch)
tree7108e22aa7ddf6cfc2f1b6c6b73a811187706ecb /meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch
parent762fd6b7b3b22d7a8cb80ef9e9ba62e7ef21af3e (diff)
downloadpoky-cfe12efb5ec9586dab6961f141d52b103bd8b1d1.tar.gz
Meta: Recipe Reogranization
This is the next stage of recipe reorganization, in this stage many recipes where moved to a new meta-demoapps layer since this is more appropriate for demo usage then the core. Additional some recipes were moved to meta-extras to indicate they may be depercated at a future time. A number of recipes were modified since dependencies need to be corrected. Signed-off-by: Saul Wold <Saul.Wold@intel.com>
Diffstat (limited to 'meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch')
-rw-r--r--meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch b/meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch
new file mode 100644
index 0000000000..1aff2d6d6f
--- /dev/null
+++ b/meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch
@@ -0,0 +1,74 @@
1diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeeping/gsd-housekeeping-manager.c
2index f84cfad..e8f474a 100644
3--- a/plugins/housekeeping/gsd-housekeeping-manager.c
4+++ b/plugins/housekeeping/gsd-housekeeping-manager.c
5@@ -85,9 +85,13 @@ thumb_data_free (gpointer data)
6 }
7 }
8
9+typedef enum {
10+ HASH,
11+ HASH_PNG
12+} FileType;
13
14 static GList *
15-read_dir_for_purge (const char *path, GList *files)
16+read_dir_for_purge (const char *path, GList *files, FileType type)
17 {
18 GFile *read_path;
19 GFileEnumerator *enum_dir;
20@@ -105,9 +109,20 @@ read_dir_for_purge (const char *path, GList *files)
21 GFileInfo *info;
22 while ((info = g_file_enumerator_next_file (enum_dir, NULL, NULL)) != NULL) {
23 const char *name;
24+ gboolean prune = FALSE;
25+
26 name = g_file_info_get_name (info);
27
28- if (strlen (name) == 36 && strcmp (name + 32, ".png") == 0) {
29+ switch (type) {
30+ case HASH:
31+ prune = (strlen (name) == 36);
32+ break;
33+ case HASH_PNG:
34+ prune = (strlen (name) == 36 && strcmp (name + 32, ".png") == 0);
35+ break;
36+ }
37+
38+ if (prune) {
39 ThumbData *td;
40 GFile *entry;
41 char *entry_path;
42@@ -197,14 +212,14 @@ purge_thumbnail_cache (void)
43 ".thumbnails",
44 "normal",
45 NULL);
46- files = read_dir_for_purge (path, NULL);
47+ files = read_dir_for_purge (path, NULL, HASH_PNG);
48 g_free (path);
49
50 path = g_build_filename (g_get_home_dir (),
51 ".thumbnails",
52 "large",
53 NULL);
54- files = read_dir_for_purge (path, files);
55+ files = read_dir_for_purge (path, files, HASH_PNG);
56 g_free (path);
57
58 path = g_build_filename (g_get_home_dir (),
59@@ -212,7 +227,14 @@ purge_thumbnail_cache (void)
60 "fail",
61 "gnome-thumbnail-factory",
62 NULL);
63- files = read_dir_for_purge (path, files);
64+ files = read_dir_for_purge (path, files, HASH_PNG);
65+ g_free (path);
66+
67+ path = g_build_filename (g_get_user_cache_dir (),
68+ "mojito",
69+ "thumbnails",
70+ NULL);
71+ files = read_dir_for_purge (path, files, HASH);
72 g_free (path);
73
74 g_get_current_time (&current_time);