R/O fixes

This commit is contained in:
Alexander S. Aganichev 2003-04-28 10:14:09 +00:00
parent 64f5bac2f4
commit 5643070f87
2 changed files with 17 additions and 0 deletions

View File

@ -296,6 +296,11 @@ void CmfMsgs(GMsg* msg) {
loadmode |= GMSG_COPY; loadmode |= GMSG_COPY;
break; break;
case MODE_MOVE: case MODE_MOVE:
if(AA->attr().r_o()) {
GMenuReadonly MenuReadonly;
if(not MenuReadonly.Run())
return;
}
GFTRK("MoveMsgs"); GFTRK("MoveMsgs");
pickstr = LNG->MoveArea; pickstr = LNG->MoveArea;
markstr = LNG->Move; markstr = LNG->Move;
@ -337,6 +342,8 @@ void CmfMsgs(GMsg* msg) {
return; return;
} }
int xlat_table = LoadCharset(NULL, NULL, 1);
AL.SetActiveAreaId(OrigArea); AL.SetActiveAreaId(OrigArea);
AreaData* orig_adat = AA->adat; AreaData* orig_adat = AA->adat;
AA->adat = (AreaData*)throw_calloc(1, sizeof(AreaData)); AA->adat = (AreaData*)throw_calloc(1, sizeof(AreaData));
@ -559,6 +566,11 @@ void CmfMsgs(GMsg* msg) {
AA->adat = orig_adat; AA->adat = orig_adat;
AA->Unlock(); AA->Unlock();
if(xlat_table != -1)
LoadCharset(CFG->xlatcharset[xlat_table].imp, CFG->xlatcharset[xlat_table].exp);
else
LoadCharset("N/A", "N/A");
if(do_mode == MODE_MARKED) { if(do_mode == MODE_MARKED) {
if(cmf == MODE_MOVE) if(cmf == MODE_MOVE)
AA->Mark.ResetAll(); AA->Mark.ResetAll();

View File

@ -666,6 +666,11 @@ void Reader() {
break; break;
case KK_ReadDeleteMsg: case KK_ReadDeleteMsg:
if(AA->attr().r_o()) {
GMenuReadonly MenuReadonly;
if(not MenuReadonly.Run())
break;
}
AA->DelMsg(); AA->DelMsg();
break; break;