Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : prima parte del supporto per aggiornamento web intelligente git-svn-id: svn://10.65.10.50/trunk@19965 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3b0546a598
commit
88a58845ec
@ -422,6 +422,9 @@ bool TInstaller_mask::autoload()
|
||||
//se e' un aggiornamento via internet...
|
||||
if (internet)
|
||||
{
|
||||
if (!(xvt_net_get_status() & 0x4)) //la connessione web funziona?...
|
||||
return warning_box("Impossibile connettersi al sito con gli aggiornamenti\nVerificare che la connessione Internet sia attiva !");
|
||||
|
||||
parse_internet_path(http_server, http_path); //controlla il path internet scritto nel campo sulla maschera
|
||||
|
||||
//se si ritrova dei vecchi file nella directory temporanea, la pulisce per evitare casini
|
||||
@ -535,11 +538,16 @@ bool TInstaller_mask::autoload()
|
||||
|
||||
if (internet) //internet patches
|
||||
{
|
||||
TProgind pi(1, TR("Controllo lista aggiornamenti"), false); //progind NON bloccabile: causa errore impossibile!
|
||||
http_dir(http_server, http_path, modules);
|
||||
pi.setmax(modules.items());
|
||||
pi.set_text(TR("Download lista aggiornamenti"));
|
||||
for (int i = modules.last(); i >= 0; i--)
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
TString& str = modules.row(i);
|
||||
if (str.match("??????A.INI", true))
|
||||
if (str.match("??????a.ini", true))
|
||||
{
|
||||
TFilename remote = http_path;
|
||||
remote << str;
|
||||
@ -1811,12 +1819,10 @@ TInstaller_mask::TInstaller_mask()
|
||||
autoload();
|
||||
else //senno' cerca su internet se trova un path internet completo e la connessione funzionante
|
||||
{
|
||||
if (_station_type != 3 && webpath.full())
|
||||
if (_station_type != 3 && webpath.find("aga.it") > 0)
|
||||
{
|
||||
set(F_TYPE, "1", 0x1);
|
||||
if (xvt_net_get_status() & 0x2) //la connessione web funziona?...
|
||||
//if (yesno_box(TR("E' possibile l'aggiornamento via internet. Si desidera connettersi ora?")))
|
||||
autoload(); //...quindi scarica l'elenco dei moduli da aggiornare!
|
||||
autoload();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <wx/sysopt.h>
|
||||
#include <wx/thread.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/url.h>
|
||||
|
||||
#if wxCHECK_VERSION(2,9,0)
|
||||
#include <wx/propgrid.h>
|
||||
@ -3090,6 +3091,8 @@ BOOLEAN xvt_chr_is_alnum(int c)
|
||||
int xvt_net_get_status()
|
||||
{
|
||||
int nStatus = 0;
|
||||
//stoppa il log di wxWidgets per non avere segnalazioni di errori incomprensibili!
|
||||
const bool bLogEnabled = wxLog::EnableLogging(false);
|
||||
wxDialUpManager* dum = wxDialUpManager::Create();
|
||||
if (dum != NULL)
|
||||
{
|
||||
@ -3100,14 +3103,14 @@ int xvt_net_get_status()
|
||||
if (dum->IsAlwaysOnline())
|
||||
{
|
||||
nStatus |= 0x2; // 2 = Always Online
|
||||
|
||||
wxArrayString isp;
|
||||
if (dum->GetISPNames(isp) > 0)
|
||||
nStatus |= 0x4; // 4 = Internet enabled
|
||||
wxIPV4address addr;
|
||||
if (addr.Hostname("www.google.com"))
|
||||
nStatus |= 0x4;
|
||||
}
|
||||
}
|
||||
delete dum;
|
||||
}
|
||||
wxLog::EnableLogging(bLogEnabled);
|
||||
return nStatus;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user