From 93665435e06751fd2966b78d557175ac4acbea3b Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 22 Sep 2010 09:38:30 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : ba0.exe Ricompilazione Demo : [ ] Commento : Migliorata resistenza menu ad immagini mancanti o illeggibili git-svn-id: svn://10.65.10.50/branches/R_10_00@20892 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba0102.cpp | 9 +++++---- ba/ba0103.cpp | 8 +++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ba/ba0102.cpp b/ba/ba0102.cpp index 01c1b0423..2910ec26d 100755 --- a/ba/ba0102.cpp +++ b/ba/ba0102.cpp @@ -257,9 +257,10 @@ TImage* TMenu_tree::image(bool selected) const int ico = mi.icon(); // Eventuale icona di programma o cartella if (ico <= 0 && mi.is_program()) // Forza icona per i programmi - ico = ICON_RSRC; - - return ico > 0 ? get_res_icon(ico) : TTree::image(selected); + ico = ICON_RSRC; + + TImage* img = ico > 0 ? get_res_icon(ico) : NULL; + return img ? img : TTree::image(selected); } long TMenu_tree::find_node(const TString& id) @@ -918,7 +919,7 @@ void draw_spider(WINDOW w, int mode, const PNT& mouse) { static int _spider = -1; if (_spider < 0) - _spider = ADVANCED_GRAPHICS && is_power_station(); // Attiva eventuale ragno + _spider = ADVANCED_GRAPHICS && is_power_reseller(true); // Attiva eventuale ragno if (_spider && xvt_vobj_is_focusable(w)) { diff --git a/ba/ba0103.cpp b/ba/ba0103.cpp index 14018aeea..044bd0319 100755 --- a/ba/ba0103.cpp +++ b/ba/ba0103.cpp @@ -339,7 +339,7 @@ void TBook_window::erode_antipa() void TBook_window::set_logo(const char* logo) { _logo.load(logo); - if (is_power_station()) + if (is_power_reseller(true)) { const short w = _logo.width(); const short h = _logo.height(); @@ -769,7 +769,8 @@ bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long joll tf.win().force_update(); tf.on_key(K_SPACE); } - book_field().set_back(_picture.row(sel)); + if (_picture.objptr(sel)) + book_field().set_back(_picture.row(sel)); main_app().enable_menu_item(30005, id.find("MENU_PREFERITI") < 0); } else if (e == fe_init) @@ -799,7 +800,8 @@ bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long joll } if (atoi(of.get()) >= of.items()-1) // Se sono sui preferiti ... set(o.dlg(), "", true); // ... torna al menu principale - book_field().set_back(_picture.row(0)); + if (_picture.objptr(0)) + book_field().set_back(_picture.row(0)); } break; default: break;