Commit b677fa38 authored by rswindell's avatar rswindell
Browse files

Allow the P_AUTO_UTF8 mode to be set in a sub's pmode setting (for auto-detect

of UTF-8 message text).
Remember the "bar" position of sub toggle options (now that they scroll).
parent b87338ca
......@@ -121,7 +121,7 @@ void remove_sub(scfg_t* cfg, unsigned subnum, bool cut)
void sub_cfg(uint grpnum)
{
static int dflt,tog_dflt,opt_dflt,net_dflt,adv_dflt,bar;
static int dflt,tog_dflt,tog_bar,opt_dflt,net_dflt,adv_dflt,bar;
char str[128],str2[128],done=0,code[128];
char path[MAX_PATH+1];
char data_dir[MAX_PATH+1];
......@@ -559,6 +559,8 @@ void sub_cfg(uint grpnum)
,cfg.sub[i]->misc&SUB_LZH ? "Yes" : "No");
sprintf(opt[n++],"%-27.27s%s","Extra Attribute Codes"
,cfg.sub[i]->pmode&P_NOXATTRS ? "No" : "Yes");
sprintf(opt[n++],"%-27.27s%s","Auto-detect UTF-8 Msgs"
,cfg.sub[i]->pmode&P_AUTO_UTF8 ? "Yes" : "No");
sprintf(opt[n++],"%-27.27s%s","Template for New Subs"
,cfg.sub[i]->misc&SUB_TEMPLATE ? "Yes" : "No");
......@@ -569,7 +571,7 @@ void sub_cfg(uint grpnum)
"This menu allows you to toggle certain options for the selected\n"
"sub-board between two or more settings, such as `Yes` and `No`.\n"
;
n=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,1,36,&tog_dflt,0
n=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,1,36,&tog_dflt, &tog_bar
,"Toggle Options",opt);
if(n==-1)
break;
......@@ -1053,6 +1055,30 @@ void sub_cfg(uint grpnum)
}
break;
case 16:
n=(cfg.sub[i]->pmode&P_AUTO_UTF8) ? 0:1;
uifc.helpbuf=
"`Automatically Detect UTF-8 Message Text:`\n"
"\n"
"Set this option to `Yes` to enable automatic detection of UTF-8 message\n"
"text - no \"`charset=utf-8`\" need be specified by the sender.\n"
"\n"
"Note: Setting this option to `Yes` does not enable automatic detection\n"
"of UTF-8 header field values (e.g. to, from, subject)."
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Automatically Detect UTF-8 Message Text",uifcYesNoOpts);
if(n==-1)
break;
if(n == 0 && !(cfg.sub[i]->pmode&P_AUTO_UTF8)) {
uifc.changes = TRUE;
cfg.sub[i]->pmode ^= P_AUTO_UTF8;
}
else if(n == 1 && (cfg.sub[i]->pmode&P_AUTO_UTF8)) {
uifc.changes = TRUE;
cfg.sub[i]->pmode ^= P_AUTO_UTF8;
}
break;
case 17:
n=(cfg.sub[i]->misc&SUB_TEMPLATE) ? 0:1;
uifc.helpbuf=
"`Use this Sub-board as a Template for New Subs:`\n"
......
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