[nautilus/f18] Backport some fixes from the stable gnome-3-6 branch
Cosimo Cecchi
cosimoc at fedoraproject.org
Wed Jan 2 15:36:12 UTC 2013
commit 8155c6435c3f0cb1f8a1c4c0005adf60ede7106b
Author: Cosimo Cecchi <cosimoc at gnome.org>
Date: Wed Jan 2 16:35:37 2013 +0100
Backport some fixes from the stable gnome-3-6 branch
nautilus-3.6.3-custom-icons-1.patch | 102 ++++++++++++++++++++++++++++
nautilus-3.6.3-custom-icons-2.patch | 57 +++++++++++++++
nautilus-3.6.3-search-provider-crash.patch | 50 ++++++++++++++
nautilus.spec | 17 +++++-
4 files changed, 225 insertions(+), 1 deletions(-)
---
diff --git a/nautilus-3.6.3-custom-icons-1.patch b/nautilus-3.6.3-custom-icons-1.patch
new file mode 100644
index 0000000..be0b909
--- /dev/null
+++ b/nautilus-3.6.3-custom-icons-1.patch
@@ -0,0 +1,102 @@
+commit 6cde4c5a6d639c85df09b8992a307f91d6b056a6
+Author: Cosimo Cecchi <cosimoc at gnome.org>
+Date: Tue Nov 13 08:16:17 2012 -0500
+
+ file: don't add a thumbnail border around desktop file launchers
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=688237
+
+diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
+index e9b7715..d554376 100644
+--- a/libnautilus-private/nautilus-file.c
++++ b/libnautilus-private/nautilus-file.c
+@@ -3953,6 +3953,18 @@ get_custom_icon_metadata_name (NautilusFile *file)
+ }
+
+ static GIcon *
++get_link_icon (NautilusFile *file)
++{
++ GIcon *icon = NULL;
++
++ if (file->details->got_link_info && file->details->custom_icon != NULL) {
++ icon = g_object_ref (file->details->custom_icon);
++ }
++
++ return icon;
++}
++
++static GIcon *
+ get_custom_icon (NautilusFile *file)
+ {
+ char *custom_icon_uri, *custom_icon_name;
+@@ -3985,11 +3997,7 @@ get_custom_icon (NautilusFile *file)
+ g_free (custom_icon_name);
+ }
+ }
+-
+- if (icon == NULL && file->details->got_link_info && file->details->custom_icon != NULL) {
+- icon = g_object_ref (file->details->custom_icon);
+- }
+-
++
+ return icon;
+ }
+
+@@ -4086,6 +4094,12 @@ nautilus_file_get_gicon (NautilusFile *file,
+ return icon;
+ }
+
++ icon = get_link_icon (file);
++
++ if (icon != NULL) {
++ return icon;
++ }
++
+ if (file->details->icon) {
+ icon = NULL;
+
+@@ -4218,27 +4232,36 @@ nautilus_file_get_icon (NautilusFile *file,
+ {
+ NautilusIconInfo *icon;
+ GIcon *gicon;
++ gboolean custom_icon;
+ GdkPixbuf *raw_pixbuf, *scaled_pixbuf;
+ int modified_size;
+
+ if (file == NULL) {
+ return NULL;
+ }
+-
++
++ custom_icon = FALSE;
+ gicon = get_custom_icon (file);
++
+ if (gicon) {
+- GdkPixbuf *pixbuf;
++ custom_icon = TRUE;
++ } else {
++ gicon = get_link_icon (file);
++ }
+
++ if (gicon) {
+ icon = nautilus_icon_info_lookup (gicon, size);
+ g_object_unref (gicon);
+
+- pixbuf = nautilus_icon_info_get_pixbuf (icon);
+- if (pixbuf != NULL) {
+- nautilus_ui_frame_image (&pixbuf);
+- g_object_unref (icon);
++ if (custom_icon) {
++ raw_pixbuf = nautilus_icon_info_get_pixbuf (icon);
++ if (raw_pixbuf != NULL) {
++ nautilus_ui_frame_image (&raw_pixbuf);
++ g_object_unref (icon);
+
+- icon = nautilus_icon_info_new_for_pixbuf (pixbuf);
+- g_object_unref (pixbuf);
++ icon = nautilus_icon_info_new_for_pixbuf (raw_pixbuf);
++ g_object_unref (raw_pixbuf);
++ }
+ }
+
+ return icon;
diff --git a/nautilus-3.6.3-custom-icons-2.patch b/nautilus-3.6.3-custom-icons-2.patch
new file mode 100644
index 0000000..e958428
--- /dev/null
+++ b/nautilus-3.6.3-custom-icons-2.patch
@@ -0,0 +1,57 @@
+commit f69e472263b0bf6e1cc60c0eeaf7874fc7931f8d
+Author: Cosimo Cecchi <cosimoc at gnome.org>
+Date: Sun Dec 16 19:15:55 2012 +0100
+
+ file: revert to previous framing behavior for custom icons
+
+ I.e. don't treat them like thumbnails, and don't add a border.
+ This was changed in d9ef715ea11e92917414d5d7bddd4dd1487fac1b but it
+ causes problems for other (more important) use cases.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=688808
+
+diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
+index fd16e6f..64e27e1 100644
+--- a/libnautilus-private/nautilus-file.c
++++ b/libnautilus-private/nautilus-file.c
+@@ -4232,7 +4232,6 @@ nautilus_file_get_icon (NautilusFile *file,
+ {
+ NautilusIconInfo *icon;
+ GIcon *gicon;
+- gboolean custom_icon;
+ GdkPixbuf *raw_pixbuf, *scaled_pixbuf;
+ int modified_size;
+
+@@ -4240,30 +4239,15 @@ nautilus_file_get_icon (NautilusFile *file,
+ return NULL;
+ }
+
+- custom_icon = FALSE;
+ gicon = get_custom_icon (file);
+-
+- if (gicon) {
+- custom_icon = TRUE;
+- } else {
++ if (gicon == NULL) {
+ gicon = get_link_icon (file);
+ }
+
+- if (gicon) {
++ if (gicon != NULL) {
+ icon = nautilus_icon_info_lookup (gicon, size);
+ g_object_unref (gicon);
+
+- if (custom_icon) {
+- raw_pixbuf = nautilus_icon_info_get_pixbuf (icon);
+- if (raw_pixbuf != NULL) {
+- nautilus_ui_frame_image (&raw_pixbuf);
+- g_object_unref (icon);
+-
+- icon = nautilus_icon_info_new_for_pixbuf (raw_pixbuf);
+- g_object_unref (raw_pixbuf);
+- }
+- }
+-
+ return icon;
+ }
+
diff --git a/nautilus-3.6.3-search-provider-crash.patch b/nautilus-3.6.3-search-provider-crash.patch
new file mode 100644
index 0000000..c00679a
--- /dev/null
+++ b/nautilus-3.6.3-search-provider-crash.patch
@@ -0,0 +1,50 @@
+commit 67e21d2402df3b0fa2937b627846817ff0bc4f08 (HEAD, origin/gnome-3-6, gnome-3-6)
+Author: Cosimo Cecchi <cosimoc at gnome.org>
+Date: Wed Jan 2 16:22:59 2013 +0100
+
+ search-provider: keep a reference to the dbus invocation
+
+ While the operation is in progress, since we're returning the result
+ asynchronously, we need to keep a reference to the invocation, or it
+ could be invalid when returning later.
+
+ Related: https://bugzilla.redhat.com/show_bug.cgi?id=874534
+
+diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
+index ddc9727..3207481 100644
+--- a/src/nautilus-shell-search-provider.c
++++ b/src/nautilus-shell-search-provider.c
+@@ -140,6 +140,7 @@ pending_search_free (PendingSearch *search)
+ g_hash_table_destroy (search->hits);
+ g_clear_object (&search->query);
+ g_clear_object (&search->engine);
++ g_clear_object (&search->invocation);
+
+ g_slice_free (PendingSearch, search);
+ }
+@@ -439,7 +440,7 @@ execute_search (NautilusShellSearchProviderApp *self,
+ nautilus_query_set_location (query, home_uri);
+
+ pending_search = g_slice_new0 (PendingSearch);
+- pending_search->invocation = invocation;
++ pending_search->invocation = g_object_ref (invocation);
+ pending_search->hits = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
+ pending_search->query = query;
+ pending_search->engine = nautilus_search_engine_new ();
+@@ -506,6 +507,7 @@ static void
+ result_metas_data_free (ResultMetasData *data)
+ {
+ g_clear_object (&data->self);
++ g_clear_object (&data->invocation);
+ g_strfreev (data->uris);
+
+ g_slice_free (ResultMetasData, data);
+@@ -629,7 +631,7 @@ handle_get_result_metas (NautilusShellSearchProvider *skeleton,
+
+ data = g_slice_new0 (ResultMetasData);
+ data->self = g_object_ref (self);
+- data->invocation = invocation;
++ data->invocation = g_object_ref (invocation);
+ data->start_time = g_get_monotonic_time ();
+ data->uris = g_strdupv (results);
+
diff --git a/nautilus.spec b/nautilus.spec
index 7c4f525..fa6e8a6 100644
--- a/nautilus.spec
+++ b/nautilus.spec
@@ -10,7 +10,7 @@
Name: nautilus
Summary: File manager for GNOME
Version: 3.6.3
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+
Group: User Interface/Desktops
Source: http://download.gnome.org/sources/%{name}/3.6/%{name}-%{version}.tar.xz
@@ -61,6 +61,14 @@ Provides: eel2 = 2.26.0-3
# https://bugzilla.redhat.com/show_bug.cgi?id=885133
Patch0: 0001-places-sidebar-make-sure-to-always-notify-when-unmou.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=688237
+# https://bugzilla.gnome.org/show_bug.cgi?id=688808
+Patch1: nautilus-3.6.3-custom-icons-1.patch
+Patch2: nautilus-3.6.3-custom-icons-2.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=874534
+Patch3: nautilus-3.6.3-search-provider-crash.patch
+
%description
Nautilus is the file manager and graphical shell for the GNOME desktop
that makes it easy to manage your files and the rest of your system.
@@ -94,6 +102,9 @@ for developing nautilus extensions.
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .unmount-notify
+%patch1 -p1 -b .custom-icons-1
+%patch2 -p1 -b .custom-icons-2
+%patch3 -p1 -b .search-provider-crash
#%patch4 -p1 -b .selinux
%build
@@ -168,6 +179,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || :
%doc %{_datadir}/gtk-doc/html/libnautilus-extension/*
%changelog
+* Wed Jan 2 2013 Cosimo Cecchi <cosimoc at redhat.com> - 3.6.3-4
+- Backport a patch to fix a regression wrt. framing of custom icons.
+- Backport a patch for a search provider crasher (RHBZ#874534).
+
* Tue Dec 11 2012 Cosimo Cecchi <cosimoc at redhat.com> - 3.6.3-3
- Make sure to always notify when syncing data on unmount.
Resolves: #885133.
More information about the scm-commits
mailing list