1 |
mrpouet 09/09/28 13:09:56 |
2 |
|
3 |
Added: nautilus-2.26.3-thumbnail-zoom-level.patch |
4 |
nautilus-2.26.3-file-management-properties-ui-dup-id.patch |
5 |
Log: |
6 |
Version bump, which includes fix for duplicates id in nautilus-file-management-properties (bug #286312). Apply this fix to 2.26.3, import patch from upstream (see distributor ML) which fixes massive memory consumption by Nautilus for larger zoom levels. |
7 |
(Portage version: 2.2_rc42/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 gnome-base/nautilus/files/nautilus-2.26.3-thumbnail-zoom-level.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.26.3-thumbnail-zoom-level.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.26.3-thumbnail-zoom-level.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: nautilus-2.26.3-thumbnail-zoom-level.patch |
16 |
=================================================================== |
17 |
From a8097e57788ad735227489e6c51d06bedc796889 Mon Sep 17 00:00:00 2001 |
18 |
From: Alexander Larsson <alexl@××××××.com> |
19 |
Date: Fri, 18 Sep 2009 09:05:44 +0000 |
20 |
Subject: [PATCH] Do not load files for thumbnailing that we can not thumbnail anyway |
21 |
|
22 |
When zooming out we read the real image and use that as the thumbnail. However, we should only do this for files gdk-pixbuf can read as other things can't be read anyway and may potentially be very large (such as videos) since the thumbnail size limit only applies for images. |
23 |
|
24 |
--- |
25 |
libnautilus-private/nautilus-file.c | 3 +- |
26 |
libnautilus-private/nautilus-thumbnails.c | 30 +++++++++++++++++++++++----- |
27 |
libnautilus-private/nautilus-thumbnails.h | 1 + |
28 |
3 files changed, 27 insertions(+), 7 deletions(-) |
29 |
|
30 |
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c |
31 |
index fb6d92b..a2a84f0 100644 |
32 |
--- a/libnautilus-private/nautilus-file.c |
33 |
+++ b/libnautilus-private/nautilus-file.c |
34 |
@@ -3588,7 +3588,8 @@ nautilus_file_get_icon (NautilusFile *file, |
35 |
since the zoom level 150% gives thumbnails at 144, which is |
36 |
ok to scale up from 128. */ |
37 |
if (modified_size > 128*1.25 && |
38 |
- !file->details->thumbnail_wants_original) { |
39 |
+ !file->details->thumbnail_wants_original && |
40 |
+ nautilus_can_thumbnail_internally (file)) { |
41 |
/* Invalidate if we resize upward */ |
42 |
file->details->thumbnail_wants_original = TRUE; |
43 |
nautilus_file_invalidate_attributes (file, NAUTILUS_FILE_ATTRIBUTE_THUMBNAIL); |
44 |
diff --git a/libnautilus-private/nautilus-thumbnails.c b/libnautilus-private/nautilus-thumbnails.c |
45 |
index f064135..2a3fede 100644 |
46 |
--- a/libnautilus-private/nautilus-thumbnails.c |
47 |
+++ b/libnautilus-private/nautilus-thumbnails.c |
48 |
@@ -765,17 +765,35 @@ get_types_table (void) |
49 |
return image_mime_types; |
50 |
} |
51 |
|
52 |
-gboolean |
53 |
-nautilus_thumbnail_is_mimetype_limited_by_size (const char *mime_type) |
54 |
+static gboolean |
55 |
+pixbuf_can_load_type (const char *mime_type) |
56 |
{ |
57 |
GHashTable *image_mime_types; |
58 |
- |
59 |
+ |
60 |
image_mime_types = get_types_table (); |
61 |
- if (g_hash_table_lookup (image_mime_types, mime_type)) { |
62 |
- return TRUE; |
63 |
+ if (g_hash_table_lookup (image_mime_types, mime_type)) { |
64 |
+ return TRUE; |
65 |
} |
66 |
|
67 |
- return FALSE; |
68 |
+ return FALSE; |
69 |
+} |
70 |
+ |
71 |
+gboolean |
72 |
+nautilus_can_thumbnail_internally (NautilusFile *file) |
73 |
+{ |
74 |
+ char *mime_type; |
75 |
+ gboolean res; |
76 |
+ |
77 |
+ mime_type = nautilus_file_get_mime_type (file); |
78 |
+ res = pixbuf_can_load_type (mime_type); |
79 |
+ g_free (mime_type); |
80 |
+ return res; |
81 |
+} |
82 |
+ |
83 |
+gboolean |
84 |
+nautilus_thumbnail_is_mimetype_limited_by_size (const char *mime_type) |
85 |
+{ |
86 |
+ return pixbuf_can_load_type (mime_type); |
87 |
} |
88 |
|
89 |
gboolean |
90 |
diff --git a/libnautilus-private/nautilus-thumbnails.h b/libnautilus-private/nautilus-thumbnails.h |
91 |
index 82007ba..715133b 100644 |
92 |
--- a/libnautilus-private/nautilus-thumbnails.h |
93 |
+++ b/libnautilus-private/nautilus-thumbnails.h |
94 |
@@ -46,6 +46,7 @@ typedef void (* NautilusThumbnailAsyncLoadFunc) (NautilusThumbnailAsyncLoadHandl |
95 |
/* Returns NULL if there's no thumbnail yet. */ |
96 |
void nautilus_create_thumbnail (NautilusFile *file); |
97 |
gboolean nautilus_can_thumbnail (NautilusFile *file); |
98 |
+gboolean nautilus_can_thumbnail_internally (NautilusFile *file); |
99 |
gboolean nautilus_has_valid_failed_thumbnail (NautilusFile *file); |
100 |
gboolean nautilus_thumbnail_is_mimetype_limited_by_size |
101 |
(const char *mime_type); |
102 |
-- |
103 |
1.6.5.rc1 |
104 |
|
105 |
|
106 |
|
107 |
|
108 |
1.1 gnome-base/nautilus/files/nautilus-2.26.3-file-management-properties-ui-dup-id.patch |
109 |
|
110 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.26.3-file-management-properties-ui-dup-id.patch?rev=1.1&view=markup |
111 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.26.3-file-management-properties-ui-dup-id.patch?rev=1.1&content-type=text/plain |
112 |
|
113 |
Index: nautilus-2.26.3-file-management-properties-ui-dup-id.patch |
114 |
=================================================================== |
115 |
From bf6bfde36bcadf43a39fb095650b7fc78741d62a Mon Sep 17 00:00:00 2001 |
116 |
From: Matthias Clasen <mclasen@××××××.com> |
117 |
Date: Thu, 27 Aug 2009 00:05:28 +0000 |
118 |
Subject: Fix a duplicate id in a .ui file |
119 |
|
120 |
This caused nautilus-file-management-properties to crash. |
121 |
--- |
122 |
diff --git a/src/nautilus-file-management-properties.ui b/src/nautilus-file-management-properties.ui |
123 |
index eae16d1..c4fb6ee 100644 |
124 |
--- a/src/nautilus-file-management-properties.ui |
125 |
+++ b/src/nautilus-file-management-properties.ui |
126 |
@@ -1128,7 +1128,7 @@ |
127 |
</packing> |
128 |
</child> |
129 |
<child> |
130 |
- <object class="GtkLabel" id="label"> |
131 |
+ <object class="GtkLabel" id="label99"> |
132 |
<property name="height_request">6</property> |
133 |
<property name="visible">True</property> |
134 |
<property name="label" translatable="yes"/> |
135 |
-- |
136 |
cgit v0.8.2 |