[nautilus] nautilus-window: add a styleclass



commit 87193d77fc8278188e73d34b19dd1a326f74a73d
Author: Horst3180 <horst3180 gmx net>
Date:   Wed Jan 27 12:46:05 2016 +0100

    nautilus-window: add a styleclass
    
    This adds the "nautilus-window" styleclass to the main Nautilus window.
    
    This commit provides a way for third party themes to apply their
    own custom styling to Nautilus by using the newly introduced styleclass,
    since the inbuilt Adwaita.css stylesheet is only being loaded when
    the Adwaita theme is used.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761098

 src/nautilus-window.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 830b1cf..3a4aea3 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -2442,6 +2442,13 @@ nautilus_window_init (NautilusWindow *window)
        window->priv->slots = NULL;
        window->priv->active_slot = NULL;
 
+       /* Allow third party themes to match nautilus windows to provide
+        * specific styling for nautilus without affecting other gtk+ applications.
+        * This was a request by some theme authors.
+        */
+       gtk_style_context_add_class (gtk_widget_get_style_context (window),
+                                    "nautilus-window");
+
        window_group = gtk_window_group_new ();
        gtk_window_group_add_window (window_group, GTK_WINDOW (window));
        g_object_unref (window_group);


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