diff options
| author | Igor Borovkov <iborovkov@productengine.com> | 2010-06-04 15:53:07 +0300 | 
|---|---|---|
| committer | Igor Borovkov <iborovkov@productengine.com> | 2010-06-04 15:53:07 +0300 | 
| commit | f954936d600c24d5263ee100d3808503b34fc6fc (patch) | |
| tree | 251c012c79c298993e44a4d03982e7e2d0d043a7 /indra/newview | |
| parent | caeeebe86a73486288e31751cde3b4989def379f (diff) | |
EXT-7575 FIXED appended attachment location after name in parenthesis.
Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/514
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llcofwearables.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llinventoryitemslist.h | 6 | ||||
| -rw-r--r-- | indra/newview/llwearableitemslist.cpp | 26 | ||||
| -rw-r--r-- | indra/newview/llwearableitemslist.h | 15 | 
4 files changed, 46 insertions, 3 deletions
| diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 7ac3d14c72..05046aca5a 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -427,7 +427,7 @@ LLPanelDeletableWearableListItem* LLCOFWearables::buildAttachemntListItem(LLView  	llassert(item);  	if (!item) return NULL; -	LLPanelDeletableWearableListItem* item_panel = LLPanelDeletableWearableListItem::create(item); +	LLPanelAttachmentListItem* item_panel = LLPanelAttachmentListItem::create(item);  	if (!item_panel) return NULL;  	//setting callbacks diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index 0dd6f53be7..2c60d38cb5 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -177,7 +177,10 @@ protected:  	void setIconImage(const LLUIImagePtr& image);  	/** Set item title - inventory item name usually */ -	void setTitle(const std::string& title, const std::string& highlit_text); +	virtual void setTitle(const std::string& title, const std::string& highlit_text); + + +	LLViewerInventoryItem* mItem;  	// force not showing link icon on item's icon  	bool mForceNoLinksOnIcons; @@ -196,7 +199,6 @@ private:  	/** reshape remaining widgets */  	void reshapeMiddleWidgets(); -	LLViewerInventoryItem* mItem;  	LLIconCtrl*		mIconCtrl;  	LLTextBox*		mTitleCtrl; diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index ba1d0b727d..edee30c2ed 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -42,6 +42,7 @@  #include "llmenugl.h" // for LLContextMenu  #include "lltransutil.h"  #include "llviewerattachmenu.h" +#include "llvoavatarself.h"  class LLFindOutfitItems : public LLInventoryCollectFunctor  { @@ -258,6 +259,31 @@ BOOL LLPanelDeletableWearableListItem::postBuild()  } +// static +LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryItem* item) +{ +	LLPanelAttachmentListItem* list_item = NULL; +	if(item) +	{ +		list_item = new LLPanelAttachmentListItem(item); +		list_item->init(); +	} +	return list_item; +} + +void LLPanelAttachmentListItem::setTitle(const std::string& title, const std::string& highlit_text) +{ +	std::string title_joint = title; + +	if (mItem && isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(mItem->getLinkedUUID())) +	{ +		std::string joint = LLTrans::getString(gAgentAvatarp->getAttachedPointName(mItem->getLinkedUUID())); +		title_joint = title + " (" + joint + ")"; +	} + +	LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text); +} +  //////////////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////////////  ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 2fdb8f0ab8..f03336186c 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -116,6 +116,21 @@ protected:  	/*virtual*/ void init();  }; +/** Outfit list item for an attachment */ +class LLPanelAttachmentListItem : public LLPanelDeletableWearableListItem +{ +	LOG_CLASS(LLPanelAttachmentListItem); +public: +	static LLPanelAttachmentListItem* create(LLViewerInventoryItem* item); +	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); + +protected: +	LLPanelAttachmentListItem(LLViewerInventoryItem* item) : LLPanelDeletableWearableListItem(item) {}; +}; +  /**   * @class LLPanelClothingListItem   * | 
