Rif. mod. 95/37. Aggiunto metodo TApplication::extra_modules(). Ritorna
una stringa contenente le autorizzazioni supplementari dei moduli. git-svn-id: svn://10.65.10.50/trunk@1878 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a7cf438a4c
commit
888f4a884c
@ -317,15 +317,27 @@ const char* TApplication::get_module_name() const
|
||||
for (int aut = 0; scanner.line() != ""; aut++)
|
||||
if (strncmp(scanner.token(), _name, 2) == 0) { ok = TRUE; break; }
|
||||
|
||||
const char* module = scanner.token().mid(3);
|
||||
TString module(scanner.token().mid(3));
|
||||
if (ok) ok = has_module(aut);
|
||||
|
||||
|
||||
if (!ok)
|
||||
if (!ok)
|
||||
{
|
||||
error_box("Il modulo '%s' non e' autorizzato", module);
|
||||
module = "";
|
||||
TToken_string em(extra_modules());
|
||||
const int items = em.items();
|
||||
if (items != 0)
|
||||
for (int j = 0; j < items; j++)
|
||||
{
|
||||
ok = has_module(em.get_int());
|
||||
if (!ok)
|
||||
break;
|
||||
}
|
||||
if (!ok)
|
||||
{
|
||||
error_box("Il modulo '%s' non e' autorizzato", (const char*)module);
|
||||
module = "";
|
||||
}
|
||||
}
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,7 @@ public:
|
||||
virtual bool ok() const { return _create_ok; }
|
||||
virtual void print();
|
||||
virtual bool firm_change_enabled() const;
|
||||
virtual const char * extra_modules() const {return "";}
|
||||
|
||||
void stop_run(); // Forza chiusura applicazione
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user