menunextarea config file token

This commit is contained in:
Ianos Gnatiuc 2005-10-05 01:40:16 +00:00
parent 4285622f3f
commit 91d1d3ffdf
15 changed files with 52 additions and 10 deletions

View File

@ -1152,6 +1152,10 @@ MENUDROPMSG YES
// Choices are: MARKED, CURRENT, PREVIOUS or DEFAULT.
;MENUMARKED DEFAULT
// Set default for cursor on "Goto Next Area?" menu. (Yes)
// Choices are: No, Yes, Unread.
;MenuNextArea No
----------------------------------------------------------------------
-- SCREEN AND COLORS

View File

@ -1316,6 +1316,9 @@ AskDelOrig Yes
// ‚®§¬®¦­ë¥ ¢ à¨ ­âë: Marked, Current, Previous ¨«¨ Default.
;MenuMarked Default
// “áâ ­®˘Ş  Ż®§¨ć¨¨ Şăŕá®ŕ  ¤«ď ¬Ą­î "Goto Next Area?". (Yes)
// ‚®§¬®¦­ëĄ ˘ ŕ¨ ­âë: No, Yes, Unread.
;MenuNextArea No
----------------------------------------------------------------------
-- <20><E28098>Ž‰Š€ <20><EFBFBD>€Œ…<E280A6>Ž <20>Š<EFBFBD><EFBFBD>

View File

@ -10,6 +10,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
+ Added MenuNextArea (yes/no/unread) config file token that set default
for cursor on "Goto Next Area?" menu.
+ Added EditSoftCrxLat (yes/no) config file token that enable/disable
usage of EditSoftCrxLat. May be used in random system groups.

View File

