# HG changeset patch # User Goffi # Date 1472400963 -7200 # Node ID 4de202bdde05b34c1149dceba9ce3395b3460db4 # Parent f3940f6a322247dd78a91108678a6fa45bf2d78b core (xmlui): added a quickNote method to easily send notes diff -r f3940f6a3222 -r 4de202bdde05 src/tools/xml_tools.py --- a/src/tools/xml_tools.py Mon Aug 22 20:56:51 2016 +0200 +++ b/src/tools/xml_tools.py Sun Aug 28 18:16:03 2016 +0200 @@ -1238,7 +1238,7 @@ # 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 @@ 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 ''