New reader key READGotoThNextUnread added, that will cycle thorough all unread messages of current thread

This commit is contained in:
Ianos Gnatiuc 2006-01-08 15:03:54 +00:00
parent 1a7bd3b5b3
commit 2ded685104
9 changed files with 127 additions and 7 deletions

View File

@ -350,6 +350,7 @@ Left READgotoprevmsg
* READgotoreplynext * READgotoreplynext
- READgotoreplyprev - READgotoreplyprev
^Left READgotoreplyprev ^Left READgotoreplyprev
@Down READGotoThNextUnread
; READhidekludge ; READhidekludge
; READhidehidden ; READhidehidden
; READhidehiddklud ; READhidehiddklud

View File

@ -338,7 +338,8 @@ Left READgotoprevmsg
+ READgotoreplies + READgotoreplies
^Right READgotoreplies ^Right READgotoreplies
/ READGoToReply1st ; <20>¥p¥å®¤ ª ¯¥p¢®¬ã ®â¢¥âã ­  íâ® á®®¡é¥­¨¥ ¢ 楯®çª¥ ®â¢¥â®¢ / READGoToReply1st ; <20>¥p¥å®¤ ª ¯¥p¢®¬ã ®â¢¥âã ­  íâ® á®®¡é¥­¨¥ ¢ 楯®çª¥ ®â¢¥â®¢
* READGoToReplyNext ; „«ï JAM_¡ §ë ; <20>¥à¥©â¨ ª á«¥¤ãî饬㠮⢥âã ­  íâ® á®®¡é¥­¨¥ * READGoToReplyNext ; <20>¥à¥©â¨ ª á«¥¤ãî饬㠮⢥âã ­  íâ® á®®¡é¥­¨¥
@Down READGotoThNextUnread ; <20>¥à¥å®¤ ª á«¥¤ãî饬㠭¥¯à®ç¨â ­­®¬ã á®®¡é¥­¨î ¢ â।¥
^M READmainmenu ^M READmainmenu
^L READmakeuserlist ^L READmakeuserlist
^K READmakepathreport ^K READmakepathreport

View File

@ -10,6 +10,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
+ New reader key READGotoThNextUnread (default: @Down) added, that will
cycle thorough all unread messages of current thread.
- Win32: file attach is no more translated to upper case. - Win32: file attach is no more translated to upper case.
+ New russian and ukrainian charset tables (conversion from/to ISO 8859-5). + New russian and ukrainian charset tables (conversion from/to ISO 8859-5).

View File

