[gtk+] menuitem: Remove old themeing enhancement



commit dded6a0673100f1d0512366d71a2a333252f0a49
Author: Benjamin Otte <otte redhat com>
Date:   Tue Mar 26 13:27:45 2013 +0100

    menuitem: Remove old themeing enhancement
    
    CSS doesn't allow themeing parents based on the state of their children,
    so this code just causes extra redraws today.

 gtk/gtkmenuitem.c |   28 ----------------------------
 1 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 73c2545..349bc20 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -1341,23 +1341,9 @@ _gtk_menu_item_set_placement (GtkMenuItem         *menu_item,
 void
 gtk_menu_item_select (GtkMenuItem *menu_item)
 {
-  GtkWidget *parent;
-
   g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
 
   g_signal_emit (menu_item, menu_item_signals[SELECT], 0);
-
-  /* Enable themeing of the parent menu item depending on whether
-   * something is selected in its submenu
-   */
-  parent = gtk_widget_get_parent (GTK_WIDGET (menu_item));
-  if (GTK_IS_MENU (parent))
-    {
-      GtkMenu *menu = GTK_MENU (parent);
-
-      if (menu->priv->parent_menu_item)
-        gtk_widget_queue_draw (GTK_WIDGET (menu->priv->parent_menu_item));
-    }
 }
 
 /**
@@ -1370,23 +1356,9 @@ gtk_menu_item_select (GtkMenuItem *menu_item)
 void
 gtk_menu_item_deselect (GtkMenuItem *menu_item)
 {
-  GtkWidget *parent;
-
   g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
 
   g_signal_emit (menu_item, menu_item_signals[DESELECT], 0);
-
-  /* Enable themeing of the parent menu item depending on whether
-   * something is selected in its submenu
-   */
-  parent = gtk_widget_get_parent (GTK_WIDGET (menu_item));
-  if (GTK_IS_MENU (parent))
-    {
-      GtkMenu *menu = GTK_MENU (parent);
-
-      if (menu->priv->parent_menu_item)
-        gtk_widget_queue_draw (GTK_WIDGET (menu->priv->parent_menu_item));
-    }
 }
 
 /**


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