diff browser_side/dialog.py @ 42:71a9cc9b9d57

Browser side: Tarot game - draw game managed - we can now play continuously \o/
author Goffi <goffi@goffi.org>
date Mon, 23 May 2011 00:45:19 +0200
parents 7782a786b2f0
children a7ff1e6f1229
line wrap: on
line diff
--- a/browser_side/dialog.py	Sun May 22 17:56:59 2011 +0200
+++ b/browser_side/dialog.py	Mon May 23 00:45:19 2011 +0200
@@ -112,11 +112,12 @@
 
 class SimpleDialog(DialogBox):
 
-    def __init__(self, title, body):
+    def __init__(self, title, body, callback = None):
         """Simple notice dialog box
         @param title: HTML put in the header
         @param body: HTML put in the body"""
         DialogBox.__init__(self, centered=True)
+        self.callback = callback
         _body = VerticalPanel()
         _body.setSpacing(4)
         _body.add(HTML(body))
@@ -127,3 +128,5 @@
 
     def onClose(self):
         self.hide()
+        if self.callback:
+            self.callback()