Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento :rimesso in funzione il patch killer! git-svn-id: svn://10.65.10.50/trunk@16480 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
14e048d343
commit
0c732000c3
@ -1516,7 +1516,7 @@ bool TCreadischi_mask::why_handler(TMask_field& f, KEY k)
|
||||
bool TCreadischi_mask::testpatch_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k != K_SPACE)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
TMask& m = f.mask();
|
||||
const TString& module = m.get(S_MODULE);
|
||||
@ -1533,14 +1533,16 @@ bool TCreadischi_mask::testpatch_handler(TMask_field& f, KEY k)
|
||||
|
||||
if (inifiles.items() > 0)
|
||||
{
|
||||
TProgind pi(inifiles.items(), TR("Scansione archivi..."), FALSE, TRUE);
|
||||
TProgind pi(inifiles.items(), TR("Scansione archivi..."), true, true);
|
||||
TAssoc_array files;
|
||||
TString_array para;
|
||||
TToken_string tok;
|
||||
FOR_EACH_ARRAY_ROW_BACK(inifiles, numf, filename)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
bool can_be_deleted = TRUE;
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
|
||||
bool can_be_deleted = true;
|
||||
TConfig ini(*filename, module);
|
||||
ini.list_paragraphs(para);
|
||||
FOR_EACH_ARRAY_ROW_BACK(para, nump, paraname) if (paraname->len() == 3)
|
||||
@ -1558,7 +1560,7 @@ bool TCreadischi_mask::testpatch_handler(TMask_field& f, KEY k)
|
||||
if (!files.is_key(tok))
|
||||
{
|
||||
files.add(tok);
|
||||
can_be_deleted = FALSE;
|
||||
can_be_deleted = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1566,7 +1568,7 @@ bool TCreadischi_mask::testpatch_handler(TMask_field& f, KEY k)
|
||||
if (can_be_deleted)
|
||||
filename->insert(" |", 0);
|
||||
else
|
||||
inifiles.destroy(numf, TRUE);
|
||||
inifiles.destroy(numf, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1576,27 +1578,37 @@ bool TCreadischi_mask::testpatch_handler(TMask_field& f, KEY k)
|
||||
if (sheet.run() == K_ENTER)
|
||||
{
|
||||
const long tot = sheet.checked();
|
||||
if (tot > 0 && yesno_box(FR("Confermare la cancellazione di %ld file"), tot))
|
||||
if (tot > 0 && yesno_box(FR("Confermare la cancellazione di %ld patches"), tot))
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
for (long i = sheet.items()-1; i >= 0; i--) if (sheet.checked(i))
|
||||
{
|
||||
for (int d = 1; d <= 9; d++)
|
||||
const TFilename ininame = sheet.row(i).get(1);
|
||||
if (::remove(ininame) == 0)
|
||||
{
|
||||
TFilename name = sheet.row(i).get(1);
|
||||
name.ext(""); name << d << ".zip";
|
||||
if (::remove(name) != 0)
|
||||
{
|
||||
if (d == 1)
|
||||
error_box(FR("Errore di cancellazione del file %s"), (const char*)name);
|
||||
break;
|
||||
TFilename name;
|
||||
for (int d = 1; d <= 9; d++)
|
||||
{
|
||||
name = ininame;
|
||||
name.ext(""); name << d << ".zip";
|
||||
if (::remove(name) != 0)
|
||||
{
|
||||
if (d == 1)
|
||||
error_box(FR("Errore di cancellazione del file %s"), (const char*)name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
error_box(FR("Errore di cancellazione del file %s"), (const char*)ininame);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TCreadischi_mask::import_export_handler(TMask_field& f, KEY k)
|
||||
|
Loading…
x
Reference in New Issue
Block a user