From fc0c91d69c6e3778a9e2518e6a6d416d5553c342881355784e4ae9ea7dcfa0bf Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 15 Jun 2016 11:50:47 +0000 Subject: [PATCH] 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 --- nautilus-adjust-style-priority.patch | 59 +++++++++++++++++----------- nautilus.changes | 6 +++ 2 files changed, 42 insertions(+), 23 deletions(-) diff --git a/nautilus-adjust-style-priority.patch b/nautilus-adjust-style-priority.patch index f9636a7..65ec155 100644 --- a/nautilus-adjust-style-priority.patch +++ b/nautilus-adjust-style-priority.patch @@ -1,25 +1,38 @@ -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), +From 8c0f5970e71a9b6c786e3e14785f2691c731cd38 Mon Sep 17 00:00:00 2001 +From: Sebastian Keller +Date: Fri, 29 Apr 2016 00:13:59 +0200 +Subject: application: Fix white desktop after changing themes + +Changing the theme to Adwaita was causing the Adwaita.css style provider +to get added after the nautilus.css style provider. This caused the +Adwaita.css provider to override the nautilus.css provider, because the +behavior of two style providers with the same priority is undefined and +gtk happens to prefer the style provider that got added last. + +https://bugzilla.gnome.org/show_bug.cgi?id=765687 +--- + src/nautilus-application.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/nautilus-application.c b/src/nautilus-application.c +index 4bc924d..38e3a25 100644 +--- a/src/nautilus-application.c ++++ b/src/nautilus-application.c +@@ -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 + 1); + g_object_unref (file); } - else if (provider != NULL) - { + +-- +cgit v0.12 + diff --git a/nautilus.changes b/nautilus.changes index d268b1c..e4ce4f6 100644 --- a/nautilus.changes +++ b/nautilus.changes @@ -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