Richieste conferme prima di cancellare i fax.
git-svn-id: svn://10.65.10.50/trunk@3627 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1dfb5c0cdf
commit
0814872523
40
ba/bafax.cpp
40
ba/bafax.cpp
@ -575,15 +575,19 @@ bool TLog_mask::log_notify(TSheet_field& s, int, KEY k)
|
||||
{
|
||||
if (k == K_INS)
|
||||
{
|
||||
TLog_mask& m = (TLog_mask&)s.mask();
|
||||
const WORD log = m.sheet2log(s);
|
||||
for (int i = s.items()-1; i >= 0; i--)
|
||||
const int last = s.items()-1;
|
||||
if (last >= 0 && yesno_box("Si conferma l'eliminazione dei fax?"))
|
||||
{
|
||||
const char* strid = s.row(i).get(0);
|
||||
unsigned long id; sscanf(strid, "%lu", &id);
|
||||
m._fax->log_delete(log, id);
|
||||
do_events();
|
||||
}
|
||||
TLog_mask& m = (TLog_mask&)s.mask();
|
||||
const WORD log = m.sheet2log(s);
|
||||
for (int i = last; i >= 0; i--)
|
||||
{
|
||||
const char* strid = s.row(i).get(0);
|
||||
unsigned long id; sscanf(strid, "%lu", &id);
|
||||
m._fax->log_delete(log, id);
|
||||
do_events();
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
@ -594,14 +598,14 @@ bool TLog_mask::delrec_handler(TMask_field& f, KEY k)
|
||||
if (k == K_SPACE)
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
TSheet_field& s = *m.get_sheet();
|
||||
|
||||
TLog_mask& l = (TLog_mask&)s.mask();
|
||||
const WORD log = l.sheet2log(s);
|
||||
|
||||
if (log)
|
||||
const char* strid = m.get(101);
|
||||
if (yesno_box("Si conferma l'eliminazione del fax %s?", strid))
|
||||
{
|
||||
const char* strid = m.get(101);
|
||||
TSheet_field& s = *m.get_sheet();
|
||||
TLog_mask& l = (TLog_mask&)s.mask();
|
||||
const WORD log = l.sheet2log(s);
|
||||
CHECK(log, "Invalid Fax log");
|
||||
unsigned long id; sscanf(strid, "%lu", &id);
|
||||
l._fax->log_delete(log, id);
|
||||
}
|
||||
@ -927,7 +931,13 @@ bool TDDE_fax::resend_fax(unsigned long id)
|
||||
PSEND_FAX sf;
|
||||
bool ok = FaxLogFind(_pappinfo, &sf, id) == 1;
|
||||
if (ok)
|
||||
{
|
||||
{
|
||||
const TFilename old_name(sf->szFileList);
|
||||
TFilename new_name(old_name); new_name.ext("FMP");
|
||||
rename(old_name, new_name); // Rinomina file
|
||||
FaxLogDelete(_pappinfo, id, sf->wLog); // Cancella fax
|
||||
do_events();
|
||||
rename(new_name, old_name); // Ripristina file
|
||||
FaxSchedule(_pappinfo, sf);
|
||||
GlobalFreePtr(sf);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user