diff frontends/src/primitivus/xmlui.py @ 1580:641cfd2faefe

Primitivus: better popups handling: - widget to remove can now be specified in removePopUp: if it is not the current one, it will be removed from queue - Primitivus.Alert method is a shortcut to display an Alert which will be removed on "OK" press - showDialog is now obsolete and removed, if generic dialog creation is needed, XMLUI can be used
author Goffi <goffi@goffi.org>
date Wed, 11 Nov 2015 18:32:59 +0100
parents d5e332055d9f
children 1378ec04380f
line wrap: on
line diff
--- a/frontends/src/primitivus/xmlui.py	Wed Nov 11 18:29:32 2015 +0100
+++ b/frontends/src/primitivus/xmlui.py	Wed Nov 11 18:32:59 2015 +0100
@@ -328,7 +328,7 @@
         self.host.showPopUp(self)
 
     def _xmluiClose(self):
-        self.host.removePopUp()
+        self.host.removePopUp(self)
 
 
 class PrimitivusMessageDialog(PrimitivusDialog, xmlui.MessageDialog, sat_widgets.Alert):
@@ -455,7 +455,7 @@
         if self._dest == 'window':
             self.host.removeWindow()
         elif self._dest == 'popup':
-            self.host.removePopUp()
+            self.host.removePopUp(self)
         else:
             raise exceptions.InternalError("self._dest unknown, are you sure you have called XMLUI.show ?")