[gtk+/theming: 11/14] menuitem: mark with the GTK_STYLE_CLASS_MENUITEM style class



commit 972f948cd137a7ddf3c853c6618265d032214333
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Mar 1 22:33:15 2011 -0500

    menuitem: mark with the GTK_STYLE_CLASS_MENUITEM style class

 gtk/gtkmenuitem.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 6194ee5..5692900 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -413,6 +413,7 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass)
 static void
 gtk_menu_item_init (GtkMenuItem *menu_item)
 {
+  GtkStyleContext *context;
   GtkMenuItemPrivate *priv;
 
   priv = G_TYPE_INSTANCE_GET_PRIVATE (menu_item,
@@ -437,6 +438,9 @@ gtk_menu_item_init (GtkMenuItem *menu_item)
   priv->use_action_appearance = TRUE;
   priv->timer = 0;
   priv->action = NULL;
+
+  context = gtk_widget_get_style_context (GTK_WIDGET (menu_item));
+  gtk_style_context_add_class (context, GTK_STYLE_CLASS_MENUITEM);
 }
 
 GtkWidget*



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