Kaydet (Commit) 8537d88d authored tarafından László Németh's avatar László Németh

LibreLogo: stop program immediately at pressing Cancel

button of the inputbox or messagebox dialog window, instead
of waiting for the next __checkhalt__() in a loop.

Change-Id: I1366ad06152e70321a21e78a626f7a89eb5a7ea0
Reviewed-on: https://gerrit.libreoffice.org/62900
Tested-by: Jenkins
Reviewed-by: 's avatarLászló Németh <nemeth@numbertext.org>
üst 4b5420f8
......@@ -303,10 +303,13 @@ def Input(s):
if inputtext:
inputtext = e.Text
else:
# Cancel button
__halt__ = True
# dispose the dialog
controlContainer.dispose()
# stop program at pressing Cancel
__checkhalt__()
return inputtext
except Exception:
__trace__()
......@@ -333,7 +336,9 @@ def Print(s):
global __halt__
s = __string__(s, _.decimal)
if not MessageBox(_.doc.CurrentController.Frame.ContainerWindow, s[:500] + s[500:5000].replace('\n', ' '), "", "messbox", __OK_CANCEL__):
# stop program at pressing Cancel
__halt__ = True
__checkhalt__()
def MessageBox(parent, message, title, msgtype = "messbox", buttons = __OK__):
msgtypes = ("messbox", "infobox", "errorbox", "warningbox", "querybox")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment