Patch level : 10.0

Files correlati     : ba1
Ricompilazione Demo : [ ]
Commento            :
Migliorata gestione aggiornamenti da internet


git-svn-id: svn://10.65.10.50/trunk@17445 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-10-22 08:18:26 +00:00
parent 9e276fee1d
commit c0360b4ecf
5 changed files with 46 additions and 30 deletions

View File

@ -627,8 +627,8 @@ bool TAttivazione_moduli::change_users_handler(TMask_field& fld, KEY key)
{ {
app()._wanted_users = utenti; app()._wanted_users = utenti;
if (utenti > 0) if (utenti > 0)
fld.message_box(TR("Premere il bottone '%s'\nper richiedere l'attivazione di %d utenti."), fld.message_box(TR("Premere 'Stampa'\nper richiedere l'attivazione di %d utenti."),
fld.mask().field(F_PRINT).prompt(), utenti); utenti);
} }
else else
{ {
@ -703,8 +703,8 @@ bool TAttivazione_moduli::change_assist_handler(TMask_field& fld, KEY key)
if (m.field(102).empty()) if (m.field(102).empty())
{ {
app()._wanted_assist = year; app()._wanted_assist = year;
fld.message_box(FR("Premere il bottone '%s'\nper rinnovare il contratto di assistenza per l'anno %u."), fld.message_box(FR("Premere 'Stampa'\nper richiedere il contratto di assistenza per l'anno %u."),
fld.mask().field(F_PRINT).prompt(), year); year);
} }
else else
{ {
@ -1197,8 +1197,8 @@ bool TAttivazione_moduli::create()
if (!ok) if (!ok)
{ {
ok = update_assistance_year(); ok = update_assistance_year();
if (ok) if (ok && TApplication::test_assistance_year())
return false; return false; // Aggiornamento automatico riuscito!
} }
_im = new TInformazione_moduli; _im = new TInformazione_moduli;

View File

@ -1,21 +1,41 @@
#include "ba1500a.h" #include "ba1500a.h"
TOOLBAR "" 0 -2 0 2 TOOLBAR "" 0 0 0 2
BUTTON DLG_OK 10 2 BUTTON DLG_OK 10 2
BEGIN BEGIN
PROMPT -13 -11 "" PROMPT -16 -11 ""
END
BUTTON DLG_SETPRINT 10 2
BEGIN
PROMPT -26 -11 "~Imposta"
PICTURE BMP_SETPRINT
END END
BUTTON F_PRINT 10 2 BUTTON F_PRINT 10 2
BEGIN BEGIN
PROMPT -23 -11 "~Stampa" PROMPT -36 -11 "~Stampa"
PICTURE BMP_PRINT PICTURE BMP_PRINT
END END
BUTTON DLG_INFO 2 2
BEGIN
PROMPT -46 -11 "Info"
MESSAGE EXIT,K_F2
PICTURE BMP_INFO
END
BUTTON DLG_HELP 2 2
BEGIN
PROMPT -56 -11 "Help"
MESSAGE EXIT,K_F1
PICTURE BMP_HELP
END
BUTTON DLG_QUIT 10 2 BUTTON DLG_QUIT 10 2
BEGIN BEGIN
PROMPT -33 -11 "" PROMPT -66 -11 ""
END END
ENDPAGE ENDPAGE

View File

@ -130,6 +130,7 @@ protected:
bool add_header(TConfig& ini, const TString& module); bool add_header(TConfig& ini, const TString& module);
int precheck_modules(bool only_newer=true); int precheck_modules(bool only_newer=true);
void update_version(); void update_version();
void update_install_ini() const;
int needs_reboot(const TFilename& file) const; int needs_reboot(const TFilename& file) const;
bool move_file(const TFilename& src, const TFilename& dst) const; bool move_file(const TFilename& src, const TFilename& dst) const;
@ -311,8 +312,8 @@ void TInstaller_mask::update_version()
{ {
TInstall_ini ini; TInstall_ini ini;
TString_array& array = rows_array(); TString_array& a = rows_array();
FOR_EACH_ARRAY_ROW_BACK(array, m, row) FOR_EACH_ARRAY_ROW_BACK(a, m, row)
{ {
if (*row->get(C_CODE) != ' ') if (*row->get(C_CODE) != ' ')
{ {
@ -1296,6 +1297,15 @@ bool TInstaller_mask::web_handler(TMask_field& fld, KEY key)
return ok; return ok;
} }
// Aggiorna l'install.ini con eventuali modifiche dell'utente.
// Decisivo in caso di cambio path d'installazione
void TInstaller_mask::update_install_ini() const
{
TInstall_ini ini;
ini.set("DiskPath", get(F_PATH));
ini.set("WebPath", get(F_WEB));
}
void TInstaller_mask::install_selection() void TInstaller_mask::install_selection()
{ {
TString_array& arr = rows_array(); TString_array& arr = rows_array();
@ -1412,17 +1422,9 @@ void TInstaller_mask::install_selection()
} }
} }
//aggiorna l'install.ini con eventuali modifiche dell'utente (decisivo in caso di cambio path.. update_install_ini(); //aggiorna l'install.ini
//..di installazione)
{
TInstall_ini ini;
ini.set("DiskPath", get(F_PATH));
ini.set("WebPath", get(F_WEB));
}
//lancia setup in modalita' aggiornamento da disco //lancia setup in modalita' aggiornamento da disco
_setup_run = xvt_sys_execute("setup\\setup.exe -ud", false, false) !=0; _setup_run = xvt_sys_execute("setup\\setup.exe -ud", false, false) !=0;
} }
//richiesto aggiornamento via web del modulo SY da manutenzione/installazione moduli! //richiesto aggiornamento via web del modulo SY da manutenzione/installazione moduli!
else else
@ -1448,14 +1450,8 @@ void TInstaller_mask::install_selection()
remote_file.add(*row); remote_file.add(*row);
file_copied = http_get(http_server, remote_file, local_file); //occhio alle maiuscole!!!! file_copied = http_get(http_server, remote_file, local_file); //occhio alle maiuscole!!!!
} }
//aggiorna l'install.ini con eventuali modifiche dell'utente (decisivo in caso di cambio path..
//..di installazione)
{
TInstall_ini ini;
ini.set("DiskPath", get(F_PATH));
ini.set("WebPath", get(F_WEB));
}
} }
update_install_ini(); //aggiorna l'install.ini
//lancia setup in modalita' aggiornamento web //lancia setup in modalita' aggiornamento web
_setup_run = xvt_sys_execute("setup\\setup.exe -uw", false, false) != 0; _setup_run = xvt_sys_execute("setup\\setup.exe -uw", false, false) != 0;
} }

View File

@ -14,7 +14,6 @@
#include <utility.h> #include <utility.h>
#include <xml.h> #include <xml.h>
#include "../sqlite/sqlite3.h"
#include "ba8200.h" #include "ba8200.h"
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////

View File

@ -159,10 +159,11 @@ void TSection_properties_mask::vedo_non_vedo()
const int level = get_int(F_LEVEL); const int level = get_int(F_LEVEL);
const bool can_pos = (type != 'H' && level == 0) || (type == 'F' && level == 1); const bool can_pos = (type != 'H' && level == 0) || (type == 'F' && level == 1);
show(F_X, can_pos); show(F_Y, can_pos); show(F_X, can_pos); show(F_Y, can_pos);
show(F_CONDITION, /*type == 'B' &&*/ level > 0 && level < 10); show(F_CONDITION, level > 0 && level < 10);
show(F_GROUP_BY, type == 'H' && level > 1 && level < 10); show(F_GROUP_BY, type == 'H' && level > 1 && level < 10);
show(F_SQL, type == 'B' && level > 10); show(F_SQL, type == 'B' && level > 10);
show(F_PAGE_BREAK, level > 0); // Non posso forzare il salto pagina nelle sezioni di pagina
show(F_KEEP_WITH_NEXT, level > 1 && type == 'H'); show(F_KEEP_WITH_NEXT, level > 1 && type == 'H');
show(F_CAN_BREAK, level > 0 && type == 'B'); show(F_CAN_BREAK, level > 0 && type == 'B');
show(F_HIDE_IF_NEEDED, level == 0 && type != 'B'); show(F_HIDE_IF_NEEDED, level == 0 && type != 'B');