diff --git a/cfgs/config/goldlang.cfg b/cfgs/config/goldlang.cfg index 2f6159b..3cfee27 100644 --- a/cfgs/config/goldlang.cfg +++ b/cfgs/config/goldlang.cfg @@ -304,6 +304,7 @@ WT_SELECTACTION " Action " MI_FORWARDMESSAGE "F Forward Msg " MI_MOVEMESSAGE "M Move Msg " MI_COPYMESSAGE "C Copy Msg " +MI_TOGGLESENT "T Toggle sent " MI_QUITCMF "Q Quit / ESC " ST_ARE "messages are" ST_IS "message is" diff --git a/docs/notework.txt b/docs/notework.txt index b5e75ca..999c579 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,12 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ ++ New menu item "Toggle sent" added to "Action" menu that will toggle + sent/unsent state for current or marked messages. + ++ Added new keyword for the language configuration file + MI_TOGGLESENT "T Toggle sent " + ! New locations of config file for unix-like OS: ~/.golded/, ~/ and /usr/local/etc/. diff --git a/golded3/gclang.cpp b/golded3/gclang.cpp index 170fbe6..2086beb 100644 --- a/golded3/gclang.cpp +++ b/golded3/gclang.cpp @@ -284,6 +284,7 @@ static LangCrc LangCrcs[] = { { CRC_MI_FORWARDMESSAGE , NULL , "F Forward Msg " }, { CRC_MI_MOVEMESSAGE , NULL , "M Move Msg " }, { CRC_MI_COPYMESSAGE , NULL , "C Copy Msg " }, + { CRC_MI_TOGGLESENT , NULL , "T Toggle sent " }, { CRC_MI_QUITCMF , NULL , "Q Quit / ESC " }, { CRC_ST_ARE , NULL , "messages are" }, { CRC_ST_IS , NULL , "message is" }, diff --git a/golded3/gclang.h b/golded3/gclang.h index 5d59468..335f726 100644 --- a/golded3/gclang.h +++ b/golded3/gclang.h @@ -282,6 +282,7 @@ const word CRC_WT_SELECTACTION = 0xF7C0; const word CRC_MI_FORWARDMESSAGE = 0x644C; const word CRC_MI_MOVEMESSAGE = 0xAB24; const word CRC_MI_COPYMESSAGE = 0x6811; +const word CRC_MI_TOGGLESENT = 0; const word CRC_MI_QUITCMF = 0xE1B8; const word CRC_ST_ARE = 0x78C8; const word CRC_ST_IS = 0x27AC; diff --git a/golded3/gecmfd.cpp b/golded3/gecmfd.cpp index f6c6584..d765bb0 100644 --- a/golded3/gecmfd.cpp +++ b/golded3/gecmfd.cpp @@ -312,6 +312,10 @@ void CmfMsgs(GMsg* msg) { GFTRK("ForwardMsgs"); pickstr = LNG->ForwardArea; break; + case MODE_UPDATE: + GFTRK("ToggleSent"); + loadmode |= GMSG_UPDATE; + break; } // Do with current or marked msgs? @@ -327,6 +331,49 @@ void CmfMsgs(GMsg* msg) { } } + if (cmf == MODE_UPDATE) + { + w_info(LNG->Wait); + + uint32_t loadmsgno = msg->msgno; + uint32_t mrks = AA->Mark.Count(); + uint32_t *mrkp = AA->Mark.tag; + uint32_t mrk = 0; + + do + { + if (do_mode == MODE_MARKED) + loadmsgno = mrkp[mrk]; + + mrk++; + + if (AA->LoadHdr(msg, loadmsgno, false)) + { + msg->attr.sntX(); + if (msg->attr.snt()) + { + msg->attr.uns0(); + msg->attr.scn1(); + } + else + { + msg->attr.uns1(); + msg->attr.scn0(); + msg->attr.loc1(); + } + + AA->SaveHdr(GMSG_UPDATE, msg); + } + } + while (mrk < mrks); + + AA->Mark.ResetAll(); + + w_info(NULL); + GFTRK(NULL); + return; + } + // Pick the destination area int destarea = CurrArea; const char* cmfptr = cmf == MODE_FORWARD ? AA->Areareplyto() : AA->Areacopyto(); diff --git a/golded3/gelang.h b/golded3/gelang.h index ce8c26e..4516083 100644 --- a/golded3/gelang.h +++ b/golded3/gelang.h @@ -271,6 +271,7 @@ struct LangGed { char* ForwardMessage; // MI_FORWARDMESSAGE char* MoveMessage; // MI_MOVEMESSAGE char* CopyMessage; // MI_COPYMESSAGE + char* ToggleSent; // MI_TOGGLESENT char* QuitCMF; // MI_QUITCMF char* are; // ST_ARE char* is; // ST_IS diff --git a/golded3/gemnus.cpp b/golded3/gemnus.cpp index b87399a..5fe0f55 100644 --- a/golded3/gemnus.cpp +++ b/golded3/gemnus.cpp @@ -258,7 +258,7 @@ int GMenuNewarea::Run() { int GMenuCMF::Run() { - enum { TAG_COPY=100, TAG_MOVE, TAG_FORWARD, TAG_QUIT }; + enum { TAG_COPY=100, TAG_MOVE, TAG_FORWARD, TAG_TOGGLESENT, TAG_QUIT }; static int _prevtag = TAG_FORWARD; @@ -267,10 +267,11 @@ int GMenuCMF::Run() { AskInit(6, 0, LNG->SelectAction, H_CopyMoveForward); Begin(); - Item(TAG_FORWARD, LNG->ForwardMessage); - Item(TAG_MOVE, LNG->MoveMessage); - Item(TAG_COPY, LNG->CopyMessage); - Item(TAG_QUIT, LNG->QuitCMF); + Item(TAG_FORWARD, LNG->ForwardMessage); + Item(TAG_MOVE, LNG->MoveMessage); + Item(TAG_COPY, LNG->CopyMessage); + Item(TAG_TOGGLESENT, LNG->ToggleSent); + Item(TAG_QUIT, LNG->QuitCMF); SetTag(_prevtag); End(); @@ -281,6 +282,7 @@ int GMenuCMF::Run() { case TAG_FORWARD: return MODE_FORWARD; case TAG_MOVE: return MODE_MOVE; case TAG_COPY: return MODE_COPY; + case TAG_TOGGLESENT:return MODE_UPDATE; } _prevtag = TAG_FORWARD; return -1;