Skip to content
Snippets Groups Projects
Commit 322cccd5 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't call uifc.bail() repeatedly

Since this script already sets an on_exit() handler to call uifc.bail()
it doesn't have to call it again (technically, before) in the "Done" block.
This results in "UIFC is unitialized" error displayed, as reported by
Fernando Toledo. Fixing issue #830

Set WIN_ESC (remains active, but greyed when ESC key pressed) mode flag
on main menu while we're here. That looks better.
parent 8044cf9b
Branches
Tags
No related merge requests found
......@@ -187,7 +187,7 @@ function main()
js.on_exit("uifc.bail()");
while (cmd >= 0) {
opts = ["Dirs...", "Secure Dirs...", format("Max Files (%d)", cfg.maxfiles), "Magic Names..."];
cmd = uifc.list(WIN_ACT|WIN_ORG|WIN_MID, "FREQIT Options", opts, ctx);
cmd = uifc.list(WIN_ACT|WIN_ORG|WIN_MID|WIN_ESC, "FREQIT Options", opts, ctx);
switch(cmd) {
case 0: // Dirs
edit_dirs(cfg.dirs);
......@@ -206,11 +206,9 @@ function main()
case -1: // Done
switch(uifc.list(WIN_ACT|WIN_MID, 'Save File', ['Yes', 'No'])) {
case 0:
uifc.bail();
cfg.save();
break;
case 1:
uifc.bail();
break;
case -1:
cmd = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment