diff src/browser/sat_browser/dialog.py @ 524:d41e850b31b9

browser_side (plugin OTR): limit the max width for all dialogs
author souliane <souliane@mailoo.org>
date Wed, 03 Sep 2014 11:22:37 +0200
parents 1af112b97e45
children ed9cd20260ff
line wrap: on
line diff
--- a/src/browser/sat_browser/dialog.py	Wed Sep 03 11:04:29 2014 +0200
+++ b/src/browser/sat_browser/dialog.py	Wed Sep 03 11:22:37 2014 +0200
@@ -256,7 +256,10 @@
         If None, OK button will return "True". Cancel button always returns "False".
         """
         self.callback = callback
+        added_style = kwargs.pop('AddStyleName', None)
         DialogBox.__init__(self, centered=True, **kwargs)
+        if added_style:
+            self.addStyleName(added_style)
 
         if prompt is None:
             prompt = []
@@ -311,7 +314,11 @@
         @param callback: method to call on closing
         @param options: one or more of the following options:
                         - NO_CLOSE: don't add a close button"""
+        added_style = kwargs.pop('AddStyleName', None)
         DialogBox.__init__(self, centered=True, **kwargs)
+        if added_style:
+            self.addStyleName(added_style)
+
         self.callback = callback
         if not options:
             options = []