diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-24 22:12:03 +0100 | 
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-24 22:12:03 +0100 | 
| commit | 46ca04e939a13bb4d73777aa66e609a7c0d56e40 (patch) | |
| tree | 2e65369de912511fa6cf3e8728c4382db6fde11a | |
| parent | be731a31de18b10c6d2cf8cfd4187a34fbe117fd (diff) | |
| parent | 4671dd6575c22f57d32fb8871d5c313fbb2b7a76 (diff) | |
merge from PE's viewer-release
| -rw-r--r-- | indra/llui/llbutton.h | 2 | ||||
| -rw-r--r-- | indra/llui/llflatlistview.cpp | 15 | ||||
| -rw-r--r-- | indra/llui/llflatlistview.h | 4 | ||||
| -rw-r--r-- | indra/newview/llcofwearables.cpp | 22 | ||||
| -rw-r--r-- | indra/newview/lloutfitslist.cpp | 93 | ||||
| -rw-r--r-- | indra/newview/lloutfitslist.h | 10 | ||||
| -rw-r--r-- | indra/newview/llpaneleditwearable.cpp | 50 | ||||
| -rw-r--r-- | indra/newview/llpaneleditwearable.h | 1 | ||||
| -rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 67 | ||||
| -rw-r--r-- | indra/newview/llpaneloutfitedit.h | 3 | ||||
| -rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llsidepanelinventory.h | 1 | ||||
| -rw-r--r-- | indra/newview/llwearableitemslist.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llwearableitemslist.h | 6 | ||||
| -rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 6 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_edit_wearable.xml | 13 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfit_edit.xml | 34 | 
19 files changed, 272 insertions, 82 deletions
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index d7ab030a47..f4af19b696 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -230,6 +230,8 @@ public:  	void			setFont(const LLFontGL *font)		  		{ mGLFont = ( font ? font : LLFontGL::getFontSansSerif()); } +	const LLFontGL* getFont() const { return mGLFont; } +  	S32				getLastDrawCharsCount() const { return mLastDrawCharsCount; } diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index f22b49f30f..b87851490d 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -1227,7 +1227,7 @@ LLFlatListViewEx::LLFlatListViewEx(const Params& p)  , mNoFilteredItemsMsg(p.no_filtered_items_msg)  , mNoItemsMsg(p.no_items_msg)  , mForceShowingUnmatchedItems(false) -, mLastFilterSucceded(false) +, mHasMatchedItems(false)  {  } @@ -1285,7 +1285,7 @@ void LLFlatListViewEx::filterItems()  	item_panel_list_t items;  	getItems(items); -	mLastFilterSucceded = false; +	mHasMatchedItems = false;  	for (item_panel_list_t::iterator  			 iter = items.begin(),  			 iter_end = items.end(); @@ -1296,13 +1296,16 @@ void LLFlatListViewEx::filterItems()  		// i.e. we don't hide items that don't support 'match_filter' action, separators etc.  		if (0 == pItem->notify(action))  		{ -			mLastFilterSucceded = true; +			mHasMatchedItems = true;  			pItem->setVisible(true);  		}  		else  		{  			// TODO: implement (re)storing of current selection. -			selectItem(pItem, false); +			if(!mForceShowingUnmatchedItems) +			{ +				selectItem(pItem, false); +			}  			pItem->setVisible(mForceShowingUnmatchedItems);  		}  	} @@ -1311,9 +1314,9 @@ void LLFlatListViewEx::filterItems()  	notifyParentItemsRectChanged();  } -bool LLFlatListViewEx::wasLasFilterSuccessfull() +bool LLFlatListViewEx::hasMatchedItems()  { -	return mLastFilterSucceded; +	return mHasMatchedItems;  }  //EOF diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index caeddfc179..ded46d8122 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -488,7 +488,7 @@ public:  	/**  	 * Returns true if last call of filterItems() found at least one matching item  	 */ -	bool wasLasFilterSuccessfull(); +	bool hasMatchedItems();  protected:  	LLFlatListViewEx(const Params& p); @@ -512,7 +512,7 @@ private:  	/**  	 * True if last call of filterItems() found at least one matching item  	 */ -	bool mLastFilterSucceded; +	bool mHasMatchedItems;  };  #endif diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index aa8cc01f7d..1fab5c7683 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -374,7 +374,12 @@ void LLCOFWearables::refresh()  				 value_it_end = values.end();  			 value_it != value_it_end; ++value_it)  		{ -			list->selectItemByValue(*value_it); +			// value_it may be null because of dummy items +			// Dummy items have no ID +			if(value_it->asUUID().notNull()) +			{ +				list->selectItemByValue(*value_it); +			}  		}  	}  } @@ -608,7 +613,20 @@ void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContex  		uuid_vec_t selected_uuids;  		if(getSelectedUUIDs(selected_uuids))  		{ -			menu->show(ctrl, selected_uuids, x, y); +			bool show_menu = false; +			for(uuid_vec_t::iterator it = selected_uuids.begin();it!=selected_uuids.end();++it) +			{ +				if ((*it).notNull()) +				{ +					show_menu = true; +					break; +				} +			} + +			if(show_menu) +			{ +				menu->show(ctrl, selected_uuids, x, y); +			}  		}  	}  } diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 67442dd573..6c2566813f 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -148,10 +148,27 @@ private:  	void onTakeOff()  	{ -		const LLUUID& selected_outfit_id = getSelectedOutfitID(); -		if (selected_outfit_id.notNull()) +		// Take off selected items if there are any +		if (mOutfitList->hasItemSelected()) +		{ +			uuid_vec_t selected_uuids; +			mOutfitList->getSelectedItemsUUIDs(selected_uuids); + +			for (uuid_vec_t::const_iterator it=selected_uuids.begin(); it != selected_uuids.end(); ++it) +			{ +				if (get_is_item_worn(*it)) +				{ +					LLAppearanceMgr::instance().removeItemFromAvatar(*it); +				} +			} +		} +		else // or take off the whole selected outfit if no items specified.  		{ -			LLAppearanceMgr::instance().takeOffOutfit(selected_outfit_id); +			const LLUUID& selected_outfit_id = getSelectedOutfitID(); +			if (selected_outfit_id.notNull()) +			{ +				LLAppearanceMgr::instance().takeOffOutfit(selected_outfit_id); +			}  		}  	} @@ -474,7 +491,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)  	}  	// Handle removed tabs. -	for (uuid_vec_t::const_iterator iter=vremoved.begin(); iter != vremoved.end(); iter++) +	for (uuid_vec_t::const_iterator iter=vremoved.begin(); iter != vremoved.end(); ++iter)  	{  		outfits_map_t::iterator outfits_iter = mOutfitsMap.find((*iter));  		if (outfits_iter != mOutfitsMap.end()) @@ -626,7 +643,10 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata)  	}  	if (command_name == "take_off")  	{ -		return LLAppearanceMgr::getInstance()->getBaseOutfitUUID() == mSelectedOutfitUUID; +		// Enable "Take Off" only if a worn item or base outfit is selected. +		return ( !hasItemSelected() +				 && LLAppearanceMgr::getInstance()->getBaseOutfitUUID() == mSelectedOutfitUUID ) +				|| hasWornItemSelected();  	}  	return false;  } @@ -638,6 +658,22 @@ void LLOutfitsList::showGearMenu(LLView* spawning_view)  	mGearMenu->show(spawning_view);  } +void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const +{ +	// Collect selected items from all selected lists. +	for (wearables_lists_map_t::const_iterator iter = mSelectedListsMap.begin(); +			iter != mSelectedListsMap.end(); +			++iter) +	{ +		uuid_vec_t uuids; +		(*iter).second->getSelectedUUIDs(uuids); + +		S32 prev_size = selected_uuids.size(); +		selected_uuids.resize(prev_size + uuids.size()); +		std::copy(uuids.begin(), uuids.end(), selected_uuids.begin() + prev_size); +	} +} +  boost::signals2::connection LLOutfitsList::setSelectionChangeCallback(selection_change_callback_t cb)  {  	return mSelectionChangeSignal.connect(cb); @@ -878,7 +914,7 @@ void LLOutfitsList::applyFilterToTab(  	{  		// hide tab if its title doesn't pass filter  		// and it has no visible items -		tab->setVisible(list->wasLasFilterSuccessfull()); +		tab->setVisible(list->hasMatchedItems());  		// remove title highlighting because it might  		// have been previously highlighted by less restrictive filter @@ -894,6 +930,18 @@ void LLOutfitsList::applyFilterToTab(  	}  } +bool LLOutfitsList::hasWornItemSelected() +{ +	uuid_vec_t selected_uuids; +	getSelectedItemsUUIDs(selected_uuids); + +	for (uuid_vec_t::const_iterator it=selected_uuids.begin(); it != selected_uuids.end(); ++it) +	{ +		if (get_is_item_worn(*it)) return true; +	} +	return false; +} +  void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id)  {  	LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl); @@ -912,6 +960,26 @@ void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const  	}  } +void LLOutfitsList::wearSelectedItems() +{ +	uuid_vec_t selected_uuids; +	getSelectedItemsUUIDs(selected_uuids); + +	if(selected_uuids.empty()) +	{ +		return; +	} + +	uuid_vec_t::const_iterator it; +	// Wear items from all selected lists(if possible- add, else replace) +	for (it = selected_uuids.begin(); it != selected_uuids.end()-1; ++it) +	{ +		LLAppearanceMgr::getInstance()->wearItemOnAvatar(*it, false, false); +	} +	// call update only when wearing last item +	LLAppearanceMgr::getInstance()->wearItemOnAvatar(*it, true, false); +} +  void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y)  {  	LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl); @@ -919,18 +987,7 @@ void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y)  	uuid_vec_t selected_uuids; -	// Collect selected items from all selected lists. -	for (wearables_lists_map_t::iterator iter = mSelectedListsMap.begin(); -			iter != mSelectedListsMap.end(); -			++iter) -	{ -		uuid_vec_t uuids; -		(*iter).second->getSelectedUUIDs(uuids); - -		S32 prev_size = selected_uuids.size(); -		selected_uuids.resize(prev_size + uuids.size()); -		std::copy(uuids.begin(), uuids.end(), selected_uuids.begin() + prev_size); -	} +	getSelectedItemsUUIDs(selected_uuids);  	LLWearableItemsList::ContextMenu::instance().show(list, selected_uuids, x, y);  } diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index d207624792..26722f2a96 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -103,8 +103,13 @@ public:  	const LLUUID& getSelectedOutfitUUID() const { return mSelectedOutfitUUID; } +	void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const; +  	boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb); +	// Collects selected items from all selected lists and wears them(if possible- adds, else replaces) +	void wearSelectedItems(); +  	/**  	 * Returns true if there is a selection inside currently selected outfit  	 */ @@ -173,6 +178,11 @@ private:  	 */  	void applyFilterToTab(const LLUUID& category_id, LLAccordionCtrlTab* tab, const std::string& filter_substring); +	/** +	 * Returns true if there are any worn items among currently selected, otherwise false. +	 */ +	bool hasWornItemSelected(); +  	void onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id);  	void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y);  	void onCOFChanged(); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index ae54909945..5c85ea849e 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -382,6 +382,31 @@ LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex t  {  } +/** + * Class to prevent hack in LLButton's constructor and use paddings declared in xml. + */ +class LLLabledBackButton : public LLButton +{ +public: +	struct Params : public LLInitParam::Block<Params, LLButton::Params> +	{ +		Params() {} +	}; +protected: +	friend class LLUICtrlFactory; +	LLLabledBackButton(const Params&); +}; + +static LLDefaultChildRegistry::Register<LLLabledBackButton> labeled_back_btn("labeled_back_button"); + +LLLabledBackButton::LLLabledBackButton(const Params& params) +: LLButton(params) +{ +	// override hack in LLButton's constructor to use paddings have been set in xml +	setLeftHPad(params.pad_left); +	setRightHPad(params.pad_right); +} +  // Helper functions.  static const texture_vec_t null_texture_vec; @@ -649,6 +674,8 @@ BOOL LLPanelEditWearable::postBuild()  	mBtnRevert->setClickedCallback(boost::bind(&LLPanelEditWearable::onRevertButtonClicked, this));  	mBtnBack = getChild<LLButton>("back_btn"); +	mBackBtnLabel = mBtnBack->getLabelUnselected(); +	mBtnBack->setLabel(LLStringUtil::null);  	// handled at appearance panel level?  	//mBtnBack->setClickedCallback(boost::bind(&LLPanelEditWearable::onBackButtonClicked, this)); @@ -1016,6 +1043,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show)  	if (show)  	{  		mPanelTitle->setText(title); +		mPanelTitle->setToolTip(title);  		mDescTitle->setText(description_title);  		// set name @@ -1357,6 +1385,28 @@ void LLPanelEditWearable::updateVerbs()  		gSavedSettings.setU32("AvatarSex", (gAgentAvatarp->getSex() == SEX_MALE) );  	} +	// update back button and title according to dirty state. +	static BOOL was_dirty = FALSE; +	if (was_dirty != is_dirty) // to avoid redundant changes because this method is called from draw +	{ +		static S32 label_width = mBtnBack->getFont()->getWidth(mBackBtnLabel); +		const std::string& label = is_dirty ? mBackBtnLabel : LLStringUtil::null; +		const S32 delta_width = is_dirty ? label_width : -label_width; + +		mBtnBack->setLabel(label); + +		// update rect according to label width +		LLRect rect = mBtnBack->getRect(); +		rect.mRight += delta_width; +		mBtnBack->setShape(rect); + +		// update title rect according to back button width +		rect = mPanelTitle->getRect(); +		rect.mLeft += delta_width; +		mPanelTitle->setShape(rect); + +		was_dirty = is_dirty; +	}  }  void LLPanelEditWearable::configureAlphaCheckbox(LLVOAvatarDefines::ETextureIndex te, const std::string& name) diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 61441435cd..bfce2ae56e 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -120,6 +120,7 @@ private:  	// these are constant no matter what wearable we're editing  	LLButton *mBtnRevert;  	LLButton *mBtnBack; +	std::string mBackBtnLabel;  	LLTextBox *mPanelTitle;  	LLTextBox *mDescTitle; diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index ea7d233333..1544717873 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -387,6 +387,7 @@ BOOL LLPanelOutfitEdit::postBuild()  	mWearableItemsList = getChild<LLInventoryItemsList>("list_view");  	mWearableItemsList->setCommitOnSelectionChange(true);  	mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); +	mWearableItemsList->setDoubleClickCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));  	mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));  	return TRUE; @@ -404,6 +405,10 @@ void LLPanelOutfitEdit::onOpen(const LLSD& key)  		displayCurrentOutfit();  		mInitialized = true;  	} + +	showAddWearablesPanel(false); +	mWearableItemsList->resetSelection(); +	mInventoryItemsPanel->clearSelection();  }  void LLPanelOutfitEdit::moveWearable(bool closer_to_body) @@ -564,7 +569,8 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)  void LLPanelOutfitEdit::onPlusBtnClicked(void)  { -	LLUUID selected_id = getSelectedItemUUID(); +	LLUUID selected_id; +	getCurrentItemUUID(selected_id);  	if (selected_id.isNull()) return; @@ -651,30 +657,31 @@ void LLPanelOutfitEdit::onEditWearableClicked(void)  void LLPanelOutfitEdit::onInventorySelectionChange()  { -	LLUUID item_uuid = getSelectedItemUUID(); -	if (item_uuid.isNull()) +	uuid_vec_t selected_items; +	getSelectedItemsUUID(selected_items); +	if (selected_items.empty())  	{  		return;  	} +	uuid_vec_t::iterator worn_item = std::find_if(selected_items.begin(), selected_items.end(), boost::bind(&get_is_item_worn, _1)); +	bool can_add = ( worn_item == selected_items.end() ); -	LLViewerInventoryItem* item(gInventory.getItem(item_uuid)); -	if (!item) -	{ -		return; -	} +	mPlusBtn->setEnabled(can_add); + +	LLViewerInventoryItem* first_item(gInventory.getItem(selected_items.front())); -	switch (item->getType()) +	if (can_add &&  +		first_item && +		selected_items.size() == 1 &&  +		first_item->getType() == LLAssetType::AT_BODYPART)  	{ -	case LLAssetType::AT_BODYPART:  		mPlusBtn->setToolTip(getString("replace_body_part")); -		break; -	case LLAssetType::AT_CLOTHING: -	case LLAssetType::AT_OBJECT: +	} +	else +	{  		mPlusBtn->setToolTip(LLStringUtil::null); -	default: -		break;  	} -	 +  	/* Removing add to look inline button (not part of mvp for viewer 2)  	LLRect btn_rect(current_item->getLocalRect().mRight - 50,  					current_item->getLocalRect().mTop, @@ -931,16 +938,15 @@ void LLPanelOutfitEdit::onOutfitChanging(bool started)  	indicator->setVisible(started);  } -LLUUID LLPanelOutfitEdit::getSelectedItemUUID() +void LLPanelOutfitEdit::getCurrentItemUUID(LLUUID& selected_id)  { -	LLUUID selected_id;  	if (mInventoryItemsPanel->getVisible())  	{  		LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); -		if (!curr_item) return selected_id; +		if (!curr_item) return;  		LLFolderViewEventListener* listenerp  = curr_item->getListener(); -		if (!listenerp) return selected_id; +		if (!listenerp) return;  		selected_id = listenerp->getUUID();  	} @@ -948,8 +954,27 @@ LLUUID LLPanelOutfitEdit::getSelectedItemUUID()  	{  		selected_id = mWearableItemsList->getSelectedUUID();  	} +} + + +void LLPanelOutfitEdit::getSelectedItemsUUID(uuid_vec_t& uuid_list) +{ +	if (mInventoryItemsPanel->getVisible()) +	{ +		std::set<LLUUID> item_set = mInventoryItemsPanel->getRootFolder()->getSelectionList(); + +		std::for_each(item_set.begin(), item_set.end(), boost::bind( &uuid_vec_t::push_back, &uuid_list, _1)); +	} +	else if (mWearablesListViewPanel->getVisible()) +	{ +		std::vector<LLSD> item_set; +		mWearableItemsList->getSelectedValues(item_set); + +		std::for_each(item_set.begin(), item_set.end(), boost::bind( &uuid_vec_t::push_back, &uuid_list, boost::bind(&LLSD::asUUID, _1 ))); + +	} -	return selected_id; +//	return selected_id;  } diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index aa5d00903a..de1bf87fb3 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -192,7 +192,8 @@ private:  	void onAddMoreButtonClicked();  	void showFilteredWearablesListView(LLWearableType::EType type);  	void onOutfitChanging(bool started); -	LLUUID getSelectedItemUUID(); +	void getSelectedItemsUUID(uuid_vec_t& uuid_list); +	void getCurrentItemUUID(LLUUID& selected_id);  	LLTextBox*			mCurrentOutfitName;  	LLTextBox*			mStatus; diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 2f1cad8a75..076e6485a8 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -169,7 +169,14 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)  void LLPanelOutfitsInventory::onWearButtonClick()  { -	mMyOutfitsPanel->performAction("replaceoutfit"); +	if (mMyOutfitsPanel->hasItemSelected()) +	{ +		mMyOutfitsPanel->wearSelectedItems(); +	} +	else +	{ +		mMyOutfitsPanel->performAction("replaceoutfit"); +	}  }  bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD& response) diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 63b6fe5ef0..de59af49da 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -71,8 +71,8 @@ BOOL LLSidepanelInventory::postBuild()  		mShareBtn = mInventoryPanel->getChild<LLButton>("share_btn");  		mShareBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShareButtonClicked, this)); -		LLButton* shop_btn = mInventoryPanel->getChild<LLButton>("shop_btn"); -		shop_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShopButtonClicked, this)); +		mShopBtn = mInventoryPanel->getChild<LLButton>("shop_btn"); +		mShopBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShopButtonClicked, this));  		mWearBtn = mInventoryPanel->getChild<LLButton>("wear_btn");  		mWearBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onWearButtonClicked, this)); @@ -265,6 +265,7 @@ void LLSidepanelInventory::updateVerbs()  	mPlayBtn->setEnabled(FALSE);   	mTeleportBtn->setVisible(FALSE);   	mTeleportBtn->setEnabled(FALSE); + 	mShopBtn->setVisible(TRUE);  	mShareBtn->setEnabled(canShare()); @@ -283,16 +284,19 @@ void LLSidepanelInventory::updateVerbs()  		case LLInventoryType::IT_ATTACHMENT:  			mWearBtn->setVisible(TRUE);  			mWearBtn->setEnabled(TRUE); +		 	mShopBtn->setVisible(FALSE);  			break;  		case LLInventoryType::IT_SOUND:  		case LLInventoryType::IT_GESTURE:  		case LLInventoryType::IT_ANIMATION:  			mPlayBtn->setVisible(TRUE);  			mPlayBtn->setEnabled(TRUE); +		 	mShopBtn->setVisible(FALSE);  			break;  		case LLInventoryType::IT_LANDMARK:  			mTeleportBtn->setVisible(TRUE);  			mTeleportBtn->setEnabled(TRUE); +		 	mShopBtn->setVisible(FALSE);  			break;  		default:  			break; diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 13275d14c0..951fdd630c 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -94,6 +94,7 @@ private:  	LLButton*					mPlayBtn;  	LLButton*					mTeleportBtn;  	LLButton*					mOverflowBtn; +	LLButton*					mShopBtn;  }; diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index da15b93697..6bb3e7fb64 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -393,9 +393,9 @@ bool LLWearableItemTypeNameComparator::doCompare(const LLPanelInventoryListItemB  		return item_type_order1 < item_type_order2;  	} -	if (item_type_order1 & TLO_NOT_CLOTHING) +	if (item_type_order1 & TLO_SORTABLE_BY_NAME)  	{ -		// If both items are of the same asset type except AT_CLOTHING +		// If both items are of the same asset type except AT_CLOTHING and AT_BODYPART  		// we can compare them by name.  		return LLWearableItemNameComparator::doCompare(wearable_item1, wearable_item2);  	} @@ -662,7 +662,8 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu  	setMenuItemVisible(menu, "wear_add",			mask == MASK_CLOTHING && n_worn == 0);  	setMenuItemEnabled(menu, "wear_add",			n_items == 1 && canAddWearable(ids.front()));  	setMenuItemVisible(menu, "wear",				n_worn == 0); -	setMenuItemVisible(menu, "edit",				!standalone && mask & (MASK_CLOTHING|MASK_BODYPART) && n_worn == n_items); +	//visible only when one item selected and this item is worn +	setMenuItemVisible(menu, "edit",				!standalone && mask & (MASK_CLOTHING|MASK_BODYPART) && n_worn == n_items && n_worn == 1);  	setMenuItemEnabled(menu, "edit",				n_editable == 1 && n_worn == 1 && n_items == 1);  	setMenuItemVisible(menu, "create_new",			mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1);  	setMenuItemVisible(menu, "show_original",		!standalone); diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index eb82418454..d16a2a89c8 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -299,12 +299,12 @@ protected:  private:  	enum ETypeListOrder  	{ -		TLO_ATTACHMENT	= 0x01, -		TLO_CLOTHING	= 0x02, +		TLO_CLOTHING	= 0x01, +		TLO_ATTACHMENT	= 0x02,  		TLO_BODYPART	= 0x04,  		TLO_UNKNOWN		= 0x08, -		TLO_NOT_CLOTHING = TLO_ATTACHMENT | TLO_BODYPART | TLO_UNKNOWN +		TLO_SORTABLE_BY_NAME = TLO_ATTACHMENT | TLO_UNKNOWN  	};  	static LLWearableItemTypeNameComparator::ETypeListOrder getTypeListOrder(LLAssetType::EType item_type); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index cf632c085f..043077db13 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -68,9 +68,9 @@ with the same filename but different name    <texture name="BackArrow_Off" file_name="icons/BackArrow_Off.png" preload="false" /> -  <texture name="BackButton_Off" file_name="icons/back_arrow_off.png" preload="false" /> -  <texture name="BackButton_Over" file_name="icons/back_arrow_over.png" preload="false" /> -  <texture name="BackButton_Press" file_name="icons/back_arrow_press.png" preload="false" /> +  <texture name="BackButton_Off" file_name="icons/back_arrow_off.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" /> +  <texture name="BackButton_Over" file_name="icons/back_arrow_over.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" /> +  <texture name="BackButton_Press" file_name="icons/back_arrow_press.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" />    <texture name="Blank" file_name="Blank.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index fc1caca9e9..484617df34 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -131,19 +131,25 @@       name="tattoo_desc_text">          Tattoo:      </string> -    <button +    <!-- Default width of the button should be to show it without label. +     Button will be extedned in code to show whole label when wearable is being changed. +    --> +    <labeled_back_button       follows="top|left"       height="24"       image_hover_unselected="BackButton_Over"       image_pressed="BackButton_Press"       image_unselected="BackButton_Off"       layout="topleft" +     label="Save"       left="11"       name="back_btn" +     pad_left="24" +     tool_tip="Return to Edit Outfit"       top="3"       width="30" />      <text -     follows="top|left" +     follows="top|left|right"       font="SansSerifHugeBold"       height="22"       layout="topleft" @@ -152,7 +158,8 @@       text_color="white"       top="3"       value="Editing Shape" -     width="270" /> +     use_ellipses="true" +     width="274" />      <panel       background_opaque="true"       background_visible="true" diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index e894fc8fb8..2fbe4510e1 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -96,6 +96,7 @@ background_visible="true"         follows="all"         layout="topleft"         auto_resize="true" +       height="513"         width="313">     <accordion       left="0" @@ -105,6 +106,7 @@ background_visible="true"       follows="all"       layout="topleft"       name="groups_accordion" +     height="513"       width="313">           <accordion_tab              expanded="true" @@ -182,6 +184,7 @@ background_visible="true"           top_pad="0"     name="button_row"     follows="bottom|left" +   height="23"     width="313">     <button      follows="bottom|left" 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 4abd7dceac..362fdd606a 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -190,7 +190,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap                  <layout_panel                   auto_resize="true"                    background_visible="true" -                 bg_alpha_color="DkGray2" +                 bg_alpha_color="Black"                   layout="topleft"                   height="154"                   name="add_button_and_combobox" @@ -318,13 +318,13 @@ It is calculated as border_size + 2*UIResizeBarOverlap               background_visible="false"               border="false"               follows="left|top|right|bottom" -             height="442" +             height="449"               layout="topleft"               left="0"               mouse_opaque="false"               name="folder_view" -             top_pad="5" -             width="310" +             top_pad="0" +             width="313"               visible="false"/>              <panel               name="filtered_wearables_panel" @@ -346,7 +346,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap                   layout="topleft"                   follows="all"                   multi_select="true" -                 width="310" +                 width="313"                   height="449"                   left="0"                   top="0"/> @@ -382,20 +382,20 @@ It is calculated as border_size + 2*UIResizeBarOverlap          <icon           follows="bottom|left|right"           height="25" -         image_name="Toolbar_Right_Off" +         image_name="Toolbar_Middle_Off"           layout="topleft"           left_pad="1"           name="dummy_right_icon" -         width="246" /> +         width="250" />          <button           follows="bottom|right"           height="25" -         image_hover_unselected="Toolbar_Middle_Over" +         image_hover_unselected="Toolbar_Right_Over"           image_overlay="Shop" -         image_selected="Toolbar_Middle_Selected" -         image_unselected="Toolbar_Middle_Off" +         image_selected="Toolbar_Right_Selected" +         image_unselected="Toolbar_Right_Off"           layout="topleft" -         left_pad="0" +         left_pad="1"           name="shop_btn_1"           top="1"           width="31" /> @@ -468,21 +468,21 @@ It is calculated as border_size + 2*UIResizeBarOverlap          <icon           follows="bottom|left|right"           height="25" -         image_name="Toolbar_Right_Off" +         image_name="Toolbar_Middle_Off"           layout="topleft"           left_pad="1"           name="dummy_right_icon" -         width="153" > +         width="154" >          </icon>          <button           follows="bottom|right"           height="25" -         image_hover_unselected="Toolbar_Middle_Over" +         image_hover_unselected="Toolbar_Right_Over"           image_overlay="Shop" -         image_selected="Toolbar_Middle_Selected" -         image_unselected="Toolbar_Middle_Off" +         image_selected="Toolbar_Right_Selected" +         image_unselected="Toolbar_Right_Off"           layout="topleft" -         left_pad="0" +         left_pad="1"           name="shop_btn_2"           top="1"           width="31" />  | 
