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

Move "spinning cursor at pause prompt" from node to system config

From SCFG->Nodes ... Toggle Options to SCFG->System->Toggle Options

And from a bit flag in node_misc to its own bool member of scfg_t.
parent 9081af2a
Branches
Tags
1 merge request!455Update branch with changes from master
......@@ -118,6 +118,7 @@ if(node_settings & NM_LOGON_P)
cnf.login |= LOGIN_PWPROMPT;
if(!(node_settings & NM_NO_NUM))
cnf.login |= LOGIN_USERNUM;
cnf.spinning_pause_prompt = (node_settings & NM_NOPAUSESPIN) ? "false" : "true";
for(var i in cnf.validation_set)
ini.iniSetObject("valset:" + i, cnf.validation_set[i]);
......
......@@ -438,7 +438,7 @@ bool sbbs_t::pause(bool set_abort)
bputs(text[Pause]);
len = bstrlen(text[Pause]);
if(sys_status&SS_USERON && !(useron.misc&(HTML|WIP|NOPAUSESPIN))
&& !(cfg.node_misc&NM_NOPAUSESPIN))
&& cfg.spinning_pause_prompt)
l|=K_SPIN;
ch=getkey(l);
if(pause_hotspot) {
......
......@@ -238,8 +238,6 @@ void node_cfg()
done=0;
while(!done) {
i=0;
snprintf(opt[i++], MAX_OPLN, "%-27.27s%s","Spinning Pause Prompt"
,cfg.node_misc&NM_NOPAUSESPIN ? "No":"Yes");
snprintf(opt[i++], MAX_OPLN, "%-27.27s%s","Keep Node File Open"
,cfg.node_misc&NM_CLOSENODEDAB ? "No":"Yes");
......@@ -258,25 +256,6 @@ void node_cfg()
done=1;
break;
case 0:
i=cfg.node_misc&NM_NOPAUSESPIN ? 1:0;
uifc.helpbuf=
"`Spinning Pause Prompt:`\n"
"\n"
"If you want to display a spinning cursor at the [Hit a key] prompt,\n"
"set this option to `Yes`.\n"
;
i=uifc.list(WIN_MID|WIN_SAV,0,10,0,&i,0
,"Spinning Cursor at Pause Prompt",uifcYesNoOpts);
if(i==0 && cfg.node_misc&NM_NOPAUSESPIN) {
cfg.node_misc&=~NM_NOPAUSESPIN;
uifc.changes=1;
}
else if(i==1 && !(cfg.node_misc&NM_NOPAUSESPIN)) {
cfg.node_misc|=NM_NOPAUSESPIN;
uifc.changes=1;
}
break;
case 1:
i=cfg.node_misc&NM_CLOSENODEDAB ? 1:0;
uifc.helpbuf=
"`Keep Node File Open:`\n"
......
......@@ -1755,6 +1755,8 @@ void sys_cfg(void)
,cfg.sys_misc&SM_NONODELIST ? "No" : "Yes");
snprintf(opt[i++], MAX_OPLN, "%-35s%s","Mouse Hot-spots in Menus/Prompts"
,cfg.sys_misc&SM_MOUSE_HOT ? "Yes" : "No");
snprintf(opt[i++], MAX_OPLN, "%-35s%s","Spinning Cursor at Pause Prompts"
,cfg.spinning_pause_prompt ? "Yes" : "No");
opt[i][0]=0;
uifc.helpbuf=
"`System Toggle Options:`\n"
......@@ -1919,6 +1921,20 @@ void sys_cfg(void)
cfg.sys_misc |= SM_MOUSE_HOT;
}
break;
case 10:
i=cfg.spinning_pause_prompt ? 0:1;
uifc.helpbuf=
"`Spinning Cursor at Pause Prompts:`\n"
"\n"
"If you want to display a spinning cursor at the [Hit a key] prompt,\n"
"set this option to `Yes`.\n"
;
i=uifc.list(WIN_MID|WIN_SAV,0,10,0,&i,0
,"Spinning Cursor at Pause Prompts",uifcYesNoOpts);
if(i >= 0)
cfg.spinning_pause_prompt = !cfg.spinning_pause_prompt;
break;
}
}
break;
......
......@@ -488,6 +488,7 @@ typedef struct
char node_daily[LEN_CMD+1]; /* Name of node's daily event */
uint32_t node_misc; /* Misc bits for node setup */
bool spinning_pause_prompt;
uint16_t valuser; /* User validation mail goes to */
uint16_t erruser; /* User error messages goes to */
uchar errlevel; /* Log level threshold to notify user (erruser) */
......
......@@ -123,6 +123,7 @@ bool read_main_cfg(scfg_t* cfg, char* error, size_t maxerrlen)
cfg->ctrlkey_passthru = iniGetInteger(ini, ROOT_SECTION, "ctrlkey_passthru", 0);
cfg->max_getkey_inactivity = (uint)iniGetDuration(ini, ROOT_SECTION, "max_getkey_inactivity", 300);
cfg->inactivity_warn = (uchar)iniGetUInteger(ini, ROOT_SECTION, "inactivity_warn", 75);
cfg->spinning_pause_prompt = iniGetBool(ini, ROOT_SECTION, "spinning_pause_prompt", true);
cfg->user_backup_level = iniGetUInteger(ini, ROOT_SECTION, "user_backup_level", 5);
cfg->mail_backup_level = iniGetUInteger(ini, ROOT_SECTION, "mail_backup_level", 5);
......
......@@ -143,6 +143,7 @@ bool write_main_cfg(scfg_t* cfg)
iniSetHexInt(&ini, ROOT_SECTION, "ctrlkey_passthru", cfg->ctrlkey_passthru, NULL);
iniSetDuration(&ini, ROOT_SECTION, "max_getkey_inactivity", cfg->max_getkey_inactivity, NULL);
iniSetUInteger(&ini, ROOT_SECTION, "inactivity_warn", cfg->inactivity_warn, NULL);
iniSetBool(&ini, ROOT_SECTION, "spinning_pause_prompt", cfg->spinning_pause_prompt, NULL);
iniSetUInteger(&ini, ROOT_SECTION, "user_backup_level", cfg->user_backup_level, NULL);
iniSetUInteger(&ini, ROOT_SECTION, "mail_backup_level", cfg->mail_backup_level, NULL);
iniSetUInteger(&ini, ROOT_SECTION, "config_backup_level", cfg->config_backup_level, NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment