diff --git a/cfgs/config/goldkeys.cfg b/cfgs/config/goldkeys.cfg index 092369a..8971d33 100644 --- a/cfgs/config/goldkeys.cfg +++ b/cfgs/config/goldkeys.cfg @@ -318,6 +318,7 @@ F READfindall Z READfindheader @Z READfindheader F6 READfindheader +^F6 READfindnext #Tab READgotobookmark BackSpace READgotobookmark < READgotofirstmsg diff --git a/cfgs/config/goldkeys.rus b/cfgs/config/goldkeys.rus index 92fe1ea..e573252 100644 --- a/cfgs/config/goldkeys.rus +++ b/cfgs/config/goldkeys.rus @@ -316,6 +316,7 @@ F READfindall Z READfindheader @Z READfindheader F6 READfindheader +^F6 READfindnext #Tab READgotobookmark BackSpace READgotobookmark - READgotoreplyprev diff --git a/docs/notework.txt b/docs/notework.txt index 31f786b..31e115a 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,10 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ ++ New reader key READfindnext (default: ^F6) added. + READfindall and READfindheader will not search from next message, + use READfindnext instead. + + Win32 version: pressing SHIFT+EditGo* keys will work as EditBlock* keys ! Added Microsoft Developer Studio 6.0 Workspace and GoldEd Project files diff --git a/golded3/gcarea.cpp b/golded3/gcarea.cpp index d442066..ccb6bcc 100644 --- a/golded3/gcarea.cpp +++ b/golded3/gcarea.cpp @@ -986,6 +986,7 @@ Area::Area(gmo_area* a) { isscanned = false; ispmscanned = false; istossed = false; + findfirst = true; } diff --git a/golded3/gckeys.cpp b/golded3/gckeys.cpp index aefc663..4e77e1b 100644 --- a/golded3/gckeys.cpp +++ b/golded3/gckeys.cpp @@ -223,6 +223,7 @@ CmdKey DefaultKeyset[] = { { Key_Z , KK_ReadFindHeader , KT_R }, { Key_A_Z , KK_ReadFindHeader , KT_R }, { Key_F6 , KK_ReadFindHeader , KT_R }, + { Key_C_F6 , KK_ReadFindNext , KT_R }, { Key_S_Tab , KK_ReadGotoBookMark , KT_R }, { Key_BS , KK_ReadGotoBookMark , KT_R }, { Key_Lsr , KK_ReadGotoFirstMsg , KT_R }, @@ -654,6 +655,7 @@ tglobalkey globalkeys[] = { { CRC_K_CEND , Key_C_End , 0 }, // 0x7B95 { CRC_READSTYLESSHOW , KK_ReadStylesShow , KT_R }, // 0x7D0D { CRC_K_APGUP , Key_A_PgUp , 0 }, // 0x7E61 + { CRC_READFINDNEXT , KK_ReadFindNext , KT_R }, // 0x8082 { CRC_EDITQUITNOW , KK_EditQuitNow , KT_E }, // 0x80BA { CRC_LISTMARKINGOPTIONS , KK_ListMarkingOptions , KT_M }, // 0x8138 { CRC_EDITZAPQUOTEBELOW , KK_EditZapQuoteBelow , KT_E }, // 0x814F diff --git a/golded3/gckeys.h b/golded3/gckeys.h index be0a124..92706f5 100644 --- a/golded3/gckeys.h +++ b/golded3/gckeys.h @@ -228,6 +228,7 @@ const word CRC_READFIDORENUMBER = 0x1E7C; const word CRC_READFILEREQUEST = 0x0A07; const word CRC_READFINDALL = 0xEF19; const word CRC_READFINDHEADER = 0x6343; +const word CRC_READFINDNEXT = 0x8082; const word CRC_READGOTOBOOKMARK = 0x4383; const word CRC_READGOTOFIRSTMSG = 0x392F; const word CRC_READGOTOLASTMSG = 0x9E72; diff --git a/golded3/gefind.cpp b/golded3/gefind.cpp index aa8bf55..8ea5fb7 100644 --- a/golded3/gefind.cpp +++ b/golded3/gefind.cpp @@ -40,12 +40,19 @@ void FindAll(GMsg* msg, int& topline, int& keyok) { if(AA->Msgn.Count()) { topline = 0; AA->attr().hex0(); - strcpy(CFG->searchfor, AA->Searchfor()); - if(edit_string(CFG->searchfor, sizeof(INam), LNG->HeaderText, H_FindString)) { - AA->SetSearchfor(CFG->searchfor); - if(FindString(msg, AA->Searchfor(), GFIND_HDRTXT)) - keyok = true; + + if (AA->get_findfirst()) + { + strcpy(CFG->searchfor, AA->Searchfor()); + if(edit_string(CFG->searchfor, sizeof(INam), LNG->HeaderText, H_FindString)) { + AA->SetSearchfor(CFG->searchfor); + if(FindString(msg, AA->Searchfor(), GFIND_HDRTXT)) + keyok = true; + AA->set_findfirst(false); + } } + else if(FindString(msg, AA->Searchfor(), GFIND_HDRTXT)) + keyok = true; } } @@ -57,12 +64,19 @@ void FindHdr(GMsg* msg, int& topline, int& keyok) { if(AA->Msgn.Count()) { topline = 0; AA->attr().hex0(); - strcpy(CFG->searchfor, AA->Searchfor()); - if(edit_string(CFG->searchfor, sizeof(INam), LNG->HeaderOnly, H_FindString)) { - AA->SetSearchfor(CFG->searchfor); - if(FindString(msg, AA->Searchfor(), GFIND_HDR)) - keyok = true; + + if (AA->get_findfirst()) + { + strcpy(CFG->searchfor, AA->Searchfor()); + if(edit_string(CFG->searchfor, sizeof(INam), LNG->HeaderOnly, H_FindString)) { + AA->SetSearchfor(CFG->searchfor); + if(FindString(msg, AA->Searchfor(), GFIND_HDR)) + keyok = true; + AA->set_findfirst(false); + } } + else if(FindString(msg, AA->Searchfor(), GFIND_HDR)) + keyok = true; } } @@ -102,15 +116,17 @@ bool FindString(GMsg* msg, const char* prompt, int what) { update_statuslinef(LNG->ReadingMsg, AA->lastread(), AA->Msgn.Count()); w_progress(MODE_UPDATE, C_INFOW, AA->lastread(), AA->Msgn.Count(), LNG->AdvancedSearch); + bool success = false; if(AA->LoadMsg(msg, AA->Msgn.CvtReln(AA->lastread()), margin)) { - bool success; // If hit, search again current mail without shortcircuit evaluation success = srchmgr.search(msg, false, true); if(success) srchmgr.search(msg, false, false); - if((srchmgr.reverse ? not success : success) and (lastfound != msg->msgno)) { + if(((srchmgr.reverse ? !success : success) && (lastfound != msg->msgno)) + || (success && AA->get_findfirst())) + { bool istwitto, istwitsubj; if(MsgIsTwit(msg, istwitto, istwitsubj) != TWIT_SKIP) { HandleGEvent(EVTT_SEARCHSUCCESS); diff --git a/golded3/gekeys.h b/golded3/gekeys.h index f89d595..ca253a2 100644 --- a/golded3/gekeys.h +++ b/golded3/gekeys.h @@ -342,6 +342,7 @@ const gkey KK_ReadShowHTML = 0xFFBB; const gkey KK_ReadToggleHTML = 0xFFBC; const gkey KK_ReadShowQuote = 0xFFBD; const gkey KK_ReadHideQuote = 0xFFBE; +const gkey KK_ReadFindNext = 0xFFBF; const gkey KK_HeaderAddressbook = 0xFFC0; const gkey KK_HeaderLookup = 0xFFC1; diff --git a/golded3/geread.cpp b/golded3/geread.cpp index 094a6f0..726fe8c 100644 --- a/golded3/geread.cpp +++ b/golded3/geread.cpp @@ -809,13 +809,29 @@ void Reader() { break; case KK_ReadFindAll: + AA->set_findfirst(true); + AA->set_findtype(1); FindAll(msg, reader_topline, reader_keyok); break; case KK_ReadFindHeader: + AA->set_findfirst(true); + AA->set_findtype(2); FindHdr(msg, reader_topline, reader_keyok); break; + case KK_ReadFindNext: + if (!AA->get_findfirst()) + { + if (AA->get_findtype() == 1) + FindAll(msg, reader_topline, reader_keyok); + else + FindHdr(msg, reader_topline, reader_keyok); + } + else + reader_keyok = false; + break; + case KK_ReadSearch: AdvancedSearch(msg, reader_topline, reader_keyok); break; diff --git a/golded3/gmarea.h b/golded3/gmarea.h index 5d7f721..739cc24 100644 --- a/golded3/gmarea.h +++ b/golded3/gmarea.h @@ -345,7 +345,9 @@ class Area { private: - word marks; // storing 16 different marks + bool findfirst; + uint findtype; //1 - FindAll, 2 - FindHdr + word marks; // storing 16 different marks friend class AreaList; @@ -382,6 +384,11 @@ public: void set_lastread(uint lr); + void set_findfirst(bool ff) { findfirst = ff; } + void set_findtype(uint ft) { findtype = ft; } + bool get_findfirst() { return findfirst; } + uint get_findtype() { return findtype; } + bool isopen() { return area->isopen; } bool isunreadchg : 1; // TRUE if unread was changed since last scan