[nautilus/gnome-3-20] application: give priority to user theme



commit ec3498d1168cab499131bdfa450bfeb5b43d7946
Author: Carlos Soriano <csoriano gnome org>
Date:   Mon Feb 15 11:16:10 2016 +0100

    application: give priority to user theme
    
    We want to provide priority to anything that was set on the user theme
    rather than in custom Adwaita theme, in case anyone wants to override
    some style.
    
    This fixes the desktop window getting the same background as the one
    defined for normal windows in the Nautilus Adwaita theme.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761965

 src/nautilus-application.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 560a5ca..ee09857 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -1054,17 +1054,6 @@ theme_changed (GtkSettings *settings)
        g_object_get (settings, "gtk-theme-name", &theme, NULL);
        screen = gdk_screen_get_default ();
 
-       /* CSS we want to always load for any theme */
-       if (permanent_provider == NULL) {
-               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);
-               gtk_style_context_add_provider_for_screen (screen,
-                                                          GTK_STYLE_PROVIDER (permanent_provider),
-                                                          GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-               g_object_unref (file);
-       }
-
        /* CSS that themes can override */
        if (g_str_equal (theme, "Adwaita"))
        {
@@ -1087,6 +1076,17 @@ theme_changed (GtkSettings *settings)
                g_clear_object (&provider);
        }
 
+       /* CSS we want to always load for any theme */
+       if (permanent_provider == NULL) {
+               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);
+               gtk_style_context_add_provider_for_screen (screen,
+                                                          GTK_STYLE_PROVIDER (permanent_provider),
+                                                          GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+               g_object_unref (file);
+       }
+
        g_free (theme);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]