Ritocchi per 12.0
git-svn-id: svn://10.65.10.50/branches/R_10_00@23119 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
84eca849b1
commit
b3087bdca7
@ -1519,6 +1519,37 @@ bool TMenu_application::user_create()
|
||||
"Esso funzionerà con alcune limitazioni sulle registrazioni.\n"
|
||||
"Si desidera proseguire?")))
|
||||
return false;
|
||||
|
||||
TString_array ssa;
|
||||
int nssa = list_files("*.ssa", ssa);
|
||||
if (nssa == 0)
|
||||
{
|
||||
nssa = list_files("setup/*.ssax", ssa);
|
||||
if (nssa == 0)
|
||||
{
|
||||
TExternal_app app("setup/ssagetinfo");
|
||||
app.run(false, 0, false);
|
||||
nssa = list_files("setup/*.ssax", ssa);
|
||||
}
|
||||
if (nssa > 0)
|
||||
{
|
||||
TFilename dst;
|
||||
if (xvt_fsys_get_desktop(dst.get_buffer()) == NOERR)
|
||||
{
|
||||
TFilename src = ssa.row(0);
|
||||
dst.add(src.name());
|
||||
if (xvt_fsys_fcopy(src, dst))
|
||||
{
|
||||
TFilename key = dst.name(); key.ext("ssa");
|
||||
DIRECTORY dir; xvt_fsys_get_default_dir(&dir);
|
||||
message_box(TR("E' stato creato sul desktop il file %s\n"
|
||||
"Inviatelo ad abilitazioni_campo@sirio-is.it per ottenere il corrispondente\n"
|
||||
"file %s da copiare in %s"),
|
||||
dst.name(), key.name(), dir.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -175,4 +175,6 @@ public:
|
||||
void set_installing_flag();
|
||||
bool installing();
|
||||
|
||||
int xvt_fsys_get_desktop(char* dir);
|
||||
|
||||
#endif
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include <applicat.h>
|
||||
#include <dongle.h>
|
||||
#include <diction.h>
|
||||
#include <isam.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <sheet.h>
|
||||
#include <statbar.h>
|
||||
@ -119,11 +117,11 @@ void TPackFiles_application::search_blanks(TSystemisamfile& f)
|
||||
|
||||
void TPackFiles_application::pack_all()
|
||||
{
|
||||
TProgind p(_selsheet->checked(), TR("Compattazione in corso..."), true, true);
|
||||
TProgress_monitor p(_selsheet->checked(), TR("Compattazione in corso..."));
|
||||
safely_close_closeable_isamfiles();
|
||||
FOR_EACH_CHECKED_ROW(*_selsheet, k, row)
|
||||
{
|
||||
if (!p.addstatus(1))
|
||||
if (!p.add_status())
|
||||
break;
|
||||
const int i = row->get_int(1);
|
||||
TDir d(i);
|
||||
|
@ -181,7 +181,9 @@ bool Tdnist_full::save(int version) const
|
||||
|
||||
if (done)
|
||||
{
|
||||
const int ass_year = version < 11 ? 2101 : 2121;
|
||||
int ass_year = 2151;
|
||||
if (version < 12)
|
||||
ass_year = version < 11 ? 2101 : 2121;
|
||||
ofstream out(DNINST_TXT);
|
||||
out << ass_year << endl;
|
||||
FOR_EACH_ARRAY_ITEM(_chiavi, key, obj)
|
||||
@ -197,7 +199,7 @@ bool Tdnist_full::save(int version) const
|
||||
{
|
||||
done = dninst.encode(DNINST_TXT);
|
||||
#ifdef DBG
|
||||
if (version == 11)
|
||||
if (version == 12)
|
||||
fcopy(DNINST_TXT, "../src/setup/dninst.txt");
|
||||
#endif
|
||||
}
|
||||
@ -564,37 +566,37 @@ bool Tdninst_mask::load_xml(TString_array& a) const
|
||||
|
||||
bool Tdninst_mask::get_remote_dninst()
|
||||
{
|
||||
const TString& n = remote_dninst(11);
|
||||
if (n.full())
|
||||
{
|
||||
const int minsize = 46*1024;
|
||||
if (fcopy(n, DNINST_BAK, false, true))
|
||||
{
|
||||
const int size = fsize(DNINST_BAK);
|
||||
if (size > minsize)
|
||||
{
|
||||
fcopy(DNINST_BAK, DNINST_ZIP);
|
||||
remove(DNINST_BAK);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
TString msg; msg << TR("Il file dninst.zip remoto pesa solo ") << size << " bytes";
|
||||
if (is_running())
|
||||
error_box(msg);
|
||||
else
|
||||
log(2, msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_running())
|
||||
cantread_box(n);
|
||||
TFilename rem12 = remote_dninst(12);
|
||||
TFilename loc12; loc12.temp("dni12", "zip");
|
||||
if (rem12.full())
|
||||
fcopy(rem12, loc12, false, true);
|
||||
|
||||
TFilename rem11 = remote_dninst(11);
|
||||
TFilename loc11; loc11.temp("dni11", "zip");
|
||||
if (rem11.full())
|
||||
fcopy(rem11, loc11, false, true);
|
||||
|
||||
if (fsize(loc12) >= fsize(loc11))
|
||||
fcopy(loc12, DNINST_BAK);
|
||||
else
|
||||
fcopy(loc11, DNINST_BAK);
|
||||
|
||||
loc11.fremove();
|
||||
loc12.fremove();
|
||||
|
||||
const int minsize = 46*1024;
|
||||
const int size = fsize(DNINST_BAK);
|
||||
if (size > minsize)
|
||||
{
|
||||
TString msg; msg << TR("Impossibile leggere ") << n;
|
||||
log(2, msg);
|
||||
fcopy(DNINST_BAK, DNINST_ZIP);
|
||||
remove(DNINST_BAK);
|
||||
return true;
|
||||
}
|
||||
TString msg; msg << TR("Il file dninst.zip remoto pesa solo ") << size << " bytes";
|
||||
if (is_running())
|
||||
error_box(msg);
|
||||
else
|
||||
log(2, msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -843,29 +845,24 @@ void Tdninst_mask::save_sheet()
|
||||
}
|
||||
}
|
||||
|
||||
int y, v, t, p;
|
||||
main_app().get_version_info(y, v, t, p);
|
||||
const int curr = v;
|
||||
const int prev = v-1;
|
||||
|
||||
if (_dninst.save(prev))
|
||||
{
|
||||
fill_sheet();
|
||||
const TFilename ftp10 = remote_dninst(prev);
|
||||
if (ftp10 != DNINST_ZIP && ftp10.starts_with("ftp://"))
|
||||
if (!is_running() || yesno_box(FR("Copiare il DNINST locale in %s?"), (const char*)ftp10))
|
||||
{
|
||||
send_remote_dninst(ftp10);
|
||||
|
||||
if (fcopy(DNINST_ZIP, DNINST_BAK))
|
||||
{
|
||||
_dninst.save(curr);
|
||||
const TFilename ftp11 = remote_dninst(curr);
|
||||
send_remote_dninst(ftp11);
|
||||
fcopy(DNINST_BAK, DNINST_ZIP);
|
||||
remove(DNINST_BAK);
|
||||
}
|
||||
if (fcopy(DNINST_ZIP, DNINST_BAK))
|
||||
{
|
||||
int y, v, t, p;
|
||||
main_app().get_version_info(y, v, t, p);
|
||||
const int curr = v;
|
||||
|
||||
for (int prev = 10; prev <= curr; prev++) if (_dninst.save(prev))
|
||||
{
|
||||
fill_sheet();
|
||||
const TFilename ftp = remote_dninst(prev);
|
||||
if (ftp != DNINST_ZIP && ftp.starts_with("ftp://"))
|
||||
if (!is_running() || yesno_box(FR("Copiare il DNINST locale in %s?"), (const char*)ftp))
|
||||
send_remote_dninst(ftp);
|
||||
}
|
||||
|
||||
fcopy(DNINST_BAK, DNINST_ZIP);
|
||||
remove(DNINST_BAK);
|
||||
_dninst.save(curr);
|
||||
}
|
||||
}
|
||||
|
@ -129,6 +129,7 @@ Item_01 = "Riattribuzione codice allegato", "bacnv 21", ""
|
||||
Item_02 = "Aggiornamento IV direttiva CEE", "bacnv 22", ""
|
||||
Item_03 = "Aggiornamento profili documento personalizzati", "bacnv 23", ""
|
||||
Item_04 = "Riattribuzione campi CONAI", "bacnv 24", ""
|
||||
Item_05 = "Gestione attivazione licenze", "ba2 -7", ""
|
||||
|
||||
[MENU_PREFERITI]
|
||||
Caption = "Preferiti"
|
||||
|
Loading…
x
Reference in New Issue
Block a user