popup menu does not disappear
- From: Jean Bréfort <jean brefort normalesup org>
- To: gtk-list gnome org
- Subject: popup menu does not disappear
- Date: Wed, 25 Aug 2004 19:27:14 +0200
Hi,
I use a popup menu build within a UIManager. Code looks like:
char uis[]="<ui><popup><menuitem action="my_action"/></popup></ui>";
GtkActionGroup *group = gtk_action_group_new ("my_group");
GtkAction *action = gtk_action_menu_new(
"my_action", _("Some action"), NULL, NULL);
g_signal_connect_swapped (action, "activate", G_CALLBACK (my_cb), this);
gtk_action_group_add_action (group, action);
gtk_ui_manager_insert_action_group (UIManager, group, 0);
gtk_ui_manager_add_ui_from_string (UIManager, uis, -1, NULL);
...
GtkWidget *w = gtk_ui_manager_get_widget (m_UIManager, "/popup");
gtk_menu_popup (GTK_MENU (w), NULL, NULL, NULL, NULL, 3,
gtk_get_current_event_time ());
When the menu item is activated a first time, the callback is executed
but the popup menu does not disappear (it does if the menu item is
activated a secont time).
Do I miss something or is it a bug?
Regards,
Jean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]