Patch level : 10.0

Files correlati     : ba2
Ricompilazione Demo : [ ]
Commento            :
0001324: Backup su chiavetta USB
La procedura di backup non consente di selezionare i dischi "virtuali" ossia chiavette usb


git-svn-id: svn://10.65.10.50/trunk@18893 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-05-20 15:37:50 +00:00
parent da391e0167
commit 9bd3d6ed94
8 changed files with 114 additions and 57 deletions

View File

@ -140,8 +140,6 @@ TMenu& TMenuitem::menu() const
bool TMenuitem::create(const char* t) bool TMenuitem::create(const char* t)
{ {
bool visible = true;
TString16 flags; TString16 flags;
char brace; char brace;
int start = 0; int start = 0;
@ -157,7 +155,6 @@ bool TMenuitem::create(const char* t)
switch(toupper(flags[i])) switch(toupper(flags[i]))
{ {
case 'D': _exist = false; break; case 'D': _exist = false; break;
case 'E': visible = dongle().active(EEAUT); // Nascondi i moduli dipendenti da EE
case 'F': _firm = true; break; case 'F': _firm = true; break;
case 'P': _password = true; break; case 'P': _password = true; break;
case 'R': _reloadmenu = true; break; case 'R': _reloadmenu = true; break;
@ -166,9 +163,12 @@ bool TMenuitem::create(const char* t)
} }
} }
if (visible) bool visible = true;
{
if (_type == '<') if (_type == '<')
{
const word mod = dongle().module_name2code(_action.left(2));
visible = dongle().shown(mod);
if (visible)
{ {
if (_action.find('.') < 0) if (_action.find('.') < 0)
_action << ".men"; _action << ".men";
@ -179,19 +179,16 @@ bool TMenuitem::create(const char* t)
_action.cut(0); _action.cut(0);
_type = '['; _type = '[';
} }
else
_action.cut(0);
}
if (_action.blank()) if (!visible || _action.blank())
_exist = _enabled = false; _exist = _enabled = false;
// Controlla lo stato di aggiornamento // Controlla lo stato di aggiornamento
if (_enabled && is_program()) if (_enabled && is_program())
_enabled = !menu().is_dangerous(_action); _enabled = !menu().is_dangerous(_action);
}
else
{
_action.cut(0);
_exist = _enabled = false;
}
return visible; return visible;
} }

View File

@ -106,6 +106,8 @@ public:
bool query_firm() const { return _firm != 0; } bool query_firm() const { return _firm != 0; }
bool enabled() const; bool enabled() const;
bool disabled() const { return !enabled(); } bool disabled() const { return !enabled(); }
int module() const { return ((TToken_string&)_modules).get_int(0); }
void reset_permissions(); void reset_permissions();
bool perform(int i); bool perform(int i);

View File

