comparison frontends/src/primitivus/xmlui.py @ 1579:d5e332055d9f

quick_frontend, primitivus (xmlui): removed _xmluiClose from workflow were submit is triggered, as submit launch the callback which close the dialog itself + fixed dialogs _xmluiClose
author Goffi <goffi@goffi.org>
date Wed, 11 Nov 2015 18:29:32 +0100
parents 8c071bc359c9
children 641cfd2faefe
comparison
equal deleted inserted replaced
1578:7fef6cdf5953 1579:d5e332055d9f
404 if self.type == 'form': 404 if self.type == 'form':
405 buttons.append(urwid.Button(_('Submit'), self.onFormSubmitted)) 405 buttons.append(urwid.Button(_('Submit'), self.onFormSubmitted))
406 if not 'NO_CANCEL' in self.flags: 406 if not 'NO_CANCEL' in self.flags:
407 buttons.append(urwid.Button(_('Cancel'), self.onFormCancelled)) 407 buttons.append(urwid.Button(_('Cancel'), self.onFormCancelled))
408 else: 408 else:
409 buttons.append(urwid.Button(_('OK'), lambda dummy: self._xmluiClose())) 409 buttons.append(urwid.Button(_('OK')))
410 max_len = max([len(button.get_label()) for button in buttons]) 410 max_len = max([len(button.get_label()) for button in buttons])
411 grid_wid = urwid.GridFlow(buttons, max_len + 4, 1, 0, 'center') 411 grid_wid = urwid.GridFlow(buttons, max_len + 4, 1, 0, 'center')
412 self.main_cont.body.append(grid_wid) 412 self.main_cont.body.append(grid_wid)
413 elif self.type == 'param': 413 elif self.type == 'param':
414 tabs_cont = self.main_cont.body[0].base_widget 414 tabs_cont = self.main_cont.body[0].base_widget