diff --git a/ba/ba7100.cpp b/ba/ba7100.cpp index 88aa10621..947e1a67d 100755 --- a/ba/ba7100.cpp +++ b/ba/ba7100.cpp @@ -449,14 +449,14 @@ TFilter_expr::TFilter_expr(TAutomask& m, int logicnum, const char* expr) ok = join.exist(f.name()); } if (!ok) - { - _error = 883; - TString msg; - msg.format(FR("Il campo %s non appartiene al file %d"), varname(i), logicnum); - print_error(msg); - break; - } - } + { + _error = 883; + TString msg; + msg.format(FR("Il campo %s non appartiene al file %d"), varname(i), logicnum); + print_error(msg); + break; + } + } } } @@ -552,7 +552,7 @@ void TMailer_mask::test_delete() row->get(sender_pos, file); // Cartella di provenienza file.add(id); file.ext("ini"); - xvt_fsys_remove_file(file) != 0; + xvt_fsys_remove_file(file); deleted = true; } else @@ -1246,15 +1246,15 @@ bool TMailer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly xvt_timer_destroy(_timer_id); _timer_id = XVT_TIMER_ERROR; } - const long minutes = atol(o.get()); - if (minutes > 0) - _interval = atoi(o.get()) * 60; - else - _interval = 5; + _interval = atol(o.get()); + + if (_interval > 0) + { _timer_id = xvt_timer_create(win(), 1000L); _secs = 0L; if (_timer_id == XVT_TIMER_ERROR) return error_box("Impossibile impostare il timer"); + } } break; case F_MESSAGES: @@ -1399,9 +1399,12 @@ void TMailer_mask::auto_save_all() #endif test_delete(); if (sf.items() == 0) - fill_messages(); + fill_messages(); + if (_interval > 0) + { if (sf.items() > 0) save_all_lines(); + } } else NFCHECK("Can't save locked mail"); diff --git a/ba/ba7100a.uml b/ba/ba7100a.uml index 31eedfee6..b4093ad5e 100755 --- a/ba/ba7100a.uml +++ b/ba/ba7100a.uml @@ -26,7 +26,7 @@ BEGIN GROUP G_SUPERUSER END -NUMBER F_TIMER 4 +NUMBER F_TIMER 5 BEGIN PROMPT 41 0 "Controlla la posta ogni " FLAGS "U" @@ -35,7 +35,7 @@ END TEXT DLG_NULL BEGIN - PROMPT 71 0 "minuti" + PROMPT 72 0 "secondi" END STRING F_SERVER 80 28