make escape close the whole menu

This commit is contained in:
Dana Jansens 2007-05-31 23:30:50 +00:00
parent 55886f27aa
commit 2d9260f8c4

View file

@ -1584,13 +1584,8 @@ static gboolean event_handle_menu_keyboard(XEvent *ev)
if (frame == NULL)
ret = FALSE;
else if (keycode == ob_keycode(OB_KEY_ESCAPE) && state == 0) {
/* Escape goes to the parent menu or closes the last one */
if (frame->parent)
menu_frame_select(frame, NULL, TRUE);
else
menu_frame_hide_all();
}
else if (keycode == ob_keycode(OB_KEY_ESCAPE) && state == 0)
menu_frame_hide_all();
else if (keycode == ob_keycode(OB_KEY_RETURN) && (state == 0 ||
state == ControlMask))