comparison libervia.py @ 392:f539f6f8ee9c

browser_side: standardize the dialogs size and buttons display: - do not set a default width/height for the XMLUI dialogs - do not display an extra "Close" button when XMLUI form is showed - the buttons order is OK/Save on the left, Cancel/Close on the right - horizontally center the dialog buttons
author souliane <souliane@mailoo.org>
date Mon, 03 Mar 2014 16:24:00 +0100
parents c86d7a8d2c1e
children 6a6551de4414
comparison
equal deleted inserted replaced
391:c86d7a8d2c1e 392:f539f6f8ee9c
376 if not data: 376 if not data:
377 # action was a one shot, nothing to do 377 # action was a one shot, nothing to do
378 pass 378 pass
379 elif "xmlui" in data: 379 elif "xmlui" in data:
380 ui = XMLUI(self, xml_data = data['xmlui']) 380 ui = XMLUI(self, xml_data = data['xmlui'])
381 _dialog = dialog.GenericDialog(ui.title, ui) 381 options = ['NO_CLOSE'] if ui.type == 'form' else []
382 _dialog = dialog.GenericDialog(ui.title, ui, options=options)
382 ui.setCloseCb(_dialog.close) 383 ui.setCloseCb(_dialog.close)
383 _dialog.setSize('80%', '80%')
384 _dialog.show() 384 _dialog.show()
385 else: 385 else:
386 dialog.InfoDialog("Error", 386 dialog.InfoDialog("Error",
387 "Unmanaged action result", Width="400px").center() 387 "Unmanaged action result", Width="400px").center()
388 388