summaryrefslogtreecommitdiffstats
path: root/meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch
diff options
context:
space:
mode:
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.patch76
1 files changed, 0 insertions, 76 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
deleted file mode 100644
index 79f28711c5..0000000000
--- a/meta-demoapps/recipes-gnome/gnome/gnome-settings-daemon/mojito-cleanup.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1Upstream-Status: Pending
2
3diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeeping/gsd-housekeeping-manager.c
4index f84cfad..e8f474a 100644
5--- a/plugins/housekeeping/gsd-housekeeping-manager.c
6+++ b/plugins/housekeeping/gsd-housekeeping-manager.c
7@@ -85,9 +85,13 @@ thumb_data_free (gpointer data)
8 }
9 }
10
11+typedef enum {
12+ HASH,
13+ HASH_PNG
14+} FileType;
15
16 static GList *
17-read_dir_for_purge (const char *path, GList *files)
18+read_dir_for_purge (const char *path, GList *files, FileType type)
19 {
20 GFile *read_path;
21 GFileEnumerator *enum_dir;
22@@ -105,9 +109,20 @@ read_dir_for_purge (const char *path, GList *files)
23 GFileInfo *info;
24 while ((info = g_file_enumerator_next_file (enum_dir, NULL, NULL)) != NULL) {
25 const char *name;
26+ gboolean prune = FALSE;
27+
28 name = g_file_info_get_name (info);
29
30- if (strlen (name) == 36 && strcmp (name + 32, ".png") == 0) {
31+ switch (type) {
32+ case HASH:
33+ prune = (strlen (name) == 36);
34+ break;
35+ case HASH_PNG:
36+ prune = (strlen (name) == 36 && strcmp (name + 32, ".png") == 0);
37+ break;
38+ }
39+
40+ if (prune) {
41 ThumbData *td;
42 GFile *entry;
43 char *entry_path;
44@@ -197,14 +212,14 @@ purge_thumbnail_cache (void)
45 ".thumbnails",
46 "normal",
47 NULL);
48- files = read_dir_for_purge (path, NULL);
49+ files = read_dir_for_purge (path, NULL, HASH_PNG);
50 g_free (path);
51
52 path = g_build_filename (g_get_home_dir (),
53 ".thumbnails",
54 "large",
55 NULL);
56- files = read_dir_for_purge (path, files);
57+ files = read_dir_for_purge (path, files, HASH_PNG);
58 g_free (path);
59
60 path = g_build_filename (g_get_home_dir (),
61@@ -212,7 +227,14 @@ purge_thumbnail_cache (void)
62 "fail",
63 "gnome-thumbnail-factory",
64 NULL);
65- files = read_dir_for_purge (path, files);
66+ files = read_dir_for_purge (path, files, HASH_PNG);
67+ g_free (path);
68+
69+ path = g_build_filename (g_get_user_cache_dir (),
70+ "mojito",
71+ "thumbnails",
72+ NULL);
73+ files = read_dir_for_purge (path, files, HASH);
74 g_free (path);
75
76 g_get_current_time (&current_time);