usesoftcrxlat config file token

This commit is contained in:
Ianos Gnatiuc
2005-10-04 22:43:15 +00:00
parent be049cff10
commit 77e4461a7d
14 changed files with 36 additions and 2 deletions

View File

@@ -787,6 +787,7 @@ CfgGed::CfgGed() {
useintl = true;
usepid = true;
usernameno = 0;
usesoftcrxlat = true;
usestylies = true;
usetzutc = false;
viewhidden = false;

View File

@@ -382,6 +382,7 @@ const word CRC_USEPID = 0x2F68;
const word CRC_USERLIST = 0xE81A;
const word CRC_USERLISTFILE = 0xB749;
const word CRC_USERNAME = 0x1161;
const word CRC_USESOFTCRXLAT = 0x4285;
const word CRC_USETZUTC = 0x27C5;
const word CRC_UUDECODEPATH = 0x82A2;
const word CRC_VIEWHIDDEN = 0x021D;

View File

@@ -577,6 +577,7 @@ SwitchU:
case CRC_USERLIST : CfgUserlist (); break;
case CRC_USERLISTFILE : CfgUserlistfile (); break;
case CRC_USERNAME : CfgUsername (); break;
case CRC_USESOFTCRXLAT : CfgUsesoftcrxlat (); break;
case CRC_USETZUTC : CfgUsetzutc (); break;
case CRC_UUDECODEPATH : CfgUudecodepath (); break;
default : found = false;

View File

@@ -442,6 +442,17 @@ void CfgUsername() {
// ------------------------------------------------------------------
void CfgUsesoftcrxlat()
{
bool flag = GetYesno(val);
if (cfgingroup)
CFG->grp.AddItm(GRP_USESOFTCRXLAT, flag);
else
CFG->usesoftcrxlat = flag;
}
// ------------------------------------------------------------------
void CfgUsetzutc() {
bool flag = GetYesno(val);

View File

@@ -364,6 +364,7 @@ void CfgUsepid ();
void CfgUserlist ();
void CfgUserlistfile ();
void CfgUsername ();
void CfgUsesoftcrxlat ();
void CfgUsetzutc ();
void CfgUudecodepath ();
void CfgViewhidden ();

View File

@@ -358,6 +358,7 @@ public:
Path userlistfile; // goldedlst;
std::vector<Node> username;
int usernameno;
bool usesoftcrxlat;
bool usestylies;
bool usetzutc;
Path uudecodepath;

View File

@@ -119,7 +119,8 @@ int Area::LoadMsg(GMsg* msg, ulong msgno, int margin, int mode) {
void Area::SaveHdr(int mode, GMsg* msg) {
// Translate softcr to configured char
if(EDIT->SoftCrXlat()) {
if (adat->usesoftcrxlat && EDIT->SoftCrXlat())
{
strchg(msg->by, SOFTCR, EDIT->SoftCrXlat());
strchg(msg->to, SOFTCR, EDIT->SoftCrXlat());
strchg(msg->realby, SOFTCR, EDIT->SoftCrXlat());

View File

@@ -178,6 +178,7 @@ void Area::InitData() {
adat->usefwd = CFG->usefwd;
strcpy(adat->username.name, CFG->username.empty() ? "" : CFG->username[CFG->usernameno].name);
adat->username.addr = adat->aka.addr;
adat->usesoftcrxlat = CFG->usesoftcrxlat;
adat->usetzutc = CFG->usetzutc;
adat->viewhidden = CFG->viewhidden;
adat->viewkludge = CFG->viewkludge;
@@ -405,6 +406,7 @@ void Area::RandomizeData(int mode) {
SetAka(tmp);
}
CFG->grp.GetItm(GRP_USESOFTCRXLAT, adat->usesoftcrxlat);
CFG->grp.GetItm(GRP_USETZUTC, adat->usetzutc);
if(not mode) {

View File

@@ -262,7 +262,8 @@ void Area::SaveMsg(int mode, GMsg* msg) {
}
// Translate softcr to configured char
if(EDIT->SoftCrXlat()) {
if (adat->usesoftcrxlat && EDIT->SoftCrXlat())
{
strchg(msg->by, SOFTCR, EDIT->SoftCrXlat());
strchg(msg->to, SOFTCR, EDIT->SoftCrXlat());
strchg(msg->realby, SOFTCR, EDIT->SoftCrXlat());

View File

@@ -311,6 +311,7 @@ struct AreaData {
bool usearea;
int usefwd;
Node username;
bool usesoftcrxlat;
bool usetzutc;
IAdr whoto;
Path wtpl;