From: Chong Yidong Date: Wed, 30 Jul 2008 13:57:26 +0000 (+0000) Subject: (Fx_menu_bar_open_internal): Use activate_item signal to open menu. X-Git-Tag: emacs-pretest-22.2.90~64 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb08f2900cf5f80f734788bb15143d6daecd50e5;p=emacs.git (Fx_menu_bar_open_internal): Use activate_item signal to open menu. --- diff --git a/src/xmenu.c b/src/xmenu.c index d240355ef2f..6902f1e4025 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1412,11 +1412,12 @@ If FRAME is nil or not given, use the selected frame. */) /* 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;