DispHdrLocation settings changed to No/Yes/Right/Center

This commit is contained in:
Ianos Gnatiuc
2005-10-26 08:06:02 +00:00
parent f97fff8524
commit 58f5e0332f
7 changed files with 14 additions and 6 deletions

View File

@@ -712,7 +712,7 @@ CfgGed::CfgGed() {
ctrlinfonews = 0;
dispareano = true;
dispattachsize = ATTACH_KBYTES;
disphdrlocation = false;
disphdrlocation = NO;
displistcursor = NO;
dispmargin = 0;
dispmsgsize = DISPMSGSIZE_BYTES;

View File

@@ -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;
}
// ------------------------------------------------------------------

View File

@@ -201,7 +201,7 @@ public:
int ctrlinfonews;
int dispareano;
int dispattachsize;
bool disphdrlocation;
int disphdrlocation;
PosLen disphdrdateset;
PosLen disphdrnameset;
PosLen disphdrnodeset;

View File

@@ -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());
}
}