SEEN-BY invalidation fix, FWD* translation fix

This commit is contained in:
Alexander S. Aganichev 2003-04-28 10:16:40 +00:00
parent 5643070f87
commit 60b72dfbdc
4 changed files with 23 additions and 11 deletions

View File

@ -12,6 +12,12 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ 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 - GoldED+ should now properly prepend data/subs path to the Synchronet
bases, so copying of msgs.cnf to that directory should not be done bases, so copying of msgs.cnf to that directory should not be done
anymore in order to make Synchronet areafile reader working. anymore in order to make Synchronet areafile reader working.

View File

@ -377,8 +377,11 @@ void DoKludges(int mode, GMsg* msg, int kludges) {
// The FWD* kludges // The FWD* kludges
if(_use_fwd) { if(_use_fwd) {
int _xlat_level = CharTable ? (CharTable->level ? CharTable->level : 2) : 0;
if(*msg->fwdfrom) { 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 = AddKludge(line, buf);
line->kludge = GKLUD_FWD; line->kludge = GKLUD_FWD;
} }
@ -388,7 +391,8 @@ void DoKludges(int mode, GMsg* msg, int kludges) {
line->kludge = GKLUD_FWD; line->kludge = GKLUD_FWD;
} }
if(*msg->fwdto) { 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 = AddKludge(line, buf);
line->kludge = GKLUD_FWD; line->kludge = GKLUD_FWD;
} }
@ -398,7 +402,8 @@ void DoKludges(int mode, GMsg* msg, int kludges) {
line->kludge = GKLUD_FWD; line->kludge = GKLUD_FWD;
} }
if(*msg->fwdsubj) { 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 = AddKludge(line, buf);
line->kludge = GKLUD_FWD; line->kludge = GKLUD_FWD;
} }

View File

@ -432,7 +432,7 @@ char* strxmimecpy(char* dest, const char* source, int level, int size, bool dete
if(detect) { if(detect) {
table = LoadCharset(NULL, NULL, 1); table = LoadCharset(NULL, NULL, 1);
level = LoadCharset(charset, CFG->xlatlocalset); level = LoadCharset(charset, CFG->xlatlocalset);
if (not level) { if(not level) {
level = LoadCharset(AA->Xlatimport(), CFG->xlatlocalset); level = LoadCharset(AA->Xlatimport(), CFG->xlatlocalset);
} }
} }
@ -3088,9 +3088,6 @@ void InvalidateControlInfo(GMsg* msg) {
Line* line = msg->lin; Line* line = msg->lin;
char buf[256]; char buf[256];
// This required if we change tearline / origin lines
ScanKludges(msg, 0);
while(line) { while(line) {
if(not (line->type & (GLINE_TEAR | GLINE_ORIG))) { if(not (line->type & (GLINE_TEAR | GLINE_ORIG))) {
@ -3117,6 +3114,8 @@ void InvalidateControlInfo(GMsg* msg) {
if(stricmp(buf, line->txt.c_str())) { if(stricmp(buf, line->txt.c_str())) {
line->type &= ~GLINE_KLUDGE; line->type &= ~GLINE_KLUDGE;
line->kludge = 0;
line->color = C_READW;
line->txt = buf; line->txt = buf;
} }

View File

@ -628,6 +628,8 @@ static void MakeMsg2(int& mode, int& status, int& forwstat, int& topline, GMsg*
AA->adat->viewquote = adat_viewquote; AA->adat->viewquote = adat_viewquote;
msg->attr.pos0(); msg->attr.pos0();
InvalidateControlInfo(msg);
if(not savedirect) { if(not savedirect) {
HeaderView->Use(AA, msg); HeaderView->Use(AA, msg);
HeaderView->Paint(); HeaderView->Paint();
@ -648,8 +650,6 @@ static void MakeMsg2(int& mode, int& status, int& forwstat, int& topline, GMsg*
} while(status == MODE_VIEW); } while(status == MODE_VIEW);
} }
InvalidateControlInfo(msg);
if(status == MODE_SAVE) if(status == MODE_SAVE)
DoCrosspost(msg, post_xparea); DoCrosspost(msg, post_xparea);
} }
@ -767,6 +767,8 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
msg->messageid = NULL; msg->messageid = NULL;
msg->inreplyto = NULL; msg->inreplyto = NULL;
msg->references = NULL; msg->references = NULL;
if(CurrArea != OrigArea)
AA->SetXlatimport(AL.AreaIdToPtr(OrigArea)->Xlatimport());
msg->TextToLines(CFG->dispmargin-1, true, false); msg->TextToLines(CFG->dispmargin-1, true, false);
msg->msgid.reset(); msg->msgid.reset();
*msg->iorig = NUL; *msg->iorig = NUL;
@ -973,7 +975,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
msg->fwdorig = msg->orig; msg->fwdorig = msg->orig;
strcpy(msg->fwdto, msg->To()); strcpy(msg->fwdto, msg->To());
msg->fwddest = msg->dest; msg->fwddest = msg->dest;
strxcpy(msg->fwdsubj, msg->re, sizeof(msg->fwdsubj)); strxcpy(msg->fwdsubj, msg->re, sizeof(Subj));
Area* fwdarea = AL.AreaIdToPtr(OrigArea); Area* fwdarea = AL.AreaIdToPtr(OrigArea);
strcpy(msg->fwdarea, fwdarea->isecho() ? fwdarea->echoid() : ""); strcpy(msg->fwdarea, fwdarea->isecho() ? fwdarea->echoid() : "");
strcpy(msg->fwdmsgid, msg->msgids); strcpy(msg->fwdmsgid, msg->msgids);