From c95e2aeea35c95af9083b7dd6022aed143d8b796 Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 12 Aug 2010 13:18:11 +0800 Subject: [PATCH] Primitivus: buttons are now in the bottom of Dialogs --- frontends/primitivus/custom_widgets.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontends/primitivus/custom_widgets.py b/frontends/primitivus/custom_widgets.py index d6b8a691..edf7bdc3 100644 --- a/frontends/primitivus/custom_widgets.py +++ b/frontends/primitivus/custom_widgets.py @@ -661,10 +661,9 @@ class GenericDialog(urwid.WidgetWrap): buttons = [urwid.Button(_("Ok"), kwargs['ok_cb'], kwargs['ok_value'])] if buttons: buttons_flow = urwid.GridFlow(buttons, max([len(button.get_label()) for button in buttons])+4, 1, 1, 'center') - widgets_lst.append(buttons_flow) body_content = urwid.SimpleListWalker(widgets_lst) frame_body = urwid.ListBox(body_content) - frame = urwid.Frame(frame_body, frame_header) + frame = urwid.Frame(frame_body, frame_header, buttons_flow if buttons else None) decorated_frame = urwid.LineBox(frame) urwid.WidgetWrap.__init__(self, decorated_frame)