diff --git a/cfgs/config/advanced.cfg b/cfgs/config/advanced.cfg index 40925ef..ee8ebb7 100644 --- a/cfgs/config/advanced.cfg +++ b/cfgs/config/advanced.cfg @@ -634,6 +634,15 @@ REPLYLINK Direct ; Link directly to the original message. ;REPLYLINKLIST FAST ; Use only header/subfield data. REPLYLINKLIST FULL ; Use full msgbody, parsing kludges, origin etc. +// Show floating replylink threads (default: yes) +;ReplyLinkFloat No +ReplyLinkFloat Yes + +// For messages without replies show it's as replylink threads too +// (default: yes) +;ReplyLinkShowAlways No +ReplyLinkShowAlways Yes + ---------------------------------------------------------------------- -- CARBON COPY AND CROSSPOSTING diff --git a/cfgs/config/advanced.rus b/cfgs/config/advanced.rus index 8407c7c..5da88cf 100644 --- a/cfgs/config/advanced.rus +++ b/cfgs/config/advanced.rus @@ -704,6 +704,15 @@ ReplyLink Direct ; ;ReplyLinkList Fast ; Использовать только заголовок. ReplyLinkList Full ; Использовать полностью всё сообщение. +// Показывать плавающие треды (по умолчанию: yes) +;ReplyLinkFloat No +ReplyLinkFloat Yes + +// Показывать тред даже в том случае, когда у письма нет ответов +// (по умолчанию: yes) +;ReplyLinkShowAlways No +ReplyLinkShowAlways Yes + ---------------------------------------------------------------------- -- ЛИЧНАЯ ПОЧТА diff --git a/docs/notework.txt b/docs/notework.txt index ec99bef..94786a2 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,11 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ ++ New reply-linking features: show floating reply link threads and show + messages without replies in replylinking threads view. New config file + tokens: REPLYLINKFLOAT (yes/no), REPLYLINKSHOWALWAYS (yes/no). + (Patch from Ianos Gnatiuc 2:5030/830.17) + + New AKA matching feature: match for "From" field then (if not matched) match for "To" field. New config token AKAMATCHFROMTO (yes/no). (Patch from Ianos Gnatiuc 2:5030/830.17) diff --git a/docs/todowork.txt b/docs/todowork.txt index fe7dafc..4e063c5 100644 --- a/docs/todowork.txt +++ b/docs/todowork.txt @@ -43,11 +43,6 @@ To fix: * UUdecoder not 100% reliable: any volunteers for uulib maintaining? * Need some workarounds on -install feature under UNIX-like OS. -* Win32 (only when runned under Win9x) version does not support case - insensitive search of regexp's for high part of ASCII table. That's - a limitation of Microsoft C RTL, I can't do anything easy for that - but probably someday I provide a huge patch (I wonder if Microsoft - accept patches? =))... ______________________________________________________________________ Known wishes that not currently planned (any volunteers?): diff --git a/golded3/gccfgg.cpp b/golded3/gccfgg.cpp index 0360a78..6a706e5 100644 --- a/golded3/gccfgg.cpp +++ b/golded3/gccfgg.cpp @@ -753,7 +753,9 @@ CfgGed::CfgGed() { quotewraphard = false; ra2usersbbs = 0; replylink = REPLYLINK_DIRECT; + replylinkfloat = true; replylinklist = 0; + replylinkshowalways = true; screenblanker = 180; screenblankertype = BLANK_SLIDEWIN; screenmaxcol = 0; diff --git a/golded3/gccfgg.h b/golded3/gccfgg.h index 4f69b9a..5564ecb 100644 --- a/golded3/gccfgg.h +++ b/golded3/gccfgg.h @@ -306,7 +306,9 @@ const word CRC_RCVDISABLESCFM = 0xD3B2; const word CRC_REGISTERKEY = 0xF428; const word CRC_REGISTERNAME = 0x2CAF; const word CRC_REPLYLINK = 0x88A1; +const word CRC_REPLYLINKFLOAT = 0xA3EC; const word CRC_REPLYLINKLIST = 0x104F; +const word CRC_REPLYLINKSHOWALWAYS = 0x2BCD; const word CRC_ROBOTNAME = 0x7393; const word CRC_SCREENBLANKER = 0x5CF7; const word CRC_SCREENMAXCOL = 0xFFFC; diff --git a/golded3/gccfgg0.cpp b/golded3/gccfgg0.cpp index 5bc0c29..bc2c8d6 100644 --- a/golded3/gccfgg0.cpp +++ b/golded3/gccfgg0.cpp @@ -497,7 +497,9 @@ SwitchR: switch(crc) { case CRC_RA2USERSBBS : CfgRa2usersbbs (); break; case CRC_REPLYLINK : CfgReplylink (); break; + case CRC_REPLYLINKFLOAT : CfgReplylinkfloat (); break; case CRC_REPLYLINKLIST : CfgReplylinklist (); break; + case CRC_REPLYLINKSHOWALWAYS:CfgReplylinkshowalways();break; case CRC_ROBOTNAME : CfgRobotname (); break; default : found = false; } diff --git a/golded3/gccfgg7.cpp b/golded3/gccfgg7.cpp index 97e011e..5602faf 100644 --- a/golded3/gccfgg7.cpp +++ b/golded3/gccfgg7.cpp @@ -178,6 +178,13 @@ void CfgReplylink() { // ------------------------------------------------------------------ +void CfgReplylinkfloat() +{ + CFG->replylinkfloat = (0 != GetYesno(val)); +} + +// ------------------------------------------------------------------ + void CfgReplylinklist() { if(strieql(val, "Fast")) @@ -188,6 +195,12 @@ void CfgReplylinklist() { // ------------------------------------------------------------------ +void CfgReplylinkshowalways() +{ + CFG->replylinkshowalways = (0 != GetYesno(val)); +} +// ------------------------------------------------------------------ + void CfgRobotname(const char* v) { char* ptr = val = throw_strdup(v); @@ -287,7 +300,7 @@ void CfgScreensize() { // ------------------------------------------------------------------ void CfgSearchfor() { - + INam buf; strxcpy(buf, StripQuotes(val), sizeof(buf)); if(cfgingroup) @@ -444,7 +457,7 @@ void CfgSoupbadmsgs() { // ------------------------------------------------------------------ void CfgSoupemail() { - + strupr(strxcpy(CFG->soupemail, val, sizeof(Echo))); } diff --git a/golded3/gcprot.h b/golded3/gcprot.h index dcb09a4..afc6dac 100644 --- a/golded3/gcprot.h +++ b/golded3/gcprot.h @@ -292,7 +292,9 @@ void CfgQwkreplylinker (); void CfgQwktosslog (); void CfgRa2usersbbs (); void CfgReplylink (); +void CfgReplylinkfloat (); void CfgReplylinklist (); +void CfgReplylinkshowalways(); void CfgReplyto (); void CfgRobotname (); void CfgScreenblanker (); diff --git a/golded3/gealst.cpp b/golded3/gealst.cpp index 08f0c21..20fe9ab 100644 --- a/golded3/gealst.cpp +++ b/golded3/gealst.cpp @@ -540,6 +540,8 @@ void SelMaskPick::Run() { index = position = AL.mask; + replylinkfloat = CFG->replylinkfloat; + run_picker(); if(not aborted) diff --git a/golded3/gearea.cpp b/golded3/gearea.cpp index 6c12473..5d7688d 100644 --- a/golded3/gearea.cpp +++ b/golded3/gearea.cpp @@ -84,6 +84,7 @@ GPickArealist::GPickArealist() { pmscan = false; area_fuzidx = 0; + replylinkfloat = CFG->replylinkfloat; } diff --git a/golded3/gecfgg.h b/golded3/gecfgg.h index 25bd4fd..4858b4e 100644 --- a/golded3/gecfgg.h +++ b/golded3/gecfgg.h @@ -294,7 +294,9 @@ public: bool quotewraphard; int ra2usersbbs; // RA2; int replylink; + bool replylinkfloat; int replylinklist; + bool replylinkshowalways; gstrarray robotname; int screenblanker; // blanktime; int screenblankertype; diff --git a/golded3/gefile.cpp b/golded3/gefile.cpp index 6779797..b69da76 100644 --- a/golded3/gefile.cpp +++ b/golded3/gefile.cpp @@ -98,6 +98,7 @@ public: void gfileselect::open() { + replylinkfloat = CFG->replylinkfloat; display_page(); } diff --git a/golded3/gemlst.cpp b/golded3/gemlst.cpp index 5934087..987478c 100644 --- a/golded3/gemlst.cpp +++ b/golded3/gemlst.cpp @@ -97,6 +97,7 @@ public: memset(&msg, 0, sizeof(GMsg)); mlst = NULL; maximum_index = AA->Msgn.Count()-1; + replylinkfloat = CFG->replylinkfloat; }; ~GMsgList() { ResetMsg(&msg); @@ -684,7 +685,6 @@ private: GMsg msg; std::vector list; ThreadEntry t; - uint h_offset; void BuildThreadIndex(dword msgno); void recursive_build(ulong msgn, ulong rn, ulong level); @@ -702,7 +702,7 @@ public: void Run(); - GThreadlist() { memset(&msg, 0, sizeof(GMsg)); }; + GThreadlist() { memset(&msg, 0, sizeof(GMsg)); replylinkfloat = CFG->replylinkfloat; }; ~GThreadlist() { ResetMsg(&msg); }; }; @@ -930,6 +930,17 @@ void GThreadlist::print_line(uint idx, uint pos, bool isbar) { break; } + if (CFG->replylinkfloat && isbar) + { + int l1 = strlen(buf2); + int l2 = strlen(msg.By()); + + if ((l1 + l2) > tdlen) + new_hoffset = (l1 + l2)-tdlen+1; + else + new_hoffset = 0; + } + if((strlen(buf2) > h_offset) and (strlen(&buf2[h_offset]) < tdlen)) { strxcpy(buf, msg.By(), tdlen - strlen(&buf2[h_offset])); window.prints(pos, 8+strlen(&buf2[h_offset]), isbar ? sattr : attr, buf); @@ -1022,6 +1033,7 @@ void GThreadlist::BuildThreadIndex(dword msgn) { maximum_position = MinV((uint) list.size() - 1, (uint) ylen - 1); index = 0; h_offset = 0; + new_hoffset = 0; for(uint i = 0; ireplylinkshowalways && (list.size() <= 1)) return false; center(CFG->displistcursor); break; @@ -1194,7 +1206,7 @@ void GThreadlist::Run() { BuildThreadIndex(reader_msg->msgno); - if(list.size() > 1) + if(CFG->replylinkshowalways || (list.size() > 1)) run_picker(); else { w_info(LNG->NoThreadlist); diff --git a/golded3/geusrbse.cpp b/golded3/geusrbse.cpp index 4bb7cf6..c3d0c48 100644 --- a/golded3/geusrbse.cpp +++ b/golded3/geusrbse.cpp @@ -38,6 +38,7 @@ guserbase::guserbase() { long tries = 0; strcpy(fname, AddPath(CFG->goldpath, CFG->golduser)); + replylinkfloat = CFG->replylinkfloat; do { usrbase.open(fname, O_RDWR|O_CREAT|O_BINARY, SH_DENYNO, S_STDRW); @@ -506,7 +507,7 @@ bool guserbase::read_entry(uint idx, gusrbaseentry *ent) { clear_entry(ent); return false; } - else { + else { usrbase.lseek(idx*sizeof(gusrbaseentry)+sizeof(gusrbaseheader), SEEK_SET); usrbase.read(ent->macro, sizeof(ent->macro)); usrbase.read(ent->name, sizeof(ent->name)); @@ -600,7 +601,7 @@ void guserbase::update_screen(bool force) { need_update = false; } } - + // ------------------------------------------------------------------ @@ -634,7 +635,7 @@ bool guserbase::handle_key() { write_entry(nidx); index = nidx; } - unlock(); + unlock(); center(CFG->displistcursor); } break; @@ -719,7 +720,7 @@ bool guserbase::run(GMsg* msg, bool selectonly) { void guserbase::update_addressbook(GMsg* msg, bool reverse, bool force) { - Addr fidoaddr; + Addr fidoaddr; IAdr iaddr; INam name; @@ -960,7 +961,7 @@ bool lookup_addressbook(GMsg* msg, char* name, char* aka, bool browser) { return result; } - + // ------------------------------------------------------------------ void build_pseudo(GMsg* msg, bool direction) { @@ -972,7 +973,7 @@ void build_pseudo(GMsg* msg, bool direction) { p.build_pseudo(msg, strbtrim(msg->To()), AA->isinternet() ? msg->iaddr : msg->dest.make_string(buf)); else p.build_pseudo(msg, strbtrim(msg->By()), AA->isinternet() ? msg->iorig : msg->orig.make_string(buf), false); -} +} // ------------------------------------------------------------------ diff --git a/golded3/gmarea.h b/golded3/gmarea.h index 7e6e92e..1402b26 100644 --- a/golded3/gmarea.h +++ b/golded3/gmarea.h @@ -385,8 +385,8 @@ public: bool isscanned : 1; // TRUE if scanned bool ispmscanned : 1; // TRUE if pmscanned bool istossed : 1; // TRUE if msgs were tossed to this area - - + + // ---------------------------------------------------------------- // Access config data diff --git a/goldlib/gall/gwinpick.cpp b/goldlib/gall/gwinpick.cpp index 3ed7975..6b99443 100644 --- a/goldlib/gall/gwinpick.cpp +++ b/goldlib/gall/gwinpick.cpp @@ -49,6 +49,8 @@ gwinpick::gwinpick() { maximum_index = minimum_index = maximum_position = index = position = 0; aborted = listwrap = false; direction = 0; + replylinkfloat = 0; + } @@ -150,7 +152,7 @@ void gwinpick::cursor_pagedown() { while(not is_selectable(max_index)) --max_index; uint max_position = max_index - index + position; - + if(position < max_position) { if(index == max_index) { if(maximum_position < maximum_index) { @@ -313,6 +315,18 @@ void gwinpick::display_page() { uint n; + if (replylinkfloat) + { + if (h_offset == new_hoffset) + { + for (n=0; n<=maximum_position and n<=m; n++) + if (position == n) + print_line(index+n, n, true); + } + + h_offset = new_hoffset; + } + for(n=0; n<=maximum_position and n<=m; n++) print_line(index+n, n, (position == n)); @@ -486,6 +500,9 @@ int gwinpick::run_picker() { keyok = default_handle_key(); + if (replylinkfloat && (h_offset != new_hoffset)) + display_page(); + } while(keyok); #ifdef GOLD_MOUSE diff --git a/goldlib/gall/gwinpick.h b/goldlib/gall/gwinpick.h index 801d1c0..dea0c3b 100644 --- a/goldlib/gall/gwinpick.h +++ b/goldlib/gall/gwinpick.h @@ -56,6 +56,10 @@ protected: gkey key; bool keyok; + uint new_hoffset; + uint h_offset; + bool replylinkfloat; // in derived classes set this with CFG->replylinkfloat + // before call display_page() and run_picker() void cursor_up(); void cursor_down();