Re: TODO list updates



Havoc Pennington <hp@redhat.com> writes:

> >   - Make menus less odd-looking by not highlighting the first item
> >     when you pop up the menu.
> > 
> 
> Should be a simple patch.

Indeed, here it is; but the comment says that the current behaviour is
intended. I have no idea why.


--- gtkmenuitem.c	Wed Mar 29 15:46:32 2000
+++ gtkmenuitem-new.c	Wed Mar 29 15:49:16 2000
@@ -647,25 +647,13 @@
   menu_item->timer = 0;
 
   if (GTK_WIDGET_IS_SENSITIVE (menu_item->submenu))
-    {
-      gtk_menu_popup (GTK_MENU (menu_item->submenu),
-		      GTK_WIDGET (menu_item)->parent,
-		      GTK_WIDGET (menu_item),
-		      gtk_menu_item_position_menu,
-		      menu_item,
-		      GTK_MENU_SHELL (GTK_WIDGET (menu_item)->parent)->button,
-		      0);
-      
-      /* This is a bit of a hack - we want to select the first item
-       * of menus hanging of a menu bar, but not for cascading submenus
-       */
-      if (GTK_IS_MENU_BAR (GTK_WIDGET (menu_item)->parent))
-	{
-	  GtkMenuShell *submenu = GTK_MENU_SHELL (menu_item->submenu);
-	  if (submenu->children)
-	    gtk_menu_shell_select_item (submenu, submenu->children->data);
-	}
-    }
+    gtk_menu_popup (GTK_MENU (menu_item->submenu),
+		    GTK_WIDGET (menu_item)->parent,
+		    GTK_WIDGET (menu_item),
+		    gtk_menu_item_position_menu,
+		    menu_item,
+		    GTK_MENU_SHELL (GTK_WIDGET (menu_item)->parent)->button,
+		    0);
 }
 
 static void



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