core (XMLUI): sugar method "note" allow to easily create a XMLUI note dialog (more methods for other dialogs should follow)
This commit is contained in:
parent
df69c77ea3
commit
70dc0f26b0
1 changed files with 17 additions and 0 deletions
|
|
@ -1026,6 +1026,23 @@ class XMLUI(object):
|
|||
return self.doc.toxml()
|
||||
|
||||
|
||||
# Some sugar for XMLUI dialogs
|
||||
|
||||
def note(message, title='', level=C.XMLUI_DATA_LVL_INFO):
|
||||
"""Sugar to easily create a Note Dialog
|
||||
|
||||
@param message: body of the note
|
||||
@param title: title of the note
|
||||
@param level: one of C.XMLUI_DATA_LVL_*
|
||||
"""
|
||||
note_xmlui = XMLUI(C.XMLUI_DIALOG, dialog_opt = {
|
||||
C.XMLUI_DATA_TYPE: C.XMLUI_DIALOG_NOTE,
|
||||
C.XMLUI_DATA_MESS: message,
|
||||
C.XMLUI_DATA_LVL: level},
|
||||
title=title
|
||||
)
|
||||
return note_xmlui
|
||||
|
||||
# Misc other funtions
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue