Skip to content
Snippets Groups Projects
Commit 985865eb authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Use the new thing to make "Save Changes?" things ATEXIT.

If ESC is pressed, clears the UIFC_XF_QUIT and aborts the exit.
Otherwise, continues exiting.

Not sure if there's anywhere else that needs the ATEXIT change to
avoid infinite exit loopage.
parent 4b16eedd
No related branches found
No related tags found
No related merge requests found
...@@ -385,7 +385,10 @@ void cfg_wizard(void) ...@@ -385,7 +385,10 @@ void cfg_wizard(void)
" digital man (rob)\n" " digital man (rob)\n"
); );
char* opts[] = { "Save Changes", "Discard Changes", NULL }; char* opts[] = { "Save Changes", "Discard Changes", NULL };
if(uifc.list(WIN_SAV | WIN_L2R | WIN_NOBRDR, 0, 14 ,0, NULL, NULL, NULL, opts) != 0) { int sc = uifc.list(WIN_SAV | WIN_L2R | WIN_NOBRDR | WIN_ATEXIT, 0, 14 ,0, NULL, NULL, NULL, opts);
if(sc != 0) {
if (sc == -1)
uifc.exit_flags &= ~UIFC_XF_QUIT;
stage = -1; stage = -1;
continue; continue;
} }
...@@ -1158,8 +1161,11 @@ int save_changes(int mode) ...@@ -1158,8 +1161,11 @@ int save_changes(int mode)
"these changes, select `No`. If you are not sure and want to review the\n" "these changes, select `No`. If you are not sure and want to review the\n"
"configuration before deciding, hit ~ ESC ~.\n" "configuration before deciding, hit ~ ESC ~.\n"
; ;
i=uifc.list(mode|WIN_SAV,0,0,0,&i,0,"Save Changes",uifcYesNoOpts); i=uifc.list(mode|WIN_SAV|WIN_ATEXIT,0,0,0,&i,0,"Save Changes",uifcYesNoOpts);
if(i!=-1) if (i == -1) {
uifc.exit_flags &= ~UIFC_XF_QUIT;
}
else
uifc.changes=0; uifc.changes=0;
return(i); return(i);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment