From cc8012bba3b5e99061abfac5f4dde970aca97aab Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 1 Jun 2007 09:51:01 +0000 Subject: [PATCH] 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 --- ba/ba0100.cpp | 6 ------ ba/ba0101.cpp | 29 ++++++----------------------- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/ba/ba0100.cpp b/ba/ba0100.cpp index 968612c10..51015c604 100755 --- a/ba/ba0100.cpp +++ b/ba/ba0100.cpp @@ -2,9 +2,6 @@ #include #include -//#include - -//#include #include #include #include @@ -13,14 +10,11 @@ #include #include #include -//#include #include #include #include -//#include - #include #include diff --git a/ba/ba0101.cpp b/ba/ba0101.cpp index 1858f8e99..78b2ec3d2 100755 --- a/ba/ba0101.cpp +++ b/ba/ba0101.cpp @@ -28,28 +28,10 @@ bool sys_dll_changed() static bool _installing = false; void set_installing_flag() -{ - _installing = true; -} +{ _installing = true; } bool 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"; -} +{ return _installing; } /////////////////////////////////////////////////////////// // Menu management @@ -143,7 +125,7 @@ public: /////////////////////////////////////////////////////////// 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) { } @@ -390,10 +372,11 @@ void TSubmenu::read(TScanner& scanner) { bool disable = true; TToken_string mod(line.mid(equal+1, -1), ','); + mod.strip_spaces(); FOR_EACH_TOKEN(mod, cod) { - const int code = dongle().module_name2code(cod); - if (code == 0 || is_visible(code)) + const word code = dongle().module_name2code(cod); + if (main_app().has_module(code)) { disable = false; break;