@ -740,6 +740,7 @@ CfgGed::CfgGed() {
keybmode = KEYB_POLL;
logformat = 0;
menumarked = MODE_DONT;
menunextarea = YES;
msglistdate = MSGLISTDATE_WRITTEN;
msglistfast = true;
msglistfirst = false;

View File

@ -253,6 +253,7 @@ const word CRC_MAPPATH = 0x74E6;
const word CRC_MEMBER = 0xF703;
const word CRC_MENUDROPMSG = 0x9645;
const word CRC_MENUMARKED = 0x7198;
const word CRC_MENUNEXTAREA = 0x82B4;
const word CRC_MOUSE = 0x1B1B;
const word CRC_MSGLISTDATE = 0xBFF5;
const word CRC_MSGLISTFAST = 0xDE86;

View File

@ -425,6 +425,7 @@ SwitchM:
case CRC_MAPPATH : CfgMappath (); break;
case CRC_MEMBER : CfgMember (); break;
case CRC_MENUMARKED : CfgMenumarked (); break;
case CRC_MENUNEXTAREA : CfgMenunextarea (); break;
case CRC_MSGLISTDATE : CfgMsglistdate (); break;
case CRC_MSGLISTFAST : CfgMsglistfast (); break;
case CRC_MSGLISTFIRST : CfgMsglistfirst (); break;

View File

@ -426,6 +426,16 @@ void CfgMenumarked() {
// ------------------------------------------------------------------
void CfgMenunextarea()
{
if (strieql(val, "Unread"))
CFG->menunextarea = ALWAYS;
else
CFG->menunextarea = GetYesno(val);
}
// ------------------------------------------------------------------
void CfgMsglistdate() {
int flag;

View File

@ -242,6 +242,7 @@ void CfgMappath ();
void CfgMember ();
void CfgMenudropmsg ();
void CfgMenumarked ();
void CfgMenunextarea ();
void CfgMouse ();
void CfgMsglistdate ();
void CfgMsglistfast ();

View File

@ -261,6 +261,7 @@ public:
std::vector<MailList> mailinglist;
std::vector< std::pair<std::string, std::string> > mappath;
int menumarked;
int menunextarea;
int msglistdate;
bool msglistfast;
bool msglistfirst;

View File

@ -229,8 +229,8 @@ int GMenuNewarea::Run() {
_temp = AA->Mark.Find(AA->Msgn.CvtReln(AA->lastread()));
if(_temp <= 1) {
_yeskey = Key_Rgt;
_nokey = Key_Lft;
_yeskey = Key_Lft;
_nokey = Key_Rgt;
}
AskInit(6, 0, LNG->GotoNext, H_AskNextArea);
@ -239,8 +239,7 @@ int GMenuNewarea::Run() {
Item(TAG_YES, LNG->GotoNextYes, M_CLOSE, PressY, _yeskey);
Item(TAG_NO, LNG->GotoNextNo, M_CLOSE, PressN, _nokey);
Item(TAG_JUMP, LNG->GotoNextNew);
SetTag(TAG_YES);
// Dirk: YES must be default for backward comp. Make it configurable.
SetTag(CFG->menunextarea + TAG_NO);
End();
Start();
@ -249,8 +248,10 @@ int GMenuNewarea::Run() {
if(finaltag != -1 and finaltag != TAG_JUMP)
getxch();
if(finaltag == -1)
if (finaltag == -1)
finaltag = TAG_NO;
else if ((finaltag != overtag) && (finaltag == TAG_YES))
finaltag = overtag;
return (int) (finaltag - TAG_NO);
}

View File

@ -304,6 +304,7 @@ gkey getxch(int __tick) {
if(gwin.menu) {
_item_t* item = find_hotkey(gwin.menu,k);
if(item) {
gwin.menu->hotkey = true;
kbd_call_func(item->select);
#ifdef GOLD_MOUSE
if(gkbd.inmenu and gmou.FreeCursor())

View File

@ -75,6 +75,7 @@ protected:
int itemmask;
int escape;
int overtag;
int finaltag;
int status;

View File

@ -157,6 +157,7 @@ struct _menu_t {
int titleattr; // attribute of menu title
int shadattr; // shadow attribute or -1 if no shadow
int items; // number of items in menu
bool hotkey;
};

View File

@ -44,6 +44,7 @@
// ------------------------------------------------------------------
int _overtagid;
int _finaltagid;
int gmnudropthrough = NO;
@ -873,8 +874,11 @@ int wmenuget() {
char ch;
static int _depth = 0;
if(_depth == 0)
if (_depth == 0)
{
_overtagid = -1;
_finaltagid = -1;
}
// make sure we have a defined menu
if(gwin.cmenu==NULL) {
@ -958,6 +962,7 @@ int wmenuget() {
gwin.help=citem->help;
// read mouse/keyboard for keypress, then test the keypress
gwin.menu->hotkey = false;
gkbd.inmenu=true;
xch = read_mouse(citem);
citem=gwin.cmenu->citem;
@ -965,6 +970,9 @@ int wmenuget() {
xch = getxch();
}
gkbd.inmenu=false;
_overtagid = citem->tagid;
switch(xch) {
case Key_Esc:
@ -1208,8 +1216,11 @@ int wmenuget() {
item=citem->next;
for(;;) {
while(item!=NULL) {
if((toupper(ch)==toupper(item->schar)) and not (item->fmask&M_NOSEL))
if ((toupper(ch)==toupper(item->schar)) && !(item->fmask & M_NOSEL))
{
if (!gwin.menu->hotkey) _overtagid = item->tagid;
goto FARBREAK;
}
if(citem==item) {
valid=NO;
goto FARBREAK;

View File

@ -203,6 +203,7 @@ void GMnu::End() {
// ------------------------------------------------------------------
extern int _overtagid;
extern int _finaltagid;
void GMnu::Start() {
@ -210,6 +211,7 @@ void GMnu::Start() {
int _prev_escape = wsetesc(escape);
wmenuget();
finaltag = _finaltagid;
overtag = _overtagid;
wsetesc(_prev_escape);
}