From 60b72dfbdc790c7036bf90f116268aa7db68316e Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Mon, 28 Apr 2003 10:16:40 +0000 Subject: [PATCH] SEEN-BY invalidation fix, FWD* translation fix --- docs/notework.txt | 6 ++++++ golded3/gectrl.cpp | 11 ++++++++--- golded3/geline.cpp | 9 ++++----- golded3/gepost.cpp | 8 +++++--- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index 844d6a1..164e31f 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,12 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- Fixed FWD kludges encoding. + +- Hooks to the delete and move messages added for the read-only areas. + +- Fixed SEEN-BY invalidation. + - GoldED+ should now properly prepend data/subs path to the Synchronet bases, so copying of msgs.cnf to that directory should not be done anymore in order to make Synchronet areafile reader working. diff --git a/golded3/gectrl.cpp b/golded3/gectrl.cpp index 1dcee5f..6bc4627 100644 --- a/golded3/gectrl.cpp +++ b/golded3/gectrl.cpp @@ -377,8 +377,11 @@ void DoKludges(int mode, GMsg* msg, int kludges) { // The FWD* kludges if(_use_fwd) { + int _xlat_level = CharTable ? (CharTable->level ? CharTable->level : 2) : 0; + if(*msg->fwdfrom) { - sprintf(buf, "\001FWDFROM %s", msg->fwdfrom); + strcpy(buf, "\001FWDFROM "); + XlatStr(buf + 9, msg->fwdfrom, _xlat_level, CharTable); line = AddKludge(line, buf); line->kludge = GKLUD_FWD; } @@ -388,7 +391,8 @@ void DoKludges(int mode, GMsg* msg, int kludges) { line->kludge = GKLUD_FWD; } if(*msg->fwdto) { - sprintf(buf, "\001FWDTO %s", msg->fwdto); + strcpy(buf, "\001FWDTO "); + XlatStr(buf + 7, msg->fwdto, _xlat_level, CharTable); line = AddKludge(line, buf); line->kludge = GKLUD_FWD; } @@ -398,7 +402,8 @@ void DoKludges(int mode, GMsg* msg, int kludges) { line->kludge = GKLUD_FWD; } if(*msg->fwdsubj) { - sprintf(buf, "\001FWDSUBJ %s", msg->fwdsubj); + strcpy(buf, "\001FWDSUBJ "); + XlatStr(buf + 9, msg->fwdsubj, _xlat_level, CharTable); line = AddKludge(line, buf); line->kludge = GKLUD_FWD; } diff --git a/golded3/geline.cpp b/golded3/geline.cpp index a577846..f566e10 100644 --- a/golded3/geline.cpp +++ b/golded3/geline.cpp @@ -432,7 +432,7 @@ char* strxmimecpy(char* dest, const char* source, int level, int size, bool dete if(detect) { table = LoadCharset(NULL, NULL, 1); level = LoadCharset(charset, CFG->xlatlocalset); - if (not level) { + if(not level) { level = LoadCharset(AA->Xlatimport(), CFG->xlatlocalset); } } @@ -445,7 +445,7 @@ char* strxmimecpy(char* dest, const char* source, int level, int size, bool dete else LoadCharset(CFG->xlatcharset[table].imp, CFG->xlatcharset[table].exp); } - + strxcpy(dest, buf, size); return dest; @@ -3088,9 +3088,6 @@ void InvalidateControlInfo(GMsg* msg) { Line* line = msg->lin; char buf[256]; - // This required if we change tearline / origin lines - ScanKludges(msg, 0); - while(line) { if(not (line->type & (GLINE_TEAR | GLINE_ORIG))) { @@ -3117,6 +3114,8 @@ void InvalidateControlInfo(GMsg* msg) { if(stricmp(buf, line->txt.c_str())) { line->type &= ~GLINE_KLUDGE; + line->kludge = 0; + line->color = C_READW; line->txt = buf; } diff --git a/golded3/gepost.cpp b/golded3/gepost.cpp index a9768c0..f3fafe8 100644 --- a/golded3/gepost.cpp +++ b/golded3/gepost.cpp @@ -628,6 +628,8 @@ static void MakeMsg2(int& mode, int& status, int& forwstat, int& topline, GMsg* AA->adat->viewquote = adat_viewquote; msg->attr.pos0(); + InvalidateControlInfo(msg); + if(not savedirect) { HeaderView->Use(AA, msg); HeaderView->Paint(); @@ -648,8 +650,6 @@ static void MakeMsg2(int& mode, int& status, int& forwstat, int& topline, GMsg* } while(status == MODE_VIEW); } - InvalidateControlInfo(msg); - if(status == MODE_SAVE) DoCrosspost(msg, post_xparea); } @@ -767,6 +767,8 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) { msg->messageid = NULL; msg->inreplyto = NULL; msg->references = NULL; + if(CurrArea != OrigArea) + AA->SetXlatimport(AL.AreaIdToPtr(OrigArea)->Xlatimport()); msg->TextToLines(CFG->dispmargin-1, true, false); msg->msgid.reset(); *msg->iorig = NUL; @@ -973,7 +975,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) { msg->fwdorig = msg->orig; strcpy(msg->fwdto, msg->To()); msg->fwddest = msg->dest; - strxcpy(msg->fwdsubj, msg->re, sizeof(msg->fwdsubj)); + strxcpy(msg->fwdsubj, msg->re, sizeof(Subj)); Area* fwdarea = AL.AreaIdToPtr(OrigArea); strcpy(msg->fwdarea, fwdarea->isecho() ? fwdarea->echoid() : ""); strcpy(msg->fwdmsgid, msg->msgids);