Accepting request 402029 from home:Zaitor

Fix patch from last sub

OBS-URL: https://build.opensuse.org/request/show/402029
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/nautilus?expand=0&rev=247
This commit is contained in:
2016-06-15 11:50:47 +00:00
committed by Git OBS Bridge
parent c45d2fa0b0
commit fc0c91d69c
2 changed files with 42 additions and 23 deletions

View File

@@ -1,25 +1,38 @@
diff -Nura nautilus-3.20.1/src/nautilus-application.c nautilus-3.20.1_new/src/nautilus-application.c From 8c0f5970e71a9b6c786e3e14785f2691c731cd38 Mon Sep 17 00:00:00 2001
--- nautilus-3.20.1/src/nautilus-application.c 2016-04-28 09:40:26.000000000 +0000 From: Sebastian Keller <sebastian-keller@gmx.de>
+++ nautilus-3.20.1_new/src/nautilus-application.c 2016-06-03 09:19:52.152258384 +0000 Date: Fri, 29 Apr 2016 00:13:59 +0200
@@ -1097,12 +1097,18 @@ Subject: application: Fix white desktop after changing themes
provider = gtk_css_provider_new ();
file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/Adwaita.css"); Changing the theme to Adwaita was causing the Adwaita.css style provider
gtk_css_provider_load_from_file (provider, file, NULL); to get added after the nautilus.css style provider. This caused the
+ Adwaita.css provider to override the nautilus.css provider, because the
+ /* The behavior of two style providers with the same priority is behavior of two style providers with the same priority is undefined and
+ * undefined and gtk happens to prefer the provider that got added last. gtk happens to prefer the style provider that got added last.
+ * Use a higher priority here to avoid this problem.
+ */ https://bugzilla.gnome.org/show_bug.cgi?id=765687
+ gtk_style_context_add_provider_for_screen (screen, ---
+ GTK_STYLE_PROVIDER (provider), src/nautilus-application.c | 6 +++++-
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 1); 1 file changed, 5 insertions(+), 1 deletion(-)
+
g_object_unref (file); diff --git a/src/nautilus-application.c b/src/nautilus-application.c
} index 4bc924d..38e3a25 100644
--- a/src/nautilus-application.c
- gtk_style_context_add_provider_for_screen (screen, +++ b/src/nautilus-application.c
- GTK_STYLE_PROVIDER (provider), @@ -1116,9 +1116,13 @@ theme_changed (GtkSettings *settings)
permanent_provider = gtk_css_provider_new ();
file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/nautilus.css");
gtk_css_provider_load_from_file (permanent_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 (permanent_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 1);
g_object_unref (file);
} }
else if (provider != NULL)
{ --
cgit v0.12

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 14 20:27:01 UTC 2016 - zaitor@opensuse.org
- Rebase nautilus-adjust-style-priority.patch to what upstream
committed (boo#982134).
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jun 3 18:02:41 UTC 2016 - qzhao@suse.com Fri Jun 3 18:02:41 UTC 2016 - qzhao@suse.com