diff options
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 50 | ||||
| -rw-r--r-- | indra/newview/llpaneloutfitedit.h | 13 | ||||
| -rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llpaneloutfitsinventory.h | 2 | ||||
| -rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfit_edit.xml | 5 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfits_inventory.xml | 2 | 
7 files changed, 41 insertions, 58 deletions
| diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 2b25c544e3..1ab2100a41 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -113,9 +113,9 @@ private:  LLPanelOutfitEdit::LLPanelOutfitEdit() -:	LLPanel(), mLookID(), mFetchLook(NULL), mSearchFilter(NULL), +:	LLPanel(), mCurrentOutfitID(), mFetchLook(NULL), mSearchFilter(NULL),  mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToLookBtn(NULL), -mRemoveFromLookBtn(NULL), mLookObserver(NULL), mNumItemsInLook(0) +mRemoveFromLookBtn(NULL), mLookObserver(NULL)  {  	mSavedFolderState = new LLSaveFolderState();  	mSavedFolderState->setApply(FALSE); @@ -157,7 +157,7 @@ BOOL LLPanelOutfitEdit::postBuild()  {  	// gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels -	mLookName = getChild<LLTextBox>("curr_look_name");  +	mCurrentOutfitName = getChild<LLTextBox>("curr_outfit_name");   	childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL); @@ -206,7 +206,7 @@ BOOL LLPanelOutfitEdit::postBuild()  	mLookContents = getChild<LLScrollListCtrl>("look_items_list");  	mLookContents->sortByColumn("look_item_sort", TRUE);  	mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onLookItemSelectionChange, this)); -	 +  	/*  	LLButton::Params remove_params;  	remove_params.name("remove_from_look"); @@ -220,12 +220,12 @@ BOOL LLPanelOutfitEdit::postBuild()  	//childSetAction("remove_from_look_btn", boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this), this);  	mRemoveFromLookBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this));  	//getChild<LLPanel>("look_info_group_bar")->addChild(mRemoveFromLookBtn); remove_item_btn - +	  	mEditWearableBtn = getChild<LLButton>("edit_wearable_btn");  	mEditWearableBtn->setEnabled(FALSE);  	mEditWearableBtn->setVisible(FALSE);  	mEditWearableBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this)); -	 +  	childSetAction("remove_item_btn", boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this), this);  	return TRUE; @@ -302,7 +302,7 @@ void LLPanelOutfitEdit::onAddToLookClicked(void)  {  	LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem();  	LLFolderViewEventListener* listenerp  = curr_item->getListener(); -	link_inventory_item(gAgent.getID(), listenerp->getUUID(), mLookID, listenerp->getName(), +	link_inventory_item(gAgent.getID(), listenerp->getUUID(), mCurrentOutfitID, listenerp->getName(),  						LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));  	updateLookInfo();  } @@ -445,7 +445,7 @@ void LLPanelOutfitEdit::lookFetched(void)  	// collectDescendentsIf takes non-const reference:  	LLFindCOFValidItems is_cof_valid; -	gInventory.collectDescendentsIf(mLookID, +	gInventory.collectDescendentsIf(mCurrentOutfitID,  									cat_array,  									item_array,  									LLInventoryModel::EXCLUDE_TRASH, @@ -468,12 +468,6 @@ void LLPanelOutfitEdit::lookFetched(void)  		mLookContents->addElement(row);  	} -	 -	if (mLookContents->getItemCount() != mNumItemsInLook) -	{ -		mNumItemsInLook = mLookContents->getItemCount(); -		LLAppearanceMgr::instance().updateCOF(mLookID); -	}  }  void LLPanelOutfitEdit::updateLookInfo() @@ -483,7 +477,7 @@ void LLPanelOutfitEdit::updateLookInfo()  		mLookContents->clearRows();  		uuid_vec_t folders; -		folders.push_back(mLookID); +		folders.push_back(mCurrentOutfitID);  		mFetchLook->fetchDescendents(folders);  		if (mFetchLook->isEverythingComplete())  		{ @@ -496,28 +490,26 @@ void LLPanelOutfitEdit::updateLookInfo()  	}  } -void LLPanelOutfitEdit::displayLookInfo(const LLInventoryCategory* pLook) +void LLPanelOutfitEdit::displayCurrentOutfit()  { -	if (!pLook) -	{ -		return; -	} -	  	if (!getVisible())  	{  		setVisible(TRUE);  	} -	if (mLookID != pLook->getUUID()) +	mCurrentOutfitID = LLAppearanceMgr::getInstance()->getCOF(); + +	std::string current_outfit_name; +	if (LLAppearanceMgr::getInstance()->getBaseOutfitName(current_outfit_name))  	{ -		mLookID = pLook->getUUID(); -		mLookName->setText(pLook->getName()); -		updateLookInfo(); +		mCurrentOutfitName->setText(current_outfit_name); +	} +	else +	{ +		mCurrentOutfitName->setText(getString("No Outfit"));  	} -} -void LLPanelOutfitEdit::reset() -{ -	mLookID.setNull(); +	updateLookInfo();  } + diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 5c00f84e0e..ba382d7320 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -81,10 +81,6 @@ public:  	/*virtual*/ BOOL postBuild();  	/*virtual*/ void changed(U32 mask); -	void reset(); -		// Ignore all old information, useful if you are  -		// recycling an existing dialog and need to clear it. -  	/*virtual*/ void setParcelID(const LLUUID& parcel_id);  		// Sends a request for data about the given parcel, which will  		// only update the location if there is none already available. @@ -100,7 +96,7 @@ public:  	void onEditWearableClicked(void);  	void onUpClicked(void); -	void displayLookInfo(const LLInventoryCategory* pLook); +	void displayCurrentOutfit();  	void lookFetched(void); @@ -108,8 +104,10 @@ public:  private: -	LLUUID				mLookID; -	LLTextBox*			mLookName; +	//*TODO got rid of mCurrentOutfitID +	LLUUID				mCurrentOutfitID; + +	LLTextBox*			mCurrentOutfitName;  	LLScrollListCtrl*	mLookContents;  	LLInventoryPanel*	mInventoryItemsPanel;  	LLFilterEditor*		mSearchFilter; @@ -119,7 +117,6 @@ private:  	LLButton*			mRemoveFromLookBtn;  	LLButton*			mUpBtn;  	LLButton*			mEditWearableBtn; -	S32					mNumItemsInLook;  	LLLookFetchObserver*		mFetchLook;  	LLInventoryLookObserver*	mLookObserver; diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index dd320f8328..a67270202e 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -192,7 +192,7 @@ void LLPanelOutfitsInventory::updateVerbs()  	if (mListCommands)  	{ -		mListCommands->childSetVisible("look_edit_btn",sShowDebugEditor); +		mListCommands->childSetVisible("edit_current_outfit_btn",sShowDebugEditor);  		updateListCommands();  	}  } @@ -306,19 +306,12 @@ void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewIte  	}  } -void LLPanelOutfitsInventory::onSelectorButtonClicked() +void LLPanelOutfitsInventory::showEditOutfitPanel()  { -	  LLFolderViewItem* cur_item = getRootFolder()->getCurSelectedItem(); - -	  LLFolderViewEventListener* listenerp = cur_item->getListener(); -	  if (getIsCorrectType(listenerp)) -	  { -	  LLSD key; -	  key["type"] = "look"; -	  key["id"] = listenerp->getUUID(); - -	  LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); -	  }  +	LLSD key; +	key["type"] = "edit_outfit"; +	 +	LLSideTray::getInstance()->showPanel("sidepanel_appearance", key);  }  LLFolderViewEventListener *LLPanelOutfitsInventory::getCorrectListenerForAction() @@ -365,7 +358,7 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()  	mListCommands->childSetAction("make_outfit_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this));  	mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); -	mListCommands->childSetAction("look_edit_btn", boost::bind(&LLPanelOutfitsInventory::onSelectorButtonClicked, this)); +	mListCommands->childSetAction("edit_current_outfit_btn", boost::bind(&LLPanelOutfitsInventory::showEditOutfitPanel, this));  	LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn");  	trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index ab25ef0a49..83c4b8f9cd 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -64,7 +64,7 @@ public:  	void onSaveCommit(const std::string& item_name);  	void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); -	void onSelectorButtonClicked(); +	void showEditOutfitPanel();  	// If a compatible listener type is selected, then return a pointer to that.  	// Otherwise, return NULL. diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index a80687da4d..308034225b 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -182,11 +182,9 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)  	mLookInfoType = key["type"].asString(); -	if (mLookInfoType == "look") +	if (mLookInfoType == "edit_outfit")  	{ -		LLInventoryCategory *pLook = gInventory.getCategory(key["id"].asUUID()); -		if (pLook) -			mOutfitEdit->displayLookInfo(pLook); +		mOutfitEdit->displayCurrentOutfit();  	}  } diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index 4d3ee07195..c1800384a3 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -12,6 +12,9 @@   name="outfit_edit"   top="0"   width="320"> +    <string +     name="No Outfit" +     value="No Outfit"/>  	<panel.string  		name="not_available"> @@ -94,7 +97,7 @@                   font="SansSerifHugeBold"                   height="26"                   layout="topleft" -                 name="curr_look_name" +                 name="curr_outfit_name"                   text_color="LtGray"                   top_pad="0"                   value="[Current Outfit]" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index f9ad525642..66ed43efec 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -122,7 +122,7 @@  		label="Edit Outfit"   		layout="topleft"          right="-140" -		name="look_edit_btn" +		name="edit_current_outfit_btn"          top="26"          visible="false"   		width="50" /> | 
