diff --git a/src/tools/xml_tools.py b/src/tools/xml_tools.py index de691ed6..68108f31 100644 --- a/src/tools/xml_tools.py +++ b/src/tools/xml_tools.py @@ -1238,7 +1238,7 @@ class XMLUI(object): # Some sugar for XMLUI dialogs def note(message, title='', level=C.XMLUI_DATA_LVL_INFO): - """Sugar to easily create a Note Dialog + """sugar to easily create a Note Dialog @param message(unicode): body of the note @param title(unicode): title of the note @@ -1254,8 +1254,14 @@ def note(message, title='', level=C.XMLUI_DATA_LVL_INFO): return note_xmlui +def quickNote(host, client, message, title='', level=C.XMLUI_DATA_LVL_INFO): + """more sugar to do the whole note process""" + note_ui = note(message, title, level) + host.actionNew({'xmlui': note_ui.toXml()}, profile=client.profile) + + def deferredUI(host, xmlui, chained=False): - r"""Create a deferred linked to XMLUI + """create a deferred linked to XMLUI @param xmlui(XMLUI): instance of the XMLUI Must be an XMLUI that you can submit, with submit_id set to ''