diff frontends/src/primitivus/xmlui.py @ 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 641cfd2faefe
children 48f324352c52
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)