libgnt/libgnt

d80ca9900534
Parents 9ff504f5104e
Children 1b784dea0889
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.
  • +6 -2
    gntmenu.c
  • --- a/gntmenu.c Mon Jun 09 19:32:20 2008 +0000
    +++ b/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;
    }