@ -246,6 +246,7 @@ CmdKey DefaultKeyset[] = {
{ Key_Multi , KK_ReadGotoReplyNext , KT_R }, { Key_Multi , KK_ReadGotoReplyNext , KT_R },
{ Key_Minus , KK_ReadGotoReplyPrev , KT_R }, { Key_Minus , KK_ReadGotoReplyPrev , KT_R },
{ Key_C_Lft , KK_ReadGotoReplyPrev , KT_R }, { Key_C_Lft , KK_ReadGotoReplyPrev , KT_R },
{ Key_A_Dwn , KK_ReadGotoThNextUnread , KT_R },
{ Key_S_F10 , KK_ReadLookupDest , KT_R }, { Key_S_F10 , KK_ReadLookupDest , KT_R },
{ Key_F10 , KK_ReadLookupOrig , KT_R }, { Key_F10 , KK_ReadLookupOrig , KT_R },
{ Key_C_L , KK_ReadMakeUserlist , KT_R }, { Key_C_L , KK_ReadMakeUserlist , KT_R },
@ -511,6 +512,7 @@ tglobalkey globalkeys[] = {
{ CRC_K_AZ , Key_A_Z , 0 }, // 0x405A { CRC_K_AZ , Key_A_Z , 0 }, // 0x405A
{ CRC_K_ADEL , Key_A_Del , 0 }, // 0x40C0 { CRC_K_ADEL , Key_A_Del , 0 }, // 0x40C0
{ CRC_NODEMACRO , KK_NodeMacro , KT_N }, // 0x4129 { CRC_NODEMACRO , KK_NodeMacro , KT_N }, // 0x4129
{ CRC_READGOTOTHNEXTUNREAD , KK_ReadGotoThNextUnread , KT_R }, // 0x413E
#if !defined(__UNIX__) || defined(__USE_NCURSES__) #if !defined(__UNIX__) || defined(__USE_NCURSES__)
{ CRC_K_SUP , Key_S_Up , 0 }, // 0x4151 { CRC_K_SUP , Key_S_Up , 0 }, // 0x4151
#endif #endif

View File

@ -247,6 +247,7 @@ const word CRC_READGOTOREPLIES = 0x1A6B;
const word CRC_READGOTOREPLY1ST = 0xE54F; const word CRC_READGOTOREPLY1ST = 0xE54F;
const word CRC_READGOTOREPLYNEXT = 0x844F; const word CRC_READGOTOREPLYNEXT = 0x844F;
const word CRC_READGOTOREPLYPREV = 0xDBE7; const word CRC_READGOTOREPLYPREV = 0xDBE7;
const word CRC_READGOTOTHNEXTUNREAD = 0x413E;
const word CRC_READINCREASEMARGIN = 0x1797; const word CRC_READINCREASEMARGIN = 0x1797;
const word CRC_READLOOKUPDEST = 0x0023; const word CRC_READLOOKUPDEST = 0x0023;
const word CRC_READLOOKUPORIG = 0xA41C; const word CRC_READLOOKUPORIG = 0xA41C;

View File

@ -52,6 +52,7 @@ const gkey KK_FileMacro = 0xFE03;
const gkey KK_ListMacro = 0xFE04; const gkey KK_ListMacro = 0xFE04;
const gkey KK_NodeMacro = 0xFE05; const gkey KK_NodeMacro = 0xFE05;
const gkey KK_ReadMacro = 0xFE06; const gkey KK_ReadMacro = 0xFE06;
// = 0xFE07-0xFE7F
const gkey KK_Commands = 0xFE80; const gkey KK_Commands = 0xFE80;
const gkey KK_ExternUtil01 = 0xFE81; const gkey KK_ExternUtil01 = 0xFE81;
@ -79,6 +80,12 @@ const gkey KK_ExternUtil22 = 0xFE96;
const gkey KK_ExternUtil23 = 0xFE97; const gkey KK_ExternUtil23 = 0xFE97;
const gkey KK_ExternUtil24 = 0xFE98; const gkey KK_ExternUtil24 = 0xFE98;
const gkey KK_ExternUtil25 = 0xFE99; const gkey KK_ExternUtil25 = 0xFE99;
// = 0xFE9A;
// = 0xFE9B;
// = 0xFE9C;
// = 0xFE9D;
// = 0xFE9E;
// = 0xFE9F;
const gkey KK_AreaAbort = 0xFEA0; const gkey KK_AreaAbort = 0xFEA0;
const gkey KK_AreaAskExit = 0xFEA1; const gkey KK_AreaAskExit = 0xFEA1;
@ -94,6 +101,7 @@ const gkey KK_AreaHeat = 0xFEAA;
const gkey KK_AreaJump = 0xFEAC; const gkey KK_AreaJump = 0xFEAC;
const gkey KK_AreaJumpNextMatch = 0xFEAD; const gkey KK_AreaJumpNextMatch = 0xFEAD;
const gkey KK_AreaMainMenu = 0xFEAE; const gkey KK_AreaMainMenu = 0xFEAE;
// = 0xFEAF;
const gkey KK_AreaQuitNow = 0xFEB0; const gkey KK_AreaQuitNow = 0xFEB0;
const gkey KK_AreaScan = 0xFEB1; const gkey KK_AreaScan = 0xFEB1;
const gkey KK_AreaScanPM = 0xFEB2; const gkey KK_AreaScanPM = 0xFEB2;
@ -106,6 +114,10 @@ const gkey KK_AreaWriteGoldlast = 0xFEB8;
const gkey KK_AreaZap = 0xFEB9; const gkey KK_AreaZap = 0xFEB9;
const gkey KK_AreaMark = 0xFEBA; const gkey KK_AreaMark = 0xFEBA;
const gkey KK_AreaUnmark = 0xFEBB; const gkey KK_AreaUnmark = 0xFEBB;
// = 0xFEBC;
// = 0xFEBD;
// = 0xFEBE;
// = 0xFEBF;
const gkey KK_EditAbort = 0xFEC0; const gkey KK_EditAbort = 0xFEC0;
const gkey KK_EditAnchor = 0xFEC1; const gkey KK_EditAnchor = 0xFEC1;
@ -143,10 +155,13 @@ const gkey KK_EditGoWordRight = 0xFEE0;
const gkey KK_EditHeader = 0xFEE1; const gkey KK_EditHeader = 0xFEE1;
const gkey KK_EditImportQuotebuf = 0xFEE2; const gkey KK_EditImportQuotebuf = 0xFEE2;
const gkey KK_EditImportText = 0xFEE3; const gkey KK_EditImportText = 0xFEE3;
// = 0xFEE4;
const gkey KK_EditLoadFile = 0xFEE5; const gkey KK_EditLoadFile = 0xFEE5;
const gkey KK_EditLookupCursor = 0xFEE6; const gkey KK_EditLookupCursor = 0xFEE6;
const gkey KK_EditLookupDest = 0xFEE7; const gkey KK_EditLookupDest = 0xFEE7;
const gkey KK_EditLookupOrig = 0xFEE8; const gkey KK_EditLookupOrig = 0xFEE8;
// = 0xFEE9;
// = 0xFEEA;
const gkey KK_EditNewline = 0xFEEB; const gkey KK_EditNewline = 0xFEEB;
const gkey KK_EditPaste = 0xFEEC; const gkey KK_EditPaste = 0xFEEC;
const gkey KK_EditQuitNow = 0xFEED; const gkey KK_EditQuitNow = 0xFEED;
@ -185,6 +200,7 @@ const gkey KK_EditSCodeReverse = 0xFF0C;
const gkey KK_EditSCheckerMenu = 0xFF0D; const gkey KK_EditSCheckerMenu = 0xFF0D;
#endif #endif
const gkey KK_EditDrawLines = 0xFF0E; const gkey KK_EditDrawLines = 0xFF0E;
// = 0xFE0F;
const gkey KK_FileAbort = 0xFF10; const gkey KK_FileAbort = 0xFF10;
const gkey KK_FileAskExit = 0xFF11; const gkey KK_FileAskExit = 0xFF11;
@ -195,6 +211,7 @@ const gkey KK_FileGotoNext = 0xFF15;
const gkey KK_FileGotoPrev = 0xFF16; const gkey KK_FileGotoPrev = 0xFF16;
const gkey KK_FileMark = 0xFF17; const gkey KK_FileMark = 0xFF17;
const gkey KK_FileMarkAll = 0xFF18; const gkey KK_FileMarkAll = 0xFF18;
// = 0xFE19;
const gkey KK_FileQuitNow = 0xFF1A; const gkey KK_FileQuitNow = 0xFF1A;
const gkey KK_FileSelect = 0xFF1B; const gkey KK_FileSelect = 0xFF1B;
const gkey KK_FileToggleMark = 0xFF1C; const gkey KK_FileToggleMark = 0xFF1C;
@ -212,6 +229,7 @@ const gkey KK_ListGotoNext = 0xFF26;
const gkey KK_ListGotoPrev = 0xFF27; const gkey KK_ListGotoPrev = 0xFF27;
const gkey KK_ListMainMenu = 0xFF28; const gkey KK_ListMainMenu = 0xFF28;
const gkey KK_ListMarkingOptions = 0xFF29; const gkey KK_ListMarkingOptions = 0xFF29;
// = 0xFE2A;
const gkey KK_ListQuitNow = 0xFF2B; const gkey KK_ListQuitNow = 0xFF2B;
const gkey KK_ListSelect = 0xFF2C; const gkey KK_ListSelect = 0xFF2C;
const gkey KK_ListToggleBookMark = 0xFF2D; const gkey KK_ListToggleBookMark = 0xFF2D;
@ -223,6 +241,18 @@ const gkey KK_ListUnmark = 0xFF32;
const gkey KK_ListWideSubj = 0xFF33; const gkey KK_ListWideSubj = 0xFF33;
const gkey KK_ListNarrowSubj = 0xFF34; const gkey KK_ListNarrowSubj = 0xFF34;
// = 0xFE35;
// = 0xFE36;
// = 0xFE37;
// = 0xFE38;
// = 0xFE39;
// = 0xFE3A;
// = 0xFE3B;
// = 0xFE3C;
// = 0xFE3D;
// = 0xFE3E;
// = 0xFE3F;
const gkey KK_NodeAbort = 0xFF40; const gkey KK_NodeAbort = 0xFF40;
const gkey KK_NodeAskExit = 0xFF41; const gkey KK_NodeAskExit = 0xFF41;
const gkey KK_NodeDosShell = 0xFF42; const gkey KK_NodeDosShell = 0xFF42;
@ -230,6 +260,8 @@ const gkey KK_NodeGotoFirst = 0xFF43;
const gkey KK_NodeGotoLast = 0xFF44; const gkey KK_NodeGotoLast = 0xFF44;
const gkey KK_NodeGotoNext = 0xFF45; const gkey KK_NodeGotoNext = 0xFF45;
const gkey KK_NodeGotoPrev = 0xFF46; const gkey KK_NodeGotoPrev = 0xFF46;
// = 0xFE47;
// = 0xFE48;
const gkey KK_NodeQuitNow = 0xFF49; const gkey KK_NodeQuitNow = 0xFF49;
const gkey KK_NodeSelect = 0xFF4A; const gkey KK_NodeSelect = 0xFF4A;
@ -243,6 +275,8 @@ const gkey KK_ReadAddressbookAdd = 0xFF50;
const gkey KK_ReadAskExit = 0xFF51; const gkey KK_ReadAskExit = 0xFF51;
const gkey KK_ReadChangeAka = 0xFF52; const gkey KK_ReadChangeAka = 0xFF52;
const gkey KK_ReadChangeAttrs = 0xFF53; const gkey KK_ReadChangeAttrs = 0xFF53;
// = 0xFE54;
// = 0xFE55;
const gkey KK_ReadChangeMsg = 0xFF56; const gkey KK_ReadChangeMsg = 0xFF56;
const gkey KK_ReadChangeOrigin = 0xFF57; const gkey KK_ReadChangeOrigin = 0xFF57;
const gkey KK_ReadChangeTagline = 0xFF58; const gkey KK_ReadChangeTagline = 0xFF58;
@ -273,12 +307,13 @@ const gkey KK_ReadGotoReplies = 0xFF70;
const gkey KK_ReadGotoReply1st = 0xFF71; const gkey KK_ReadGotoReply1st = 0xFF71;
const gkey KK_ReadGotoReplyNext = 0xFF72; const gkey KK_ReadGotoReplyNext = 0xFF72;
const gkey KK_ReadGotoReplyPrev = 0xFF73; const gkey KK_ReadGotoReplyPrev = 0xFF73;
const gkey KK_ReadIncreaseMargin = 0xFF74; const gkey KK_ReadGotoThNextUnread = 0xFE74;
const gkey KK_ReadLookupDest = 0xFF75; const gkey KK_ReadIncreaseMargin = 0xFF75;
const gkey KK_ReadLookupOrig = 0xFF76; const gkey KK_ReadLookupDest = 0xFF76;
const gkey KK_ReadMainMenu = 0xFF77; const gkey KK_ReadLookupOrig = 0xFF77;
const gkey KK_ReadMakeUserlist = 0xFF78; const gkey KK_ReadMainMenu = 0xFF78;
const gkey KK_ReadMarkingOptions = 0xFF79; const gkey KK_ReadMakeUserlist = 0xFF79;
const gkey KK_ReadMarkingOptions = 0xFF7A;
const gkey KK_ReadMessageList = 0xFF7B; const gkey KK_ReadMessageList = 0xFF7B;
const gkey KK_ReadMakePathreport = 0xFF7C; const gkey KK_ReadMakePathreport = 0xFF7C;
const gkey KK_ReadMoveCommentMsg = 0xFF7D; const gkey KK_ReadMoveCommentMsg = 0xFF7D;
@ -298,6 +333,7 @@ const gkey KK_ReadQuoteMsg = 0xFF8A;
const gkey KK_ReadReplyMsg = 0xFF8B; const gkey KK_ReadReplyMsg = 0xFF8B;
const gkey KK_ReadSearch = 0xFF8C; const gkey KK_ReadSearch = 0xFF8C;
const gkey KK_ReadSoundkill = 0xFF8D; const gkey KK_ReadSoundkill = 0xFF8D;
// = 0xFE8E;
const gkey KK_ReadThreadtree = 0xFF8F; const gkey KK_ReadThreadtree = 0xFF8F;
const gkey KK_ReadToggleBookMark = 0xFF90; const gkey KK_ReadToggleBookMark = 0xFF90;
const gkey KK_ReadToggleHexdump = 0xFF91; const gkey KK_ReadToggleHexdump = 0xFF91;

View File

@ -722,6 +722,7 @@ public:
bool handle_key(); // Handles keypress bool handle_key(); // Handles keypress
void Run(); void Run();
bool GoNextUnread(bool reader);
GThreadlist() { memset(&msg, 0, sizeof(GMsg)); replylinkfloat = CFG->replylinkfloat; }; GThreadlist() { memset(&msg, 0, sizeof(GMsg)); replylinkfloat = CFG->replylinkfloat; };
~GThreadlist() { ResetMsg(&msg); }; ~GThreadlist() { ResetMsg(&msg); };
@ -1260,6 +1261,58 @@ void GThreadlist::Run() {
} }
// ------------------------------------------------------------------
bool GThreadlist::GoNextUnread(bool reader)
{
if (reader)
BuildThreadIndex(reader_msg->msgno);
bool found = false;
size_t size = list.size();
if (size > 1)
{
size_t idx;
for (idx = index + 1; idx < size; idx++)
{
t = list[idx];
AA->LoadHdr(&msg, t.msgno);
if (msg.timesread == 0)
{
found = true;
break;
}
}
if (!found)
{
for (idx = 0; idx < index; idx++)
{
t = list[idx];
AA->LoadHdr(&msg, t.msgno);
if (msg.timesread == 0)
{
found = true;
break;
}
}
}
if (found)
{
index = idx;
if (reader)
AA->set_lastread(AA->Msgn.ToReln(list[idx].msgno));
}
}
return found;
}
// ------------------------------------------------------------------ // ------------------------------------------------------------------
void MsgThreadlist() { void MsgThreadlist() {
@ -1271,4 +1324,22 @@ void MsgThreadlist() {
} }
// ------------------------------------------------------------------
void GotoThNextUnread()
{
w_info(LNG->Wait);
reader_direction = DIR_NEXT;
GThreadlist p;
if (!p.GoNextUnread(true))
{
SayBibi();
reader_keyok = true;
}
w_info(NULL);
}
// ------------------------------------------------------------------ // ------------------------------------------------------------------

View File

@ -322,6 +322,7 @@ void GotoReplies();
void GotoReply1st(); void GotoReply1st();
void GotoReplyNext(); void GotoReplyNext();
void GotoReplyPrev(); void GotoReplyPrev();
void GotoThNextUnread();
void IncMargin(); void IncMargin();
void MakeUserList(); void MakeUserList();
void MakePathreport(); void MakePathreport();

View File

@ -673,6 +673,10 @@ void Reader() {
GotoPrevUnread(); GotoPrevUnread();
break; break;
case KK_ReadGotoThNextUnread:
GotoThNextUnread();
break;
case KK_ReadShowHiddKlud: case KK_ReadShowHiddKlud:
if(not AA->Viewhidden() and not AA->Viewkludge()) if(not AA->Viewhidden() and not AA->Viewkludge())
ToggleHiddKlud(); ToggleHiddKlud();