[rhythmbox] statusbar: apply 'statusbar' style class



commit 35a95fa8bb7c5ef14f5c6ff0258c051039e7e1b3
Author: Jonathan Matthew <jonathan d14n org>
Date:   Fri Mar 20 09:09:59 2015 +1000

    statusbar: apply 'statusbar' style class
    
    GtkStatusbar only applies this to itself in gtk 3.16, so for the benefit
    of older versions we'll apply it too.

 shell/rb-statusbar.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/shell/rb-statusbar.c b/shell/rb-statusbar.c
index 8f02888..6e90cc3 100644
--- a/shell/rb-statusbar.c
+++ b/shell/rb-statusbar.c
@@ -38,6 +38,7 @@
 
 #include "rb-statusbar.h"
 #include "rb-debug.h"
+#include "rb-util.h"
 
 /**
  * SECTION:rb-statusbar
@@ -61,6 +62,7 @@
 
 static void rb_statusbar_class_init (RBStatusbarClass *klass);
 static void rb_statusbar_init (RBStatusbar *statusbar);
+static void rb_statusbar_constructed (GObject *object);
 static void rb_statusbar_dispose (GObject *object);
 static void rb_statusbar_finalize (GObject *object);
 static void rb_statusbar_set_property (GObject *object,
@@ -100,6 +102,7 @@ rb_statusbar_class_init (RBStatusbarClass *klass)
 
         object_class->dispose = rb_statusbar_dispose;
         object_class->finalize = rb_statusbar_finalize;
+        object_class->constructed = rb_statusbar_constructed;
 
         object_class->set_property = rb_statusbar_set_property;
         object_class->get_property = rb_statusbar_get_property;
@@ -140,6 +143,14 @@ rb_statusbar_init (RBStatusbar *statusbar)
 }
 
 static void
+rb_statusbar_constructed (GObject *object)
+{
+       RB_CHAIN_GOBJECT_METHOD (rb_statusbar_parent_class, constructed, object);
+
+       gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (object)), "statusbar");
+}
+
+static void
 rb_statusbar_dispose (GObject *object)
 {
         RBStatusbar *statusbar;


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