diff urwid_satext/sat_widgets.py @ 82:c456beff1779

ConfirmDialog now manage a body message
author Goffi <goffi@goffi.org>
date Wed, 03 Sep 2014 17:42:06 +0200
parents 0ebd13729039
children 9f683df69a4c
line wrap: on
line diff
--- a/urwid_satext/sat_widgets.py	Wed May 07 19:49:07 2014 +0200
+++ b/urwid_satext/sat_widgets.py	Wed Sep 03 17:42:06 2014 +0200
@@ -926,10 +926,14 @@
 class ConfirmDialog(GenericDialog):
     """Dialog with buttons for confirm or cancel an action"""
 
-    def __init__(self, title, style=None, **kwargs):
+    def __init__(self, title, message=None, style=None, **kwargs):
         if style is None:
             style = ['YES/NO']
-        GenericDialog.__init__(self, [], title, style, **kwargs)
+        GenericDialog.__init__(self,
+                               [urwid.Text(message, 'center')] if message is not None else [],
+                               title,
+                               style,
+                               **kwargs)
 
 
 class Alert(GenericDialog):