# HG changeset patch # User Sadrul Habib Chowdhury # Date 1231258756 0 # Node ID 253e5d3988ca3c200864972ee58d11a896ae5018 # Parent ea28a7b9113ce91817196bc471f1a4db9cb0747d Show the submenu for the toplevel menu without requiring a keypress from the user. diff -r ea28a7b9113c -r 253e5d3988ca finch/libgnt/gntwindow.c --- a/finch/libgnt/gntwindow.c Tue Jan 06 15:34:26 2009 +0000 +++ b/finch/libgnt/gntwindow.c Tue Jan 06 16:19:16 2009 +0000 @@ -49,7 +49,16 @@ { GntWindow *win = GNT_WINDOW(bind); if (win->menu) { - gnt_screen_menu_show(win->menu); + GntMenu *menu = win->menu; + + gnt_screen_menu_show(menu); + if (menu->type == GNT_MENU_TOPLEVEL) { + GntMenuItem *item; + item = g_list_nth_data(menu->list, menu->selected); + if (item && gnt_menuitem_get_submenu(item)) { + gnt_widget_activate(GNT_WIDGET(menu)); + } + } return TRUE; } return FALSE;