Mercurial > pidgin
changeset 23343:9a7520e489f8
Fix some key-press issues on nested popup menus where pressing up/down
would scroll in the parent menu, when it's supposed to scroll in the
child menu.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 09 Jun 2008 19:34:25 +0000 |
parents | 6d4e4a5963f3 |
children | e96502c0262e |
files | finch/libgnt/gntmenu.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/libgnt/gntmenu.c Mon Jun 09 19:32:20 2008 +0000 +++ b/finch/libgnt/gntmenu.c Mon Jun 09 19:34:25 2008 +0000 @@ -283,6 +283,8 @@ do sub = sub->submenu; while (sub->submenu); if (gnt_widget_key_pressed(GNT_WIDGET(sub), text)) return TRUE; + if (menu->type != GNT_MENU_TOPLEVEL) + return FALSE; } if ((text[0] == 27 && text[1] == 0) || @@ -332,10 +334,12 @@ return TRUE; } } + if (gnt_bindable_perform_action_key(GNT_BINDABLE(widget), text)) + return TRUE; return org_key_pressed(widget, text); } - return FALSE; + return gnt_bindable_perform_action_key(GNT_BINDABLE(widget), text); } static void @@ -434,7 +438,7 @@ { GntWidget *widget = GNT_WIDGET(instance); GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_SHADOW | GNT_WIDGET_NO_BORDER | - GNT_WIDGET_CAN_TAKE_FOCUS | GNT_WIDGET_TRANSIENT); + GNT_WIDGET_CAN_TAKE_FOCUS | GNT_WIDGET_TRANSIENT | GNT_WIDGET_DISABLE_ACTIONS); GNTDEBUG; }