Skip to content
Snippets Groups Projects
Commit ded7e89d authored by rswindell's avatar rswindell
Browse files

Time-saving measures when adding subs to a QWKnet hub:

- auto-increment the next sub position
- save and auto-increment the last conference number

This reduces the task of adding of subs to a QWKnet hub to just a bunch of
jamming on the ENTER key (usually).
parent f4c8a4ed
No related branches found
No related tags found
No related merge requests found
......@@ -152,6 +152,8 @@ uint getsub(void)
j=uifc.list(WIN_RHT|WIN_BOT|WIN_SAV,0,0,45,&sub_dflt,&sub_bar,str,opt);
if(j==-1)
continue;
sub_dflt++;
sub_bar++;
return(subnum[j]);
}
}
......@@ -1082,7 +1084,7 @@ void qhub_sub_edit(uint num)
"not support ANSI escape sequences in messages (or you're not sure), set\n"
"this option to `Strip out`.\n"
;
unsigned last_conf_num = 0;
k=0;
while(1) {
unsigned opts = 0;
......@@ -1124,10 +1126,15 @@ void qhub_sub_edit(uint num)
if((l=getsub())==-1)
continue;
uifc.helpbuf=qwk_conf_num_help;
if(last_conf_num)
SAFEPRINTF(str, "%u", last_conf_num + 1);
else
str[0]=0;
if(uifc.input(WIN_MID|WIN_SAV,0,0
,"Conference Number on Hub"
,str,5,K_NUMBER)<1)
,str,5,K_EDIT|K_NUMBER)<1)
continue;
last_conf_num = atoi(str);
strcpy(opt[0],"Strip out");
strcpy(opt[1],"Leave in");
strcpy(opt[2],"Expand to ANSI");
......@@ -1137,7 +1144,7 @@ void qhub_sub_edit(uint num)
if((m=uifc.list(WIN_MID|WIN_SAV,0,0,0,&m,0
,"Ctrl-A Codes",opt))==-1)
continue;
if(!new_qhub_sub(cfg.qhub[num], j, cfg.sub[l], atoi(str)))
if(!new_qhub_sub(cfg.qhub[num], j, cfg.sub[l], last_conf_num))
continue;
if(!m)
cfg.qhub[num]->mode[j]=QHUB_STRIP;
......@@ -1146,6 +1153,8 @@ void qhub_sub_edit(uint num)
else
cfg.qhub[num]->mode[j]=QHUB_EXPCTLA;
uifc.changes=1;
k++;
bar++;
continue;
}
if((j&MSK_ON)==MSK_DEL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment