Patch level : 4.0

Files correlati     : ba0
Ricompilazione Demo : [ ]
Commento            :
Migliorata gestione disabilitazione moduli non attivati per utente


git-svn-id: svn://10.65.10.50/trunk@15379 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2007-06-01 09:51:01 +00:00
parent 6a7321cb62
commit cc8012bba3
2 changed files with 6 additions and 29 deletions

View File

@ -2,9 +2,6 @@
#include <applicat.h> #include <applicat.h>
#include <automask.h> #include <automask.h>
//#include <colors.h>
//#include <config.h>
#include <controls.h> #include <controls.h>
#include <dongle.h> #include <dongle.h>
#include <modaut.h> #include <modaut.h>
@ -13,14 +10,11 @@
#include <relation.h> #include <relation.h>
#include <msksheet.h> #include <msksheet.h>
#include <progind.h> #include <progind.h>
//#include <prefix.h>
#include <sheet.h> #include <sheet.h>
#include <utility.h> #include <utility.h>
#include <urldefid.h> #include <urldefid.h>
//#include <agasys.h>
#include <nditte.h> #include <nditte.h>
#include <user.h> #include <user.h>

View File

@ -28,28 +28,10 @@ bool sys_dll_changed()
static bool _installing = false; static bool _installing = false;
void set_installing_flag() void set_installing_flag()
{ { _installing = true; }
_installing = true;
}
bool installing() bool installing()
{ { return _installing; }
return _installing;
}
static bool is_visible(const int cod)
{
static TString_array shown;
TToken_string* str = (TToken_string*)shown.objptr(cod);
if (str == NULL)
{
str = new TToken_string(dongle().shown(cod) ? "X" : "");
shown.add(str, cod);
}
return *str == "X";
}
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// Menu management // Menu management
@ -143,7 +125,7 @@ public:
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
TMenuitem::TMenuitem(TSubmenu* sm) TMenuitem::TMenuitem(TSubmenu* sm)
: _submenu(sm), _icon(0),_color(NORMAL_COLOR), _exist(-1), : _submenu(sm), _icon(0), _color(NORMAL_COLOR), _exist(-1),
_firm(false), _password(false), _reloadmenu(false) _firm(false), _password(false), _reloadmenu(false)
{ } { }
@ -390,10 +372,11 @@ void TSubmenu::read(TScanner& scanner)
{ {
bool disable = true; bool disable = true;
TToken_string mod(line.mid(equal+1, -1), ','); TToken_string mod(line.mid(equal+1, -1), ',');
mod.strip_spaces();
FOR_EACH_TOKEN(mod, cod) FOR_EACH_TOKEN(mod, cod)
{ {
const int code = dongle().module_name2code(cod); const word code = dongle().module_name2code(cod);
if (code == 0 || is_visible(code)) if (main_app().has_module(code))
{ {
disable = false; disable = false;
break; break;