New config file token AreaRecycleBin
This commit is contained in:
parent
25f08406b1
commit
f15607a27e
@ -432,6 +432,10 @@ AREAREPLYTO E-MAIL
|
||||
// <echoid>
|
||||
;AREAYOUWROTETO MY_MAILS
|
||||
|
||||
// AreaRecycleBin <area>
|
||||
// If enabled, GoldEd will move deleted messages to <area>.
|
||||
;AreaRecycleBin RECYCLE.BIN
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- STATUSLINE
|
||||
|
||||
|
@ -433,6 +433,10 @@ AreaCopyTo ZZZ.MY.ARCHIVE
|
||||
// ‚ £à㯯 å íâ®â ¯ à ¬¥âà à ¡®â ¥â á ¢¥àᨨ 3.00.a5.
|
||||
AreaCopyAddId No
|
||||
|
||||
// AreaRecycleBin <area>
|
||||
// “áâ ®˘Ş ®ˇ« áâ¨, Şă¤ GoldEd ŻĄŕĄ¬Ąáâ¨â Ż¨áě¬ Żŕ¨ 㤠«Ą¨¨.
|
||||
;AreaRecycleBin RECYCLE.BIN
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- ‘’<E28098>ŽŠ€ ‘Ž‘’ŽŸ<C5BD>ˆŸ
|
||||
|
@ -10,6 +10,9 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
+ New config file token AreaRecycleBin <area>. GoldEd will move deleted
|
||||
messages to <area>, if this token is defined.
|
||||
|
||||
+ New config file token: ColorName <name/address> <color>.
|
||||
This is used to define special color for some names and/or addresses.
|
||||
Color must be an integer.
|
||||
|
@ -642,6 +642,7 @@ CfgGed::CfgGed() {
|
||||
*areacfmreplyto = 0;
|
||||
*areacopyto = 0;
|
||||
*areafreqto = 0;
|
||||
*arearecyclebin = 0;
|
||||
*areareplyto = 0;
|
||||
*areastart = 0;
|
||||
*areayouwroteto = 0;
|
||||
|
@ -75,6 +75,7 @@ const word CRC_AREAPMSCAN = 0xE19D;
|
||||
const word CRC_AREAPMSCANEXCL = 0xA2BE;
|
||||
const word CRC_AREAPMSCANINCL = 0x9524;
|
||||
const word CRC_AREAREADONLY = 0xE4F3;
|
||||
const word CRC_AREARECYCLEBIN = 0xDCB4;
|
||||
const word CRC_AREARENAME = 0xFC32;
|
||||
const word CRC_AREAREPLYDIRECT = 0x7570;
|
||||
const word CRC_AREAREPLYTO = 0x7157;
|
||||
|
@ -218,6 +218,7 @@ SwitchA:
|
||||
case CRC_AREAPMSCANEXCL : CfgAreapmscanexcl (); break;
|
||||
case CRC_AREAPMSCANINCL : CfgAreapmscanincl (); break;
|
||||
case CRC_AREAREADONLY : CfgAreareadonly (); break;
|
||||
case CRC_AREARECYCLEBIN : CfgArearecyclebin (); break;
|
||||
case CRC_AREARENAME : CfgArearename (); break;
|
||||
case CRC_AREAREPLYDIRECT : CfgAreareplydirect (); break;
|
||||
case CRC_AREAREPLYTO : CfgAreareplyto (); break;
|
||||
|
@ -422,6 +422,13 @@ void CfgAreareadonly() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgArearecyclebin()
|
||||
{
|
||||
strupr(strxcpy(CFG->arearecyclebin, val, sizeof(Echo)));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgArearename() {
|
||||
|
||||
char* key;
|
||||
|
@ -76,6 +76,7 @@ void CfgAreapmscan ();
|
||||
void CfgAreapmscanexcl ();
|
||||
void CfgAreapmscanincl ();
|
||||
void CfgAreareadonly ();
|
||||
void CfgArearecyclebin ();
|
||||
void CfgArearename ();
|
||||
void CfgAreareplydirect ();
|
||||
void CfgAreareplyto ();
|
||||
|
@ -165,6 +165,7 @@ public:
|
||||
gstrarray areapmscanexcl;
|
||||
gstrarray areapmscanincl;
|
||||
int areareadonly;
|
||||
Echo arearecyclebin;
|
||||
std::vector<EchoRen> arearename;
|
||||
bool areareplydirect;
|
||||
Echo areareplyto;
|
||||
|
@ -149,6 +149,15 @@ void Area::DelMsgs(GMsg* msg) {
|
||||
|
||||
GFTRK("DelMsgs");
|
||||
|
||||
int areano = AL.AreaEchoToNo(CFG->arearecyclebin);
|
||||
int currno = AL.AreaIdToNo(CurrArea);
|
||||
if ((areano != currno) && (areano >= 0))
|
||||
{
|
||||
CopyMoveForward(true);
|
||||
GFTRK(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
uint n, x;
|
||||
int topline=0;
|
||||
bool delask=true, dellocked=false;
|
||||
@ -272,14 +281,20 @@ void Area::DelMsg() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CmfMsgs(GMsg* msg) {
|
||||
|
||||
void CmfMsgs(GMsg* msg, bool torecycle)
|
||||
{
|
||||
// Select action
|
||||
GMenuCMF MenuCMF;
|
||||
int cmf = MenuCMF.Run();
|
||||
if(cmf == -1)
|
||||
return;
|
||||
|
||||
int cmf;
|
||||
|
||||
if (torecycle) cmf = MODE_MOVE;
|
||||
else
|
||||
{
|
||||
GMenuCMF MenuCMF;
|
||||
cmf = MenuCMF.Run();
|
||||
if(cmf == -1)
|
||||
return;
|
||||
}
|
||||
|
||||
// Set language strings
|
||||
char* pickstr = NULL;
|
||||
char* markstr = NULL;
|
||||
@ -301,11 +316,24 @@ void CmfMsgs(GMsg* msg) {
|
||||
if(not MenuReadonly.Run())
|
||||
return;
|
||||
}
|
||||
GFTRK("MoveMsgs");
|
||||
pickstr = LNG->MoveArea;
|
||||
markstr = LNG->Move;
|
||||
progstr = LNG->Moving;
|
||||
statstr = LNG->MovingMsg;
|
||||
|
||||
if (torecycle)
|
||||
{
|
||||
GFTRK("DeleteMsgs");
|
||||
pickstr = ">>Delete To Area: ";
|
||||
markstr = " Delete ";
|
||||
progstr = " Deleting ";
|
||||
statstr = "Deleting Msg %u of %u to %s";
|
||||
}
|
||||
else
|
||||
{
|
||||
GFTRK("MoveMsgs");
|
||||
pickstr = LNG->MoveArea;
|
||||
markstr = LNG->Move;
|
||||
progstr = LNG->Moving;
|
||||
statstr = LNG->MovingMsg;
|
||||
}
|
||||
|
||||
loadmode |= GMSG_MOVE;
|
||||
break;
|
||||
case MODE_FORWARD:
|
||||
@ -379,14 +407,22 @@ void CmfMsgs(GMsg* msg) {
|
||||
|
||||
// Pick the destination area
|
||||
int destarea = CurrArea;
|
||||
const char* cmfptr = cmf == MODE_FORWARD ? AA->Areareplyto() : AA->Areacopyto();
|
||||
const char* cmfptr;
|
||||
|
||||
if (torecycle)
|
||||
cmfptr = CFG->arearecyclebin;
|
||||
else
|
||||
cmfptr = cmf == MODE_FORWARD ? AA->Areareplyto() : AA->Areacopyto();
|
||||
|
||||
if(*cmfptr) {
|
||||
int a = AL.AreaEchoToNo(cmfptr);
|
||||
if(a != -1)
|
||||
destarea = AL.AreaNoToId(a);
|
||||
}
|
||||
if(cmf == MODE_FORWARD ? not AA->Areaforwarddirect() : not AA->Areacopydirect())
|
||||
|
||||
if (torecycle || (cmf == MODE_FORWARD ? not AA->Areaforwarddirect() : not AA->Areacopydirect()))
|
||||
destarea = AreaPick(pickstr, 6, &destarea);
|
||||
|
||||
if(destarea == -1) {
|
||||
GFTRK(NULL);
|
||||
return;
|
||||
@ -637,15 +673,15 @@ void CmfMsgs(GMsg* msg) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CopyMoveForward() {
|
||||
|
||||
void CopyMoveForward(bool torecycle)
|
||||
{
|
||||
uint lastread = reader_msg->msgno;
|
||||
|
||||
AA->set_lastread(AA->Msgn.ToReln(lastread, AA->lastread()));
|
||||
|
||||
AA->attr().hex0();
|
||||
if(AA->Msgn.Count())
|
||||
CmfMsgs(reader_msg);
|
||||
CmfMsgs(reader_msg, torecycle);
|
||||
|
||||
AA->set_lastread(AA->Msgn.ToReln(lastread, AA->lastread()));
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg);
|
||||
// ------------------------------------------------------------------
|
||||
// GEDOIT prototypes
|
||||
|
||||
void CmfMsgs(GMsg* msg);
|
||||
void CmfMsgs(GMsg* msg, bool torecycle);
|
||||
void LoadText(GMsg* msg, const char* textfile);
|
||||
void SaveLines(int mode, const char* savefile, GMsg* msg, int margin, bool clip=false);
|
||||
|
||||
@ -303,7 +303,7 @@ void ChangeAttributes();
|
||||
void ChangeMsg();
|
||||
void CommentMsg();
|
||||
void ConfirmMsg();
|
||||
void CopyMoveForward();
|
||||
void CopyMoveForward(bool torecycle = false);
|
||||
void DecMargin();
|
||||
void DosShell();
|
||||
void ExitAsk();
|
||||
|
Reference in New Issue
Block a user