Patch level : 10.0 0030

Files correlati     : ba7.exe
Ricompilazione Demo : [ ]
Commento           :

Espresso l'intervallo per il postino in secondi


git-svn-id: svn://10.65.10.50/trunk@16468 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2008-04-07 11:06:28 +00:00
parent e37e923df2
commit b18b856b32
2 changed files with 20 additions and 17 deletions

View File

@ -552,7 +552,7 @@ void TMailer_mask::test_delete()
row->get(sender_pos, file); // Cartella di provenienza row->get(sender_pos, file); // Cartella di provenienza
file.add(id); file.add(id);
file.ext("ini"); file.ext("ini");
xvt_fsys_remove_file(file) != 0; xvt_fsys_remove_file(file);
deleted = true; deleted = true;
} }
else else
@ -1246,16 +1246,16 @@ bool TMailer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
xvt_timer_destroy(_timer_id); xvt_timer_destroy(_timer_id);
_timer_id = XVT_TIMER_ERROR; _timer_id = XVT_TIMER_ERROR;
} }
const long minutes = atol(o.get()); _interval = atol(o.get());
if (minutes > 0)
_interval = atoi(o.get()) * 60; if (_interval > 0)
else {
_interval = 5;
_timer_id = xvt_timer_create(win(), 1000L); _timer_id = xvt_timer_create(win(), 1000L);
_secs = 0L; _secs = 0L;
if (_timer_id == XVT_TIMER_ERROR) if (_timer_id == XVT_TIMER_ERROR)
return error_box("Impossibile impostare il timer"); return error_box("Impossibile impostare il timer");
} }
}
break; break;
case F_MESSAGES: case F_MESSAGES:
if (e == fe_init) if (e == fe_init)
@ -1400,9 +1400,12 @@ void TMailer_mask::auto_save_all()
test_delete(); test_delete();
if (sf.items() == 0) if (sf.items() == 0)
fill_messages(); fill_messages();
if (_interval > 0)
{
if (sf.items() > 0) if (sf.items() > 0)
save_all_lines(); save_all_lines();
} }
}
else else
NFCHECK("Can't save locked mail"); NFCHECK("Can't save locked mail");
} }

View File

@ -26,7 +26,7 @@ BEGIN
GROUP G_SUPERUSER GROUP G_SUPERUSER
END END
NUMBER F_TIMER 4 NUMBER F_TIMER 5
BEGIN BEGIN
PROMPT 41 0 "Controlla la posta ogni " PROMPT 41 0 "Controlla la posta ogni "
FLAGS "U" FLAGS "U"
@ -35,7 +35,7 @@ END
TEXT DLG_NULL TEXT DLG_NULL
BEGIN BEGIN
PROMPT 71 0 "minuti" PROMPT 72 0 "secondi"
END END
STRING F_SERVER 80 28 STRING F_SERVER 80 28