# HG changeset patch # User Sadrul Habib Chowdhury # Date 1213040065 0 # Node ID 9a7520e489f8ecba1e7c81eb96d130e8a9555ea9 # Parent 6d4e4a5963f3c6dd2c0ccce6bb24c83a0604b51c 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. diff -r 6d4e4a5963f3 -r 9a7520e489f8 finch/libgnt/gntmenu.c --- 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; }