Patch level :10.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :modifiche necessarie alla 10.0 per integrarsi con il nuovo setup (sparisce la chiamata a ba0close!!!!!)


git-svn-id: svn://10.65.10.50/trunk@15917 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2007-12-19 11:42:57 +00:00
parent 75e4c8fde0
commit 0ffe6d7ffb

View File

@ -996,7 +996,7 @@ bool TMenu_application::ask_user_password(TString& utente)
int mi; int mi;
for (mi = 2; mi <= 7; mi++) for (mi = 2; mi <= 7; mi++)
disable_menu_item(MENU_ITEM(mi)); disable_menu_item(MENU_ITEM(mi));
TMask m("ba0100a"); TMask m("ba0100a");
if (is_power_station()) if (is_power_station())
@ -1024,7 +1024,7 @@ bool TMenu_application::ask_user_password(TString& utente)
if (m.run() == K_ESC) if (m.run() == K_ESC)
break; break;
utente = m.get(F_USER); utente = m.get(F_USER);
TString pwd; TString pwd;
@ -1120,7 +1120,7 @@ bool TMenu_application::check_user()
if (use_system_user) if (use_system_user)
ok = !cache().get(LF_USER, utente).empty(); ok = !cache().get(LF_USER, utente).empty();
} }
if (!ok) if (!ok)
ok = ask_user_password(utente); ok = ask_user_password(utente);
@ -1217,34 +1217,34 @@ bool TMenu_application::copy_setup(const TString& remote_path)
TFilename remote_setupdir = remote_path; TFilename remote_setupdir = remote_path;
remote_setupdir.add(local_setupdir.name()); remote_setupdir.add(local_setupdir.name());
//controlla se esiste la directory;è necessario in quanto se è una vecchia 4.0 potrebbe non esserci //controlla se esiste la directory;è necessario in quanto se è una vecchia 4.0 potrebbe non esserci
if (remote_setupdir.exist()) if (remote_setupdir.exist())
{ {
remote_setupdir.add("*.*"); remote_setupdir.add("*.*");
TString_array ar; TString_array ar;
list_files(remote_setupdir, ar); list_files(remote_setupdir, ar);
if (!ar.empty()) if (!ar.empty())
{ {
make_dir(local_setupdir); make_dir(local_setupdir);
ok = true; ok = true;
TFilename strsrc, strdst; TFilename strsrc, strdst;
FOR_EACH_ARRAY_ROW (ar, i, row) FOR_EACH_ARRAY_ROW (ar, i, row)
{ {
strsrc = *row; strsrc = *row;
strdst = local_setupdir; strdst = local_setupdir;
strdst.add(strsrc.name()); strdst.add(strsrc.name());
//se la copia dei files si inchioda esce //se la copia dei files si inchioda esce
if (!fcopy(strsrc, strdst)) if (!fcopy(strsrc, strdst))
{ {
ok = false; ok = false;
break; break;
} }
} ////FOR_EACH_ARRAY... } //FOR_EACH_ARRAY...
} //if(!ar.empty... } //if(!ar.empty...
} //if(remote_setupdir... } //if(remote_setupdir...
return ok; return ok;
} }
@ -1348,15 +1348,15 @@ bool TMenu_application::test_programs()
//lancia setup in modalita' aggiornamento client e si suicida! (banzai!!) //lancia setup in modalita' aggiornamento client e si suicida! (banzai!!)
TExternal_app app("setup\\setup.exe -uc"); TExternal_app app("setup\\setup.exe -uc");
app.run(true); app.run(true);
} }
else //lancia l'installazione moduli alla vecchia maniera (e' una vecchia 4.0) else //lancia l'installazione moduli alla vecchia maniera (e' una vecchia 4.0)
{ {
TExternal_app app("ba1 -6 /uADMIN"); TExternal_app app("ba1 -6 /uADMIN");
app.run(true); app.run(true);
} }
//se lancia un'installazione->esce!!! //se lancia un'installazione->esce!!!
return false; return false;
} //(if(update_needed>0... } //(if(update_needed>0...
} //if(is_client.. } //if(is_client..
@ -1366,8 +1366,9 @@ bool TMenu_application::test_programs()
bool TMenu_application::user_create() bool TMenu_application::user_create()
{ {
disable_menu_item(M_FILE_PRINT); // Questa voce di menu non serve per ora
disable_menu_item(M_FILE_PRINT); // Questa voce di menu non serve per ora
if (dongle().type() == _no_dongle) if (dongle().type() == _no_dongle)
{ {
TMask w(TR("ATTENZIONE"), 1, 68, 10); TMask w(TR("ATTENZIONE"), 1, 68, 10);
@ -1381,7 +1382,7 @@ bool TMenu_application::user_create()
if (!check_user()) if (!check_user())
return false; return false;
if (!TApplication::test_assistance_year()) if (!TApplication::test_assistance_year())
{ {
TExternal_app app("ba1 -4"); TExternal_app app("ba1 -4");
@ -1424,12 +1425,6 @@ void TMenu_application::deconnect_user()
bool TMenu_application::destroy() bool TMenu_application::destroy()
{ {
deconnect_user(); deconnect_user();
if (sys_dll_changed())
{
TExternal_app ba0close("ba0close.exe");
ba0close.run(true, true, false); // run asynchronous...
}
return true; return true;
} }
@ -1450,7 +1445,6 @@ void TMenu_application::main_loop()
_menu.perform(); _menu.perform();
else else
run = m >= -1; run = m >= -1;
if (installing()) //esce dal ciclo se ha lanciato una installazione moduli if (installing()) //esce dal ciclo se ha lanciato una installazione moduli
break; break;
} }