Token AreaRecycleBin changed to AreaRecycleBin <area> [NoAsk/Ask]

This commit is contained in:
Ianos Gnatiuc 2006-06-15 01:55:34 +00:00
parent 77444fa135
commit 39d38bfdb2
6 changed files with 43 additions and 11 deletions

View File

@ -10,6 +10,9 @@ _____________________________________________________________________________
‡ ¬¥âª¨ ¤«ï GoldED+ 1.1.5, /snapshot/ ‡ ¬¥âª¨ ¤«ï GoldED+ 1.1.5, /snapshot/
_____________________________________________________________________________ _____________________________________________________________________________
! <20>§¬Ą­Ą­ë Ż ŕ ¬Ąâŕë AreaRecycleBin ­  AreaRecycleBin <area> [NoAsk/Ask].
NoAsk - ­Ą áŻŕ č¨˘ âě (Ż® 㬮«ç ­¨î)
€áŞ - áŻŕ č¨˘ âě ŕ §ŕĄčĄ­¨Ą 㤠«¨âě
+ …᫨ TimeOutSaveMsg ¢ª«î祭, â® á®®¡é¥­¨¥ á®åà ­¨âáï á ä« £®¬ 'Locked'. + …᫨ TimeOutSaveMsg ¢ª«î祭, â® á®®¡é¥­¨¥ á®åà ­¨âáï á ä« £®¬ 'Locked'.
- „®¯®«­¨â¥«ì­ ï ¯à®¢¥àª  ⮪¥­  ST_EDITSTATUS. - „®¯®«­¨â¥«ì­ ï ¯à®¢¥àª  ⮪¥­  ST_EDITSTATUS.
- ˆá¯à ¢«¥­  ®è¨¡ª  ¯à¨¢®¤ïé ï ª ¢¥ç­®¬ã 横«ã, ¥á«¨ ä ¨« ¤«ï ⮪¥­  @random - ˆá¯à ¢«¥­  ®è¨¡ª  ¯à¨¢®¤ïé ï ª ¢¥ç­®¬ã 横«ã, ¥á«¨ ä ¨« ¤«ï ⮪¥­  @random

View File

@ -10,6 +10,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
! Token AreaRecycleBin changed to AreaRecycleBin <area> [NoAsk/Ask]
Default is to not ask.
+ Turn on flag 'Locked' if TimeOutSaveMsg is enabled. + Turn on flag 'Locked' if TimeOutSaveMsg is enabled.
- Additional check of token ST_EDITSTATUS. - Additional check of token ST_EDITSTATUS.

View File

@ -708,6 +708,7 @@ CfgGed::CfgGed() {
arealistechomax = 0; arealistechomax = 0;
arealisttype = AL_TOTNEW; arealisttype = AL_TOTNEW;
areareadonly = READONLY_SOFT; areareadonly = READONLY_SOFT;
arearecyclebinask = false;
areareplydirect = false; areareplydirect = false;
beepfactor = 1000; beepfactor = 1000;
beepyourmail = true; beepyourmail = true;

View File

@ -424,7 +424,19 @@ void CfgAreareadonly() {
void CfgArearecyclebin() void CfgArearecyclebin()
{ {
strupr(strxcpy(CFG->arearecyclebin, val, sizeof(Echo))); char* key;
getkeyval(&key, &val);
strupr(strxcpy(CFG->arearecyclebin, key, sizeof(Echo)));
if (*val)
{
if (strieql(val, "NoAsk"))
CFG->arearecyclebinask = false;
else if (strieql(val, "Ask"))
CFG->arearecyclebinask = true;
else
CFG->arearecyclebinask = make_bool(GetYesno(val));
}
} }
// ------------------------------------------------------------------ // ------------------------------------------------------------------

View File

@ -252,6 +252,7 @@ public:
gstrarray areapmscanincl; gstrarray areapmscanincl;
int areareadonly; int areareadonly;
Echo arearecyclebin; Echo arearecyclebin;
bool arearecyclebinask;
std::vector<EchoRen> arearename; std::vector<EchoRen> arearename;
bool areareplydirect; bool areareplydirect;
Echo areareplyto; Echo areareplyto;

View File

@ -145,17 +145,24 @@ void Area::DeleteMsg(GMsg* msg, int direction) {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
void Area::DelMsgs(GMsg* msg) { void Area::DelMsgs(GMsg* msg)
{
GFTRK("DelMsgs"); GFTRK("DelMsgs");
GMenuDelete MenuDelete;
if (CFG->arearecyclebin[0]) if (CFG->arearecyclebin[0])
{ {
int areano = AL.AreaEchoToNo(CFG->arearecyclebin); int areano = AL.AreaEchoToNo(CFG->arearecyclebin);
int currno = AL.AreaIdToNo(CurrArea); int currno = AL.AreaIdToNo(CurrArea);
if ((areano != currno) && (areano >= 0)) if ((areano != currno) && (areano >= 0))
{ {
CopyMoveForward(true); bool del = true;
if(CFG->arearecyclebinask && (NO == MenuDelete.Run(NO, msg)))
del = false;
if (del) CopyMoveForward(true);
GFTRK(0); GFTRK(0);
return; return;
} }
@ -197,8 +204,9 @@ void Area::DelMsgs(GMsg* msg) {
HeaderView->Paint(); HeaderView->Paint();
BodyView->Use(AA, msg, topline); BodyView->Use(AA, msg, topline);
BodyView->Paint(); BodyView->Paint();
GMenuDelete MenuDelete;
switch(MenuDelete.Run(YES, msg)) { switch(MenuDelete.Run(YES, msg))
{
case YES: // Yes, delete case YES: // Yes, delete
deletethis = true; deletethis = true;
break; break;
@ -218,8 +226,9 @@ void Area::DelMsgs(GMsg* msg) {
HeaderView->Paint(); HeaderView->Paint();
BodyView->Use(AA, msg, topline); BodyView->Use(AA, msg, topline);
BodyView->Paint(); BodyView->Paint();
GMenuDelete MenuDelete;
switch(MenuDelete.Run(YES, msg)) { switch (MenuDelete.Run(YES, msg))
{
case YES: // Yes, delete case YES: // Yes, delete
break; break;
case NO: // No, dont delete case NO: // No, dont delete
@ -241,11 +250,14 @@ void Area::DelMsgs(GMsg* msg) {
w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
} }
} }
if(n == 0) {
if (n == 0)
{
Mark.Del(msg->msgno); Mark.Del(msg->msgno);
PMrk.Del(msg->msgno); PMrk.Del(msg->msgno);
GMenuDelete MenuDelete;
if(Mark.Count() or MenuDelete.Run(NO, msg)) { if (Mark.Count() or MenuDelete.Run(NO, msg))
{
HandleGEvent(EVTT_MSGDELETING); HandleGEvent(EVTT_MSGDELETING);
DeleteMsg(msg, reader_direction); DeleteMsg(msg, reader_direction);
} }