diff --git a/ba/ba0102.cpp b/ba/ba0102.cpp index 2d3bf0284..ec87b7b16 100755 --- a/ba/ba0102.cpp +++ b/ba/ba0102.cpp @@ -44,9 +44,12 @@ HIDDEN bool find_string_callback(TTree& tree, void* jolly, word flags) if (flags == SCAN_PRE_ORDER) { TMenu_tree& mt = (TMenu_tree&)tree; - TFind_string_data& data = *(TFind_string_data*)jolly; - const TSubmenu& sm = mt.curr_submenu(); + + if (sm.disabled()) + return FALSE; + + TFind_string_data& data = *(TFind_string_data*)jolly; if (data._ignore_list->is_key(sm.name())) return FALSE; @@ -449,7 +452,7 @@ void TMenulist_window::draw_item(int i) set_color(item.color(), FOCUS_BACK_COLOR); else { - COLOR bc = item.enabled() ? NORMAL_BACK_COLOR : DISABLED_BACK_COLOR; + COLOR bc = item.enabled() ? REQUIRED_BACK_COLOR : DISABLED_BACK_COLOR; set_color(item.color(), bc); } @@ -646,9 +649,11 @@ bool TMenulist_window::on_key(KEY k) select(_selected + MENU_COLS, +1); break; case K_LEFT: + case K_BTAB: select(_selected-1, -1); break; case K_RIGHT: + case K_TAB: select(_selected+1, +1); break; case K_END: diff --git a/ba/ba1100.cpp b/ba/ba1100.cpp index 5dbe1d743..5f33599c3 100755 --- a/ba/ba1100.cpp +++ b/ba/ba1100.cpp @@ -4,8 +4,6 @@ #include #include -#include - #include #include #include @@ -26,12 +24,6 @@ #define Dir_file "dir.gen" #define Trc_file "trc.gen" -bool movable_file(int file) -{ - return file == LF_PCON || file == LF_CLIFO || file == LF_CAUSALI || - file == LF_RCAUSALI || file == LF_CFVEN || file == LF_INDSP; -} - class TManutenzione_app : public TSkeleton_application { TDir_sheet* _browse; @@ -74,6 +66,7 @@ protected: void close_log(); void save_file(const char * file); + bool moveable_file(int file) const; public: TManutenzione_app(); @@ -818,6 +811,12 @@ void TManutenzione_app::repair_file(int i) } } +bool TManutenzione_app::moveable_file(int file) const +{ + return file == LF_PCON || file == LF_CLIFO || file == LF_CAUSALI || + file == LF_RCAUSALI || file == LF_CFVEN || file == LF_INDSP; +} + void TManutenzione_app::update_dir() { // Particolare significato dei flags oltre i 10000: @@ -898,7 +897,7 @@ void TManutenzione_app::update_dir() { if (is_com) { - if (old_is_firm && !movable_file(i) && d.eod() == 0L) + if (old_is_firm && !moveable_file(i) && d.eod() == 0L) { TFilename n(d.filename()); save_file(n); @@ -971,7 +970,7 @@ void TManutenzione_app::update_dir() d.get(i, _nolock, _nordir, _sysdirop); bool cmn_file = FALSE; - bool valid_file = movable_file(i); + bool valid_file = moveable_file(i); if (!is_com && valid_file && d.is_com()) cmn_file = TRUE; // Salta in questo caso: // sto aggiornando le ditte, @@ -1169,7 +1168,7 @@ void TManutenzione_app::convert_dir() // I files LF_PCON, LF_CAUS, LF_RCAUS, LF_CLIFO, LF_CFVEN, LF_INDSPED // vanno creati comunque nel direttorio COM, vuoti, (se non esistono gia'). if (is_com && !to_create) - if (movable_file(i)) + if (moveable_file(i)) to_create = TRUE; if (to_create && has_module(module, CHK_DONGLE)) @@ -1292,7 +1291,7 @@ void TManutenzione_app::load_des(const int maxfdir) for (int i = last_newln+1; i maxfdir) // rialloca openf altrimenti la TPrefix::closeall() provoca un grazioso errore in applicazione - { - isfdptr *newopenf = new isfdptr[last_newln]; - for (int i = 0; i