# HG changeset patch
# User Goffi <goffi@goffi.org>
# Date 1409758926 -7200
# Node ID c456beff177964c600f38ff5f6d348469528d1b5
# Parent  0ebd137290395de5066220a6c4e90d6a4347accf
ConfirmDialog now manage a body message

diff -r 0ebd13729039 -r c456beff1779 urwid_satext/sat_widgets.py
--- 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):