[Xfce4-commits] <xfce4-panel:andrzejr/wrapper3> Setting gtk3 StyleContext class in wrapper.

Andrzej noreply at xfce.org
Mon Aug 26 21:16:01 CEST 2013


Updating branch refs/heads/andrzejr/wrapper3
         to 6da51ed42ef4defb1bad63c44188e29373bd65cb (commit)
       from 156d16bf986935966631457e5656d7e1f2f05cd7 (commit)

commit 6da51ed42ef4defb1bad63c44188e29373bd65cb
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Mon Aug 26 20:14:36 2013 +0100

    Setting gtk3 StyleContext class in wrapper.
    
    (reworked:
    2820b5bc195adfc49490d9001f8f4e8677140203
        Added panel class for theming.
    3557ce18a3f0dfa88ebaa8c2f69f80e12fa69c5f
        Use both .panel and .xfce4-panel style context classes
    from nick/gtk3 branch)

 wrapper/wrapper-plug.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/wrapper/wrapper-plug.c b/wrapper/wrapper-plug.c
index 5723a24..6dc4432 100644
--- a/wrapper/wrapper-plug.c
+++ b/wrapper/wrapper-plug.c
@@ -91,8 +91,9 @@ static void
 wrapper_plug_init (WrapperPlug *plug)
 {
 #if GTK_CHECK_VERSION (3, 0, 0)
-  GdkVisual *visual = NULL;
-  GdkScreen *screen;
+  GdkVisual       *visual = NULL;
+  GdkScreen       *screen;
+  GtkStyleContext *context;
 #else
   GdkColormap *colormap = NULL;
   GdkScreen   *screen;
@@ -128,6 +129,13 @@ wrapper_plug_init (WrapperPlug *plug)
   if (colormap != NULL)
     gtk_widget_set_colormap (GTK_WIDGET (plug), colormap);
 #endif
+
+#if GTK_CHECK_VERSION (3, 0, 0)
+  /* set the panel class */
+  context = gtk_widget_get_style_context (GTK_WIDGET (plug));
+  gtk_style_context_add_class (context, "panel");
+  gtk_style_context_add_class (context, "xfce4-panel");
+#endif
 }
 
 


More information about the Xfce4-commits mailing list