@ -350,9 +350,9 @@ void TMenu::import(const char* filename, TString& first)
TFilename name = line.sub(bracket+1, endbracket); TFilename name = line.sub(bracket+1, endbracket);
if (name.custom_path()) if (name.custom_path())
{ {
bool proceed = true; const TString& mod = name.name_only().left(2);
if (line.find('E', endbracket+1) > 0) const word cod = dongle().module_name2code(mod);
proceed = dongle().active(EEAUT); const bool proceed = dongle().shown(cod);
if (proceed) if (proceed)
{ {
import(name, name); import(name, name);

View File

@ -185,10 +185,19 @@ bool TInstaller_mask::add_module(TConfig& ini, const TString& module, bool patch
if (!ini.set_paragraph(module)) if (!ini.set_paragraph(module))
return false; return false;
// Nasconde i moduli Enterprise Edition ad occhi indiscreti // Nasconde i moduli riservati da occhi indiscreti
const bool ee = ini.get_bool("Ee"); TAuto_token_string oem = ini.get("OEM");
if (ee && !dongle().active(EEAUT)) if (oem.full())
{
if (oem.get_pos(dongle().oem() < 0))
return false; return false;
}
else
{
const bool ee = ini.get_bool("Ee");
if (ee && dongle().oem() != 0)
return false;
}
const int numpatch = ini.get_int("Patch"); const int numpatch = ini.get_int("Patch");
TString4 strpatch; TString4 strpatch;
@ -229,6 +238,9 @@ bool TInstaller_mask::add_header(TConfig& ini, const TString& module)
bool TInstaller_mask::has_module(int modnumber) const bool TInstaller_mask::has_module(int modnumber) const
{ {
if (modnumber > 0 && !dongle().shown(modnumber))
return false;
//se sei un server hai tutti i moduli da installare //se sei un server hai tutti i moduli da installare
if (station_type() == 2) if (station_type() == 2)
return true; return true;
@ -271,8 +283,8 @@ int TInstaller_mask::precheck_modules(bool only_newer)
bool check_enabled = true; bool check_enabled = true;
_setup_run = false; //inizializzazione del flag di controllo di lancio di setup.exe _setup_run = false; //inizializzazione del flag di controllo di lancio di setup.exe
TString_array& array = rows_array(); TString_array& a = rows_array();
FOR_EACH_ARRAY_ROW(array, r, row) FOR_EACH_ARRAY_ROW(a, r, row)
{ {
TToken_string& rigar = *row; TToken_string& rigar = *row;
cod_module = rigar.get(C_CODE); cod_module = rigar.get(C_CODE);
@ -299,7 +311,7 @@ int TInstaller_mask::precheck_modules(bool only_newer)
if (chk && only_newer && cod_module == "sy") //se viene checkato il modulo sy (sistema) deve togliere.. if (chk && only_newer && cod_module == "sy") //se viene checkato il modulo sy (sistema) deve togliere..
{ //..la possibilita' di installare altri moduli.. { //..la possibilita' di installare altri moduli..
for (int i = 0; i < array.items(); i++) for (int i = 0; i < a.items(); i++)
disable_row(i); //disabilita tutte le righe dello sheet disable_row(i); //disabilita tutte le righe dello sheet
disable(DLG_USER); disable(DLG_USER);
check_enabled = false; //..ed uscire check_enabled = false; //..ed uscire

View File

@ -20,6 +20,11 @@ struct TAFile_info : public TObject
int _last_disk; int _last_disk;
}; };
bool is_real_floppy(const TFilename& path)
{
return (path[0] == 'A' || path[0] == 'B') && xvt_fsys_is_removable_drive(path);
}
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// Archiving mask // Archiving mask
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -35,14 +40,14 @@ public:
TArchive_mask::TArchive_mask() : TAutomask("ba2200") TArchive_mask::TArchive_mask() : TAutomask("ba2200")
{ {
TList_field& lf = (TList_field&)field(F_FLOPPY); TList_field& lf = lfield(F_FLOPPY);
TToken_string codes, values; TToken_string codes, values;
TString4 str; TString4 str;
int k = 0; int k = 0;
for (int d = 0; d < 26; d++) for (int d = 0; d < 26; d++)
{ {
str.format("%c:", 'A'+d); str.format("%c:", 'A'+d);
const bool isrem = d < 2 && xvt_fsys_is_removable_drive(str) != 0; const bool isrem = xvt_fsys_is_removable_drive(str) != 0;
const bool isfix = !isrem && xvt_fsys_is_fixed_drive(str); const bool isfix = !isrem && xvt_fsys_is_fixed_drive(str);
const bool isnet = !isrem && !isfix && xvt_fsys_is_network_drive(str); const bool isnet = !isrem && !isfix && xvt_fsys_is_network_drive(str);
if (isrem || isfix || isnet) if (isrem || isfix || isnet)
@ -50,7 +55,7 @@ TArchive_mask::TArchive_mask() : TAutomask("ba2200")
codes.add(str); codes.add(str);
values.add(str); values.add(str);
TToken_string& message = *lf.message(k++, TRUE); TToken_string& message = *lf.message(k++, TRUE);
if (isrem && str[0]<='B') if (isrem && is_real_floppy(str))
message.format("DISABLE,%d", F_PATH); message.format("DISABLE,%d", F_PATH);
else else
message.format("ENABLE,%d", F_PATH); message.format("ENABLE,%d", F_PATH);
@ -248,11 +253,6 @@ bool TArchive_app::can_save_as(const TFilename& src, const TFilename& dst) const
return xvt_fsys_test_disk_free_space(dst.left(3), s) != 0; return xvt_fsys_test_disk_free_space(dst.left(3), s) != 0;
} }
bool TArchive_app::is_real_floppy(const TFilename& path) const
{
return (path[0] == 'A' || path[0] == 'B') && xvt_fsys_is_removable_drive(path);
}
void TArchive_app::save_zip_files(const TFilename& floppy_path, const TString& desc, unsigned long max_chunk) void TArchive_app::save_zip_files(const TFilename& floppy_path, const TString& desc, unsigned long max_chunk)
{ {
// Assegna un disco di destinazione a tutti i files // Assegna un disco di destinazione a tutti i files

View File

@ -18,8 +18,6 @@ protected:
virtual void main_loop(); virtual void main_loop();
KEY query(int& mode, long& firm, TFilename& floppy_path, TString& desc) const; KEY query(int& mode, long& firm, TFilename& floppy_path, TString& desc) const;
bool is_real_floppy(const TFilename& path) const;
bool split_file(const TFilename& archive, unsigned long max_chunk); bool split_file(const TFilename& archive, unsigned long max_chunk);
bool zip_dir(const TFilename& name, unsigned long max_chunk); bool zip_dir(const TFilename& name, unsigned long max_chunk);

View File

@ -5,3 +5,8 @@
#define F_USER 101 #define F_USER 101
#define F_FILE 102 #define F_FILE 102
#define F_CERT 103 #define F_CERT 103
#define F_TSA_URI 104
#define F_TSA_USER 105
#define F_TSA_PWD 106
#define F_TSA_POLICY 107
#define F_TSA_CODING 108

View File

@ -34,33 +34,76 @@ SPREADSHEET F_LIST
BEGIN BEGIN
PROMPT 0 3 "" PROMPT 0 3 ""
ITEM "Utente@16" ITEM "Utente@16"
ITEM "File certificato o DLL@60" ITEM "File certificato o DLL@40"
ITEM "Nome certificato@32" ITEM "Num.@4"
ITEM "URI TSA@40"
ITEM "Utente TSA@16"
ITEM "Password TSA@16"
ITEM "Policy TSA@40"
ITEM "Coding TSA"
END END
ENDPAGE ENDPAGE
ENDMASK ENDMASK
PAGE "Parametri" -1 -1 78 6 PAGE "Parametri" -1 -1 65 8
GROUPBOX DLG_NULL 63 4
BEGIN
PROMPT 1 0 "@bIdentita'"
END
STRING F_USER 32 16 STRING F_USER 32 16
BEGIN BEGIN
PROMPT 1 1 "Utente " PROMPT 2 1 "Utente "
CHECKTYPE REQUIRED CHECKTYPE REQUIRED
END END
STRING F_FILE 260 40 STRING F_FILE 260 42
BEGIN BEGIN
PROMPT 1 2 "File PFX o DLL " PROMPT 2 2 "File PFX o DLL "
CHECKTYPE REQUIRED CHECKTYPE REQUIRED
FSELECT "*" FSELECT "*"
FLAGS "M" FLAGS "M"
END END
STRING F_CERT 80 40 NUMBER F_CERT 4
BEGIN BEGIN
PROMPT 1 3 "Certificato " PROMPT 43 1 "Certificato "
END
GROUPBOX DLG_NULL 67 5
BEGIN
PROMPT 1 4 "@bMarcatura temporale (Time Stamp Authority)"
END
STRING F_TSA_URI 260 54
BEGIN
PROMPT 2 5 "URI "
END
STRING F_TSA_USER 16
BEGIN
PROMPT 2 6 "Utente "
END
STRING F_TSA_PWD 16
BEGIN
PROMPT 38 6 "Password "
END
STRING F_TSA_POLICY 16
BEGIN
PROMPT 2 7 "Policy "
END
LIST F_TSA_CODING 6
BEGIN
PROMPT 38 7 "Coding "
ITEM "|"
ITEM "binary|binary"
ITEM "base64|base64"
END END
ENDPAGE ENDPAGE