changeset 1610:1378ec04380f

primitivus (xmlui): fixed closing on popup panel "OK" button press
author Goffi <goffi@goffi.org>
date Mon, 16 Nov 2015 09:25:05 +0100
parents 66f0e877625b
children f4a0b12d2442
files frontends/src/primitivus/xmlui.py frontends/src/tools/xmlui.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/primitivus/xmlui.py	Mon Nov 16 08:57:36 2015 +0100
+++ b/frontends/src/primitivus/xmlui.py	Mon Nov 16 09:25:05 2015 +0100
@@ -406,7 +406,7 @@
                     if not 'NO_CANCEL' in self.flags:
                         buttons.append(urwid.Button(_('Cancel'), self.onFormCancelled))
                 else:
-                    buttons.append(urwid.Button(_('OK')))
+                    buttons.append(urwid.Button(_('OK'), on_press=lambda dummy: self._xmluiClose()))
                 max_len = max([len(button.get_label()) for button in buttons])
                 grid_wid = urwid.GridFlow(buttons, max_len + 4, 1, 0, 'center')
                 self.main_cont.body.append(grid_wid)
--- a/frontends/src/tools/xmlui.py	Mon Nov 16 08:57:36 2015 +0100
+++ b/frontends/src/tools/xmlui.py	Mon Nov 16 09:25:05 2015 +0100
@@ -306,7 +306,7 @@
 
     New frontends can inherite this class to easily implement XMLUI
     @property widget_factory: factory to create frontend-specific widgets
-    @proporety dialog_factory: factory to create frontend-specific dialogs
+    @property dialog_factory: factory to create frontend-specific dialogs
     """
     widget_factory = None