menunextarea config file token
This commit is contained in:
parent
4285622f3f
commit
91d1d3ffdf
@ -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
|
||||
|
||||
|
@ -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>€
|
||||
|
@ -10,7 +10,10 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
+ Added EditSoftCrxLat (yes/no) config file token that enable/disable
|
||||
+ 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.
|
||||
|
||||
+ Added DISPPMFIRST (yes/no) config file token that enable/disable
|
||||
|
@ -740,6 +740,7 @@ CfgGed::CfgGed() {
|
||||
keybmode = KEYB_POLL;
|
||||
logformat = 0;
|
||||
menumarked = MODE_DONT;
|
||||
menunextarea = YES;
|
||||
msglistdate = MSGLISTDATE_WRITTEN;
|
||||
msglistfast = true;
|
||||
msglistfirst = false;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -426,6 +426,16 @@ void CfgMenumarked() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgMenunextarea()
|
||||
{
|
||||
if (strieql(val, "Unread"))
|
||||
CFG->menunextarea = ALWAYS;
|
||||
else
|
||||
CFG->menunextarea = GetYesno(val);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgMsglistdate() {
|
||||
|
||||
int flag;
|
||||
|
@ -242,6 +242,7 @@ void CfgMappath ();
|
||||
void CfgMember ();
|
||||
void CfgMenudropmsg ();
|
||||
void CfgMenumarked ();
|
||||
void CfgMenunextarea ();
|
||||
void CfgMouse ();
|
||||
void CfgMsglistdate ();
|
||||
void CfgMsglistfast ();
|
||||
|
@ -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;
|
||||
|
@ -216,7 +216,7 @@ static void PressY() { if(gkbd.kbuf == NULL) kbput(*LNG->GotoNextYes); }
|
||||
static void PressN() { if(gkbd.kbuf == NULL) kbput(*LNG->GotoNextNo); }
|
||||
|
||||
int GMenuNewarea::Run() {
|
||||
|
||||
|
||||
enum { TAG_NO=100, TAG_YES, TAG_JUMP };
|
||||
|
||||
HandleGEvent(EVTT_ENDOFMSGS);
|
||||
@ -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);
|
||||
}
|
||||
|
@ -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())
|
||||
|
@ -75,6 +75,7 @@ protected:
|
||||
int itemmask;
|
||||
|
||||
int escape;
|
||||
int overtag;
|
||||
int finaltag;
|
||||
int status;
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
@ -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))
|
||||
goto FARBREAK;
|
||||
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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user