From 23fa1b6a0da1a194153e76617915a530c500d367 Mon Sep 17 00:00:00 2001 From: Ianos Gnatiuc Date: Wed, 12 Oct 2005 22:11:35 +0000 Subject: [PATCH] Added LocationDelimiter config file token --- cfgs/config/advanced.cfg | 3 +++ cfgs/config/advanced.rus | 4 ++++ docs/notework.txt | 3 +++ golded3/gccfgg.cpp | 1 + golded3/gccfgg.h | 1 + golded3/gccfgg0.cpp | 1 + golded3/gccfgg5.cpp | 8 ++++++++ golded3/gcprot.h | 1 + golded3/gecfgg.h | 1 + golded3/geview.cpp | 2 +- 10 files changed, 24 insertions(+), 1 deletion(-) diff --git a/cfgs/config/advanced.cfg b/cfgs/config/advanced.cfg index 303fd3e..9677497 100644 --- a/cfgs/config/advanced.cfg +++ b/cfgs/config/advanced.cfg @@ -248,6 +248,9 @@ DispPmFirst Yes ;DispHdrLocation No DispHdrLocation Yes +// This separate sity names in netmail areas +;LocationDelimiter " | " + // Substitutions for the city name retrieved from nodelist to display in // message header delimeter line. May be used to show national-language // names of the nodes cities. diff --git a/cfgs/config/advanced.rus b/cfgs/config/advanced.rus index 08fa989..67ef825 100644 --- a/cfgs/config/advanced.rus +++ b/cfgs/config/advanced.rus @@ -220,6 +220,10 @@ DispPmFirst Yes ;DispHdrLocation No DispHdrLocation Yes +// Этим можно задать разделитель между городами отправителя и получателя +// в нетмейл областях. +;LocationDelimiter " | " + // Подстановка названий городов для показа в строке-разделителе заголовка // и тела сообщения. Можно использовать для показа русских названий городов. // Имеет смысл только при указании DispHdrLocation Yes. diff --git a/docs/notework.txt b/docs/notework.txt index a89aed6..140e5eb 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,9 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ ++ Added LocationDelimiter "delim" config file token that separate + city names in netmail areas. + + LocationAlias is case insensitive now. + Macro '@widepid' contains platform ID again. diff --git a/golded3/gccfgg.cpp b/golded3/gccfgg.cpp index becf00a..6626e03 100644 --- a/golded3/gccfgg.cpp +++ b/golded3/gccfgg.cpp @@ -739,6 +739,7 @@ CfgGed::CfgGed() { internetviagate = false; keybmode = KEYB_POLL; logformat = 0; + locationdelimiter = " \x1A "; menumarked = MODE_DONT; menunextarea = YES; msglistdate = MSGLISTDATE_WRITTEN; diff --git a/golded3/gccfgg.h b/golded3/gccfgg.h index 5c5df9c..2b6cbc6 100644 --- a/golded3/gccfgg.h +++ b/golded3/gccfgg.h @@ -240,6 +240,7 @@ const word CRC_KLUDGE = 0xA600; const word CRC_KLUDGECHRS = 0x0EEF; const word CRC_LOADLANGUAGE = 0x9F1B; const word CRC_LOCATIONALIAS = 0x1B5F; +const word CRC_LOCATIONDELIMITER= 0x5083; const word CRC_LOGFILE = 0x8ACE; const word CRC_LOGFORMAT = 0x9E51; const word CRC_LOGLEVEL = 0xCF59; diff --git a/golded3/gccfgg0.cpp b/golded3/gccfgg0.cpp index a2eacd0..ef157ac 100644 --- a/golded3/gccfgg0.cpp +++ b/golded3/gccfgg0.cpp @@ -412,6 +412,7 @@ SwitchL: switch(crc) { case CRC_LOADLANGUAGE : CfgLoadlanguage (); break; case CRC_LOCATIONALIAS : CfgLocationalias (); break; + case CRC_LOCATIONDELIMITER: CfgLocationdelimiter(); break; case CRC_LOGFILE : CfgLogfile (); break; case CRC_LOGFORMAT : CfgLogformat (); break; default : found = false; diff --git a/golded3/gccfgg5.cpp b/golded3/gccfgg5.cpp index 70c5e34..97fbc66 100644 --- a/golded3/gccfgg5.cpp +++ b/golded3/gccfgg5.cpp @@ -331,6 +331,14 @@ void CfgLocationalias() // ------------------------------------------------------------------ +void CfgLocationdelimiter() +{ + StripQuotes(val); + CFG->locationdelimiter = val; +} + +// ------------------------------------------------------------------ + void CfgLogfile() { strcpy(CFG->logfile, val); diff --git a/golded3/gcprot.h b/golded3/gcprot.h index 2528502..43e1d0b 100644 --- a/golded3/gcprot.h +++ b/golded3/gcprot.h @@ -230,6 +230,7 @@ void CfgKludge (); void CfgKludgechrs (); void CfgLoadlanguage (); void CfgLocationalias (); +void CfgLocationdelimiter(); void CfgLogfile (); void CfgLogformat (); void CfgLookupecho (); diff --git a/golded3/gecfgg.h b/golded3/gecfgg.h index ba9a7d5..f5bf2bb 100644 --- a/golded3/gecfgg.h +++ b/golded3/gecfgg.h @@ -256,6 +256,7 @@ public: gstrarray kludge; Path loadlanguage; GStrBag2 locationalias; + std::string locationdelimiter; Path logfile; // goldedlog; int logformat; std::vector mailinglist; diff --git a/golded3/geview.cpp b/golded3/geview.cpp index 4ded54c..148ea87 100644 --- a/golded3/geview.cpp +++ b/golded3/geview.cpp @@ -335,7 +335,7 @@ void GMsgHeaderView::Paint() { { std::string loc2; LookupNodeLocation(msg, loc2, LOOK_CITY2); - if (loc.length()) loc += " | " + loc2; + if (loc.length()) loc += CFG->locationdelimiter + loc2; } if (loc.length())