diff --git a/nautilus-adjust-style-priority.patch b/nautilus-adjust-style-priority.patch new file mode 100644 index 0000000..f9636a7 --- /dev/null +++ b/nautilus-adjust-style-priority.patch @@ -0,0 +1,25 @@ +diff -Nura nautilus-3.20.1/src/nautilus-application.c nautilus-3.20.1_new/src/nautilus-application.c +--- nautilus-3.20.1/src/nautilus-application.c 2016-04-28 09:40:26.000000000 +0000 ++++ nautilus-3.20.1_new/src/nautilus-application.c 2016-06-03 09:19:52.152258384 +0000 +@@ -1097,12 +1097,18 @@ + provider = gtk_css_provider_new (); + file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/Adwaita.css"); + gtk_css_provider_load_from_file (provider, file, NULL); ++ ++ /* The behavior of two style providers with the same priority is ++ * undefined and gtk happens to prefer the provider that got added last. ++ * Use a higher priority here to avoid this problem. ++ */ ++ gtk_style_context_add_provider_for_screen (screen, ++ GTK_STYLE_PROVIDER (provider), ++ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 1); ++ + g_object_unref (file); + } + +- gtk_style_context_add_provider_for_screen (screen, +- GTK_STYLE_PROVIDER (provider), +- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + } + else if (provider != NULL) + { diff --git a/nautilus.changes b/nautilus.changes index a54c62f..54dbbdf 100644 --- a/nautilus.changes +++ b/nautilus.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Jun 3 18:02:41 UTC 2016 - qzhao@suse.com +- Porting upstream code in nautilus-adjust-style-priority.patch to + fix (bsc#982633) and (bgo#765687). + + The behavior of two style providers with the same priority is + + undefined and gtk happens to prefer the provider that got added last. + + Use a higher priority here to avoid this problem. + ------------------------------------------------------------------- Thu Apr 28 13:16:42 UTC 2016 - zaitor@opensuse.org diff --git a/nautilus.spec b/nautilus.spec index 96dff73..7683c2f 100644 --- a/nautilus.spec +++ b/nautilus.spec @@ -26,6 +26,12 @@ Source: http://download.gnome.org/sources/nautilus/3.20/%{name}-%{versio # fate#308344 bgo#602147 Source1: mount-archive.desktop Source99: baselibs.conf +# PATCH-FIX-OPENSUSE nautilus-adjust-style-priority.patch qzhao@suse.com +# Porting upstream code in (bgo#765687) to fix (bsc#982633). +# The behavior of two style providers with the same priority is +# undefined and gtk happens to prefer the provider that got added last. +# Use a higher priority here to avoid this problem. +Patch0: nautilus-adjust-style-priority.patch Url: http://www.gnome.org BuildRoot: %{_tmppath}/%{name}-%{version}-build # needed for directory ownership @@ -108,6 +114,7 @@ This package contains development files for nautilus. %lang_package %prep %setup -q +%patch0 -p1 translation-update-upstream %build