diff --git a/docs/notework.rus b/docs/notework.rus index 656b960..5b948e0 100644 --- a/docs/notework.rus +++ b/docs/notework.rus @@ -10,6 +10,9 @@ _____________________________________________________________________________ Заметки для GoldED+ 1.1.5, /snapshot/ _____________________________________________________________________________ +! Изменены параметры AreaRecycleBin на AreaRecycleBin [NoAsk/Ask]. + NoAsk - не спрашивать (по умолчанию) + Аск - спрашивать разрешение удалить + Если TimeOutSaveMsg включен, то сообщение сохранится с флагом 'Locked'. - Дополнительная проверка токена ST_EDITSTATUS. - Исправлена ошибка приводящая к вечному циклу, если фаил для токена @random diff --git a/docs/notework.txt b/docs/notework.txt index af32fed..78a2723 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,9 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +! Token AreaRecycleBin changed to AreaRecycleBin [NoAsk/Ask] + Default is to not ask. + + Turn on flag 'Locked' if TimeOutSaveMsg is enabled. - Additional check of token ST_EDITSTATUS. diff --git a/golded3/gccfgg.cpp b/golded3/gccfgg.cpp index cd4ebda..733c5fb 100644 --- a/golded3/gccfgg.cpp +++ b/golded3/gccfgg.cpp @@ -708,6 +708,7 @@ CfgGed::CfgGed() { arealistechomax = 0; arealisttype = AL_TOTNEW; areareadonly = READONLY_SOFT; + arearecyclebinask = false; areareplydirect = false; beepfactor = 1000; beepyourmail = true; diff --git a/golded3/gccfgg1.cpp b/golded3/gccfgg1.cpp index 9f7e0fe..dbbe6b4 100644 --- a/golded3/gccfgg1.cpp +++ b/golded3/gccfgg1.cpp @@ -424,7 +424,19 @@ void CfgAreareadonly() { 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)); + } } // ------------------------------------------------------------------ diff --git a/golded3/gecfgg.h b/golded3/gecfgg.h index bae7141..95b6047 100644 --- a/golded3/gecfgg.h +++ b/golded3/gecfgg.h @@ -252,6 +252,7 @@ public: gstrarray areapmscanincl; int areareadonly; Echo arearecyclebin; + bool arearecyclebinask; std::vector arearename; bool areareplydirect; Echo areareplyto; diff --git a/golded3/gecmfd.cpp b/golded3/gecmfd.cpp index be582d5..47fb884 100644 --- a/golded3/gecmfd.cpp +++ b/golded3/gecmfd.cpp @@ -145,17 +145,24 @@ void Area::DeleteMsg(GMsg* msg, int direction) { // ------------------------------------------------------------------ -void Area::DelMsgs(GMsg* msg) { - +void Area::DelMsgs(GMsg* msg) +{ GFTRK("DelMsgs"); + GMenuDelete MenuDelete; if (CFG->arearecyclebin[0]) { int areano = AL.AreaEchoToNo(CFG->arearecyclebin); int currno = AL.AreaIdToNo(CurrArea); + 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); return; } @@ -197,8 +204,9 @@ void Area::DelMsgs(GMsg* msg) { HeaderView->Paint(); BodyView->Use(AA, msg, topline); BodyView->Paint(); - GMenuDelete MenuDelete; - switch(MenuDelete.Run(YES, msg)) { + + switch(MenuDelete.Run(YES, msg)) + { case YES: // Yes, delete deletethis = true; break; @@ -218,8 +226,9 @@ void Area::DelMsgs(GMsg* msg) { HeaderView->Paint(); BodyView->Use(AA, msg, topline); BodyView->Paint(); - GMenuDelete MenuDelete; - switch(MenuDelete.Run(YES, msg)) { + + switch (MenuDelete.Run(YES, msg)) + { case YES: // Yes, delete break; case NO: // No, dont delete @@ -241,11 +250,14 @@ void Area::DelMsgs(GMsg* msg) { w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL); } } - if(n == 0) { + + if (n == 0) + { Mark.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); DeleteMsg(msg, reader_direction); }