changeset 80657:16e5749ff5e0

(Fx_menu_bar_open_internal): Use activate_item signal to open menu.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 30 Jul 2008 13:57:26 +0000
parents 28298210911d
children 2e10214b1203
files src/xmenu.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Wed Jul 30 13:56:34 2008 +0000
+++ b/src/xmenu.c	Wed Jul 30 13:57:26 2008 +0000
@@ -1412,11 +1412,12 @@
       /* Activate the first menu.  */
       GList *children = gtk_container_get_children (GTK_CONTAINER (menubar));
 
-      gtk_menu_shell_select_item (GTK_MENU_SHELL (menubar),
-                                  GTK_WIDGET (children->data));
-
-      popup_activated_flag = 1;
-      g_list_free (children);
+      if (children)
+        {
+          g_signal_emit_by_name (children->data, "activate_item");
+          popup_activated_flag = 1;
+          g_list_free (children);
+        }
     }
   UNBLOCK_INPUT;