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

Nick Schermer noreply at xfce.org
Sat Nov 30 17:12:25 CET 2013


Updating branch refs/heads/master
         to c88fbb8983af1a853dc444bac536ccc09cfad661 (commit)
       from f1299849ddd60c2458a6fde453e5190807541034 (commit)

commit c88fbb8983af1a853dc444bac536ccc09cfad661
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