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