diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 384b24210cf80328d191aef248d19c65e94d0856..f7a07b260b25d5bdae81b8f2e909c2a397ceeb0e 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -80,10 +80,11 @@ void LLPanelInventoryListItemBase::draw() } // virtual -void LLPanelInventoryListItemBase::updateItem(const std::string& name) +void LLPanelInventoryListItemBase::updateItem(const std::string& name, + const LLStyle::Params& input_params) { setIconImage(mIconImage); - setTitle(name, mHighlightedText); + setTitle(name, mHighlightedText, input_params); } void LLPanelInventoryListItemBase::addWidgetToLeftSide(const std::string& name, bool show_widget/* = true*/) @@ -286,13 +287,15 @@ void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image) } } -void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text) +void LLPanelInventoryListItemBase::setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params) { setToolTip(title); LLTextUtil::textboxSetHighlightedVal( mTitleCtrl, - LLStyle::Params(), + input_params, title, highlit_text); } diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index 489a82829c8cc20ae049fc3f7218832e65b6c9d5..5dc0bfe3de6c10a6ed23255f1c93ea8b2b9fc5a9 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -152,7 +152,8 @@ class LLPanelInventoryListItemBase : public LLPanel /** * Called after inventory item was updated, update panel widgets to reflect inventory changes. */ - virtual void updateItem(const std::string& name); + virtual void updateItem(const std::string& name, + const LLStyle::Params& input_params = LLStyle::Params()); /** setter for mIconCtrl */ void setIconCtrl(LLIconCtrl* icon) { mIconCtrl = icon; } @@ -177,7 +178,9 @@ class LLPanelInventoryListItemBase : public LLPanel void setIconImage(const LLUIImagePtr& image); /** Set item title - inventory item name usually */ - virtual void setTitle(const std::string& title, const std::string& highlit_text); + virtual void setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params = LLStyle::Params()); /** * Show tool tip if item name text size > panel size diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index de074d6aaf43ccad2becf2675cf77d27ce8123d5..8c6189353e196ec16ca9804c47473339cea20512 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -44,7 +44,6 @@ #include "llinventorymodel.h" #include "lllistcontextmenu.h" #include "llnotificationsutil.h" -#include "lloutfitobserver.h" #include "llsidetray.h" #include "lltransutil.h" #include "llviewermenu.h" @@ -208,8 +207,10 @@ void LLOutfitsList::onOpen(const LLSD& /*info*/) mCategoriesObserver->addCategory(outfits, boost::bind(&LLOutfitsList::refreshList, this, outfits)); - // Start observing changes in Current Outfit to update items worn state. - LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLOutfitsList::onCOFChanged, this)); + const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); + + // Start observing changes in Current Outfit category. + mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this)); // Fetch "My Outfits" contents and refresh the list to display // initially fetched items. If not all items are fetched now diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index ea0c5f1d0f47100d25dd17ece70f705f7f20be44..9c308359fa92f6b9cc096c80c5b8b8355af5ac8f 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -112,16 +112,19 @@ LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item } // virtual -void LLPanelWearableOutfitItem::updateItem(const std::string& name) +void LLPanelWearableOutfitItem::updateItem(const std::string& name, + const LLStyle::Params& input_params) { std::string search_label = name; + LLStyle::Params style_params = input_params; if (mItem && get_is_item_worn(mItem->getUUID())) { search_label += LLTrans::getString("worn"); + style_params.font.style("BOLD"); } - LLPanelInventoryListItemBase::updateItem(search_label); + LLPanelInventoryListItemBase::updateItem(search_label, style_params); } ////////////////////////////////////////////////////////////////////////// @@ -261,7 +264,9 @@ LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryIt return list_item; } -void LLPanelAttachmentListItem::setTitle(const std::string& title, const std::string& highlit_text) +void LLPanelAttachmentListItem::setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params) { std::string title_joint = title; @@ -271,7 +276,7 @@ void LLPanelAttachmentListItem::setTitle(const std::string& title, const std::st title_joint = title + " (" + joint + ")"; } - LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text); + LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text, input_params); } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 69134dd6462b49511867854899648182aa073a23..5dc06284c387b2582c68c6c24de3513d5c30a7ce 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -86,8 +86,8 @@ class LLPanelWearableOutfitItem : public LLPanelInventoryListItemBase /** * Updates item name and (worn) suffix. */ - /*virtual*/ void updateItem(const std::string& name); - + /*virtual*/ void updateItem(const std::string& name, + const LLStyle::Params& input_params = LLStyle::Params()); protected: LLPanelWearableOutfitItem(LLViewerInventoryItem* item); @@ -124,7 +124,9 @@ class LLPanelAttachmentListItem : public LLPanelDeletableWearableListItem virtual ~LLPanelAttachmentListItem() {}; /** Set item title. Joint name is added to the title in parenthesis */ - /*virtual*/ void setTitle(const std::string& title, const std::string& highlit_text); + /*virtual*/ void setTitle(const std::string& title, + const std::string& highlit_text, + const LLStyle::Params& input_params = LLStyle::Params()); protected: LLPanelAttachmentListItem(LLViewerInventoryItem* item) : LLPanelDeletableWearableListItem(item) {};