From 5c26db5e28ad7ad1fb05748977b15f10d52b6d7f Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 31 Jan 2008 16:37:24 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : ba0 Ricompilazione Demo : [ ] Commento : Gestione nuove icone programmi nell'albero del menu git-svn-id: svn://10.65.10.50/trunk@16071 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba0100.cpp | 4 ++-- ba/ba0102.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ba/ba0100.cpp b/ba/ba0100.cpp index ad1f04048..c6cbe0e7a 100755 --- a/ba/ba0100.cpp +++ b/ba/ba0100.cpp @@ -1549,7 +1549,7 @@ void TMenu_application::update_preferred_tree() void TMenu_application::load_preferences() { TConfig cfg(CONFIG_GUI, "ba0"); - _tree_view = cfg.get_int("TreeView"); + _tree_view = cfg.get_int("TreeView", NULL, -1, 3); _preferred.destroy(); TToken_string row; @@ -1570,7 +1570,7 @@ void TMenu_application::load_preferences() void TMenu_application::save_preferences() { TConfig cfg(CONFIG_GUI, "ba0"); -int i; + int i; for (i = 0; i < _preferred.items(); i++) cfg.set("Preferred", _preferred.row(i), NULL, true, i); cfg.set("Preferred", "", NULL, true, i); diff --git a/ba/ba0102.cpp b/ba/ba0102.cpp index c4414dab2..b40a25590 100755 --- a/ba/ba0102.cpp +++ b/ba/ba0102.cpp @@ -219,7 +219,7 @@ bool TMenu_tree::goto_father() const TString id = _curr_id.left(slash); return goto_node(id); } - return FALSE; + return false; } bool TMenu_tree::goto_lbrother() @@ -229,9 +229,9 @@ bool TMenu_tree::goto_lbrother() const int dot = _curr_id.rfind('.'); _curr_id.cut(dot+1); _curr_id << (--_menuitem); - return TRUE; + return true; } - return FALSE; + return false; } TObject* TMenu_tree::curr_node() const @@ -243,7 +243,7 @@ bool TMenu_tree::get_description(TString& desc) const { const TMenuitem& mi = curr_item(); desc = mi.caption(); - return desc.not_empty(); + return desc.full(); } TImage* TMenu_tree::image(bool selected) const @@ -251,6 +251,8 @@ TImage* TMenu_tree::image(bool selected) const const TMenuitem& mi = curr_item(); if (mi.disabled()) return get_res_image(BMP_STOP); + if (!mi.is_submenu()) + return get_res_image(BMP_PROGRAM); return TTree::image(selected); }