From 9a3de4a397a7f53fafcae54c0e7d6b19827ebe95 Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Thu, 18 Mar 2010 13:24:02 -0500 Subject: Don't return TRUE if keyval is GDK_Return. --- src/idoentrymenuitem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/idoentrymenuitem.c') diff --git a/src/idoentrymenuitem.c b/src/idoentrymenuitem.c index 8cac5b6..8e7ab5c 100644 --- a/src/idoentrymenuitem.c +++ b/src/idoentrymenuitem.c @@ -73,7 +73,7 @@ ido_entry_menu_item_class_init (IdoEntryMenuItemClass *klass) item_class->select = ido_entry_menu_item_select; item_class->deselect = ido_entry_menu_item_deselect; - menu_item_class->hide_on_activate = FALSE; + menu_item_class->hide_on_activate = TRUE; g_type_class_add_private (gobject_class, sizeof (IdoEntryMenuItemPrivate)); } @@ -150,7 +150,11 @@ ido_entry_menu_item_key_press (GtkWidget *widget, gtk_widget_event (menuitem->priv->entry, ((GdkEvent *)(void*)(event))); - return TRUE; + /* We've handled the event, but if the key was GDK_Return + * we still want to forward the event up to the menu shell + * to ensure that the menuitem receives the activate signal. + */ + return event->keyval != GDK_Return; } return FALSE; -- cgit v1.2.3