diff cagou/core/dialog.py @ 243:50f7c000b4ae

xmlui: implemented MessageDialog
author Goffi <goffi@goffi.org>
date Thu, 03 Jan 2019 20:37:55 +0100
parents dbd2274fc78b
children 1b835bcfa663
line wrap: on
line diff
--- a/cagou/core/dialog.py	Thu Jan 03 10:52:57 2019 +0100
+++ b/cagou/core/dialog.py	Thu Jan 03 20:37:55 2019 +0100
@@ -20,6 +20,7 @@
 """generic dialogs"""
 
 from sat.core.i18n import _
+from cagou.core.constants import Const as C
 from kivy.uix.boxlayout import BoxLayout
 from kivy import properties
 from sat.core import log as logging
@@ -27,6 +28,13 @@
 log = logging.getLogger(__name__)
 
 
+class MessageDialog(BoxLayout):
+    title = properties.StringProperty()
+    message = properties.StringProperty()
+    level = properties.OptionProperty(C.XMLUI_DATA_LVL_INFO, options=C.XMLUI_DATA_LVLS)
+    close_cb = properties.ObjectProperty()
+
+
 class ConfirmDialog(BoxLayout):
     title = properties.StringProperty()
     message = properties.StringProperty(_(u"Are you sure?"))