Patch level : 4.0 892
Files correlati : ba7.exe Ricompilazione Demo : [ ] Commento : Impostato un intervallo di 5 sec. se nel campo minuti si mette 0 git-svn-id: svn://10.65.10.50/trunk@16225 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
293be474ae
commit
c5b5ec3cfd
@ -453,6 +453,7 @@ class TMailer_mask : public TAutomask
|
|||||||
{
|
{
|
||||||
long _timer_id;
|
long _timer_id;
|
||||||
long _secs;
|
long _secs;
|
||||||
|
long _interval;
|
||||||
int _mail_semaphore;
|
int _mail_semaphore;
|
||||||
TMail_messages _box;
|
TMail_messages _box;
|
||||||
bool _sequential;
|
bool _sequential;
|
||||||
@ -1214,13 +1215,14 @@ bool TMailer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
|||||||
}
|
}
|
||||||
const long minutes = atol(o.get());
|
const long minutes = atol(o.get());
|
||||||
if (minutes > 0)
|
if (minutes > 0)
|
||||||
{
|
_interval = atoi(o.get()) * 60;
|
||||||
|
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)
|
||||||
@ -1383,7 +1385,7 @@ void TMailer_mask::handler(WINDOW win, EVENT* ep)
|
|||||||
if (ep->v.timer.id == _timer_id)
|
if (ep->v.timer.id == _timer_id)
|
||||||
{
|
{
|
||||||
_secs++;
|
_secs++;
|
||||||
if (_secs >= get_long(F_TIMER) * 60)
|
if (_secs >= _interval)
|
||||||
{
|
{
|
||||||
_secs = 0L;
|
_secs = 0L;
|
||||||
if (_mail_semaphore == 0)
|
if (_mail_semaphore == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user