[Xfce4-commits] [xfce/thunar] 01/01: Add thunar styleclass for easier theming

noreply at xfce.org noreply at xfce.org
Sun Oct 22 19:40:15 CEST 2017


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit b05f354ccdb07b18f2be9be0868598569054fb04
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Thu Sep 28 23:39:01 2017 +0200

    Add thunar styleclass for easier theming
    
    To be used in themes e.g. like this:
    .thunar { color: red; }
---
 thunar/thunar-window.c | 45 +++++++++++++++++++++++++--------------------
 1 file changed, 25 insertions(+), 20 deletions(-)

diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 2e8af3e..6b2594e 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -693,26 +693,27 @@ view_index2type (gint idx)
 static void
 thunar_window_init (ThunarWindow *window)
 {
-  GtkRadioAction *radio_action;
-  GtkAccelGroup  *accel_group;
-  GtkWidget      *label;
-  GtkWidget      *infobar;
-  GtkWidget      *item;
-  GtkAction      *action;
-  gboolean        last_show_hidden;
-  gboolean        last_menubar_visible;
-  GSList         *group;
-  gchar          *last_location_bar;
-  gchar          *last_side_pane;
-  GType           type;
-  gint            last_separator_position;
-  gint            last_window_width;
-  gint            last_window_height;
-  gboolean        last_window_maximized;
-  gboolean        last_statusbar_visible;
-  GtkToolItem    *tool_item;
-  gboolean        small_icons;
-  GtkRcStyle     *style;
+  GtkRadioAction  *radio_action;
+  GtkAccelGroup   *accel_group;
+  GtkWidget       *label;
+  GtkWidget       *infobar;
+  GtkWidget       *item;
+  GtkAction       *action;
+  gboolean         last_show_hidden;
+  gboolean         last_menubar_visible;
+  GSList          *group;
+  gchar           *last_location_bar;
+  gchar           *last_side_pane;
+  GType            type;
+  gint             last_separator_position;
+  gint             last_window_width;
+  gint             last_window_height;
+  gboolean         last_window_maximized;
+  gboolean         last_statusbar_visible;
+  GtkToolItem     *tool_item;
+  gboolean         small_icons;
+  GtkRcStyle      *style;
+  GtkStyleContext *context;
 
   /* unset the view type */
   window->view_type = G_TYPE_NONE;
@@ -812,6 +813,10 @@ thunar_window_init (ThunarWindow *window)
   if (G_UNLIKELY (last_window_maximized))
     gtk_window_maximize (GTK_WINDOW (window));
 
+  /* add thunar style class for easier theming */
+  context = gtk_widget_get_style_context (GTK_WIDGET (window));
+  gtk_style_context_add_class (context, "thunar");
+
   window->grid = gtk_grid_new ();
   gtk_container_add (GTK_CONTAINER (window), window->grid);
   gtk_widget_show (window->grid);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list