comparison 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
comparison
equal deleted inserted replaced
242:c2503168fab7 243:50f7c000b4ae
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 """generic dialogs""" 20 """generic dialogs"""
21 21
22 from sat.core.i18n import _ 22 from sat.core.i18n import _
23 from cagou.core.constants import Const as C
23 from kivy.uix.boxlayout import BoxLayout 24 from kivy.uix.boxlayout import BoxLayout
24 from kivy import properties 25 from kivy import properties
25 from sat.core import log as logging 26 from sat.core import log as logging
26 27
27 log = logging.getLogger(__name__) 28 log = logging.getLogger(__name__)
29
30
31 class MessageDialog(BoxLayout):
32 title = properties.StringProperty()
33 message = properties.StringProperty()
34 level = properties.OptionProperty(C.XMLUI_DATA_LVL_INFO, options=C.XMLUI_DATA_LVLS)
35 close_cb = properties.ObjectProperty()
28 36
29 37
30 class ConfirmDialog(BoxLayout): 38 class ConfirmDialog(BoxLayout):
31 title = properties.StringProperty() 39 title = properties.StringProperty()
32 message = properties.StringProperty(_(u"Are you sure?")) 40 message = properties.StringProperty(_(u"Are you sure?"))