From 58f5e0332f06264f3a4c3afb1987fd4c490ab489 Mon Sep 17 00:00:00 2001 From: Ianos Gnatiuc Date: Wed, 26 Oct 2005 08:06:02 +0000 Subject: [PATCH] DispHdrLocation settings changed to No/Yes/Right/Center --- cfgs/config/advanced.cfg | 2 +- cfgs/config/advanced.rus | 2 +- docs/notework.txt | 2 ++ golded3/gccfgg.cpp | 2 +- golded3/gccfgg2.cpp | 7 ++++++- golded3/gecfgg.h | 2 +- golded3/geview.cpp | 3 ++- 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cfgs/config/advanced.cfg b/cfgs/config/advanced.cfg index edb30ac..92872ed 100644 --- a/cfgs/config/advanced.cfg +++ b/cfgs/config/advanced.cfg @@ -247,7 +247,7 @@ DispPmFirst Yes // Nodelist is required for this feature. If some nodelist is omitted then // Golded+ will display warning at reading each message. // (Default:No) -;DispHdrLocation No +;DispHdrLocation No/Yes/Right/Center DispHdrLocation Yes // This separate sity names in netmail areas diff --git a/cfgs/config/advanced.rus b/cfgs/config/advanced.rus index cb28789..c57f2cf 100644 --- a/cfgs/config/advanced.rus +++ b/cfgs/config/advanced.rus @@ -220,7 +220,7 @@ DispPmFirst Yes // нодлистов/пойнтлистов отсутствует, Golded+ будет при просмотре каждого // сообщения выводить информацию об отсутсвии нодлиста. // (Значение по умолчанию: No) -;DispHdrLocation No +;DispHdrLocation No/Yes/Right/Center DispHdrLocation Yes // Этим можно задать разделитель между городами отправителя и получателя diff --git a/docs/notework.txt b/docs/notework.txt index b1ae2cf..8a12c33 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,8 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ ++ DispHdrLocation settings changed to No/Yes/Right/Center. Right == Yes. + + Added new macros: @pad{FAN}{T} Where: F - a fill char, that will be used when length(T) < N diff --git a/golded3/gccfgg.cpp b/golded3/gccfgg.cpp index c536828..78b46c6 100644 --- a/golded3/gccfgg.cpp +++ b/golded3/gccfgg.cpp @@ -712,7 +712,7 @@ CfgGed::CfgGed() { ctrlinfonews = 0; dispareano = true; dispattachsize = ATTACH_KBYTES; - disphdrlocation = false; + disphdrlocation = NO; displistcursor = NO; dispmargin = 0; dispmsgsize = DISPMSGSIZE_BYTES; diff --git a/golded3/gccfgg2.cpp b/golded3/gccfgg2.cpp index 61c3d49..2f66052 100644 --- a/golded3/gccfgg2.cpp +++ b/golded3/gccfgg2.cpp @@ -451,7 +451,12 @@ void CfgDisphdrdateset() { void CfgDisphdrlocation() { - CFG->disphdrlocation = make_bool(GetYesno(val)); + if (strieql("RIGHT", val)) + CFG->disphdrlocation = TRIGHT; + else if (strieql("CENTER", val)) + CFG->disphdrlocation = TCENTER; + else + CFG->disphdrlocation = GetYesno(val) ? TRIGHT : NO; } // ------------------------------------------------------------------ diff --git a/golded3/gecfgg.h b/golded3/gecfgg.h index c99b7c1..9288f17 100644 --- a/golded3/gecfgg.h +++ b/golded3/gecfgg.h @@ -201,7 +201,7 @@ public: int ctrlinfonews; int dispareano; int dispattachsize; - bool disphdrlocation; + int disphdrlocation; PosLen disphdrdateset; PosLen disphdrnameset; PosLen disphdrnodeset; diff --git a/golded3/geview.cpp b/golded3/geview.cpp index 8ca392b..f5140c1 100644 --- a/golded3/geview.cpp +++ b/golded3/geview.cpp @@ -341,7 +341,8 @@ void GMsgHeaderView::Paint() { if (loc.length()) { loc += " "; - int pos = window.width() - loc.length() - 1; + int pos = window.width() - loc.length(); + pos = (CFG->disphdrlocation == TCENTER) ? pos/2 : pos-1; window.prints(5, pos, location_color, loc.c_str()); } }