Commits

Anonymous committed f87ca7c Merge

automated merge

  • Participants
  • Parent commits 1e6a789, 6a7183d

Comments (0)

Files changed (89)

indra/llcharacter/llcharacter.cpp

 		param;
 		param = getNextVisualParam())
 	{
-		if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+		if (param->isTweakable())
 		{
 			param->setWeight( param->getDefaultWeight(), FALSE );
 		}

indra/llcharacter/llvisualparam.cpp

 
 	if (mInfo)
 	{
-		if (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+		if (isTweakable())
 		{
 			mTargetWeight = llclamp(target_value, mInfo->mMinWeight, mInfo->mMaxWeight);
 		}
 //-----------------------------------------------------------------------------
 void LLVisualParam::stopAnimating(BOOL upload_bake)
 { 
-	if (mIsAnimating && getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+	if (mIsAnimating && isTweakable())
 	{
 		mIsAnimating = FALSE; 
 		setWeight(mTargetWeight, upload_bake);

indra/llcharacter/llvisualparam.h

 {
 	VISUAL_PARAM_GROUP_TWEAKABLE,
 	VISUAL_PARAM_GROUP_ANIMATABLE,
+	VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT,
 	NUM_VISUAL_PARAM_GROUPS
 };
 
 	F32						getCurrentWeight() const 	{ return mCurWeight; }
 	F32						getLastWeight() const	{ return mLastWeight; }
 	BOOL					isAnimating() const	{ return mIsAnimating; }
+	BOOL					isTweakable() const { return (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)  || (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT); }
 
 	LLVisualParam*			getNextParam()		{ return mNext; }
 	void					setNextParam( LLVisualParam *next );

indra/llui/llbutton.h

 	
 	void			setFont(const LLFontGL *font)		
 		{ mGLFont = ( font ? font : LLFontGL::getFontSansSerif()); }
+	const LLFontGL* getFont() const { return mGLFont; }
+
 
 	S32				getLastDrawCharsCount() const { return mLastDrawCharsCount; }
 

indra/llui/llflatlistview.cpp

 , mNoFilteredItemsMsg(p.no_filtered_items_msg)
 , mNoItemsMsg(p.no_items_msg)
 , mForceShowingUnmatchedItems(false)
-, mLastFilterSucceded(false)
+, mHasMatchedItems(false)
 {
 
 }
 	item_panel_list_t items;
 	getItems(items);
 
-	mLastFilterSucceded = false;
+	mHasMatchedItems = false;
 	for (item_panel_list_t::iterator
 			 iter = items.begin(),
 			 iter_end = items.end();
 		// 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);
 		}
 	}
 	notifyParentItemsRectChanged();
 }
 
-bool LLFlatListViewEx::wasLasFilterSuccessfull()
+bool LLFlatListViewEx::hasMatchedItems()
 {
-	return mLastFilterSucceded;
+	return mHasMatchedItems;
 }
 
 //EOF

indra/llui/llflatlistview.h

 	/**
 	 * Returns true if last call of filterItems() found at least one matching item
 	 */
-	bool wasLasFilterSuccessfull();
+	bool hasMatchedItems();
 
 protected:
 	LLFlatListViewEx(const Params& p);
 	/**
 	 * True if last call of filterItems() found at least one matching item
 	 */
-	bool mLastFilterSucceded;
+	bool mHasMatchedItems;
 };
 
 #endif

indra/llui/llfloater.cpp

 
 LLFastTimer::DeclareTimer POST_BUILD("Floater Post Build");
 
-bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)
+bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node)
 {
 	Params params(LLUICtrlFactory::getDefaultParams<LLFloater>());
-	LLXUIParser::instance().readXUI(node, params); // *TODO: Error checking
+	LLXUIParser::instance().readXUI(node, params, filename); // *TODO: Error checking
 
 	if (output_node)
 	{

indra/llui/llfloater.h

 	static void setupParamsForExport(Params& p, LLView* parent);
 
 	void initFromParams(const LLFloater::Params& p);
-	bool initFloaterXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL);
+	bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL);
 
 	/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
 	/*virtual*/ BOOL canSnapTo(const LLView* other_view);

indra/llui/llmenugl.cpp

 :	shortcut("shortcut"),
 	jump_key("jump_key", KEY_NONE),
 	use_mac_ctrl("use_mac_ctrl", false),
+	allow_key_repeat("allow_key_repeat", false),
 	rect("rect"),
 	left("left"),
 	top("top"),
 LLMenuItemGL::LLMenuItemGL(const LLMenuItemGL::Params& p)
 :	LLUICtrl(p),
 	mJumpKey(p.jump_key),
-	mAllowKeyRepeat(FALSE),
+	mAllowKeyRepeat(p.allow_key_repeat),
 	mHighlight( FALSE ),
 	mGotHover( FALSE ),
 	mBriefItem( FALSE ),

indra/llui/llmenugl.h

 	{
 		Optional<std::string>	shortcut;
 		Optional<KEY>			jump_key;
-		Optional<bool>			use_mac_ctrl;
+		Optional<bool>			use_mac_ctrl,
+								allow_key_repeat;
 
 		Ignored					rect,
 								left,

indra/llui/llpanel.cpp

 		if (xml_filename.empty())
 		{
 			node->getAttributeString("filename", xml_filename);
+			setXMLFilename(xml_filename);
 		}
 
 		if (!xml_filename.empty())
 		{
+			LLUICtrlFactory::instance().pushFileName(xml_filename);
+
 			LLFastTimer timer(FTM_EXTERNAL_PANEL_LOAD);
 			if (output_node)
 			{
 				//if we are exporting, we want to export the current xml
 				//not the referenced xml
-				LLXUIParser::instance().readXUI(node, params, xml_filename);
+				LLXUIParser::instance().readXUI(node, params, LLUICtrlFactory::getInstance()->getCurFileName());
 				Params output_params(params);
 				setupParamsForExport(output_params, parent);
 				output_node->setName(node->getName()->mString);
 				return FALSE;
 			}
 
-			LLXUIParser::instance().readXUI(referenced_xml, params, xml_filename);
+			LLXUIParser::instance().readXUI(referenced_xml, params, LLUICtrlFactory::getInstance()->getCurFileName());
 
 			// add children using dimensions from referenced xml for consistent layout
 			setShape(params.rect);
 			LLUICtrlFactory::createChildren(this, referenced_xml, child_registry_t::instance());
 
-			setXMLFilename(xml_filename);
+			LLUICtrlFactory::instance().popFileName();
 		}
 
 		// ask LLUICtrlFactory for filename, since xml_filename might be empty

indra/llui/llui.cpp

 	return language;
 }
 
+struct SubDir : public LLInitParam::Block<SubDir>
+{
+	Mandatory<std::string> value;
+
+	SubDir()
+	:	value("value")
+	{}
+};
+
+struct Directory : public LLInitParam::Block<Directory>
+{
+	Multiple<SubDir, AtLeast<1> > subdirs;
+
+	Directory()
+	:	subdirs("subdir")
+	{}
+};
+
+struct Paths : public LLInitParam::Block<Paths>
+{
+	Multiple<Directory, AtLeast<1> > directories;
+
+	Paths()
+	:	directories("directory")
+	{}
+};
+
 //static
 void LLUI::setupPaths()
 {
 
 	LLXMLNodePtr root;
 	BOOL success  = LLXMLNode::parseFile(filename, root, NULL);
+	Paths paths;
+	LLXUIParser::instance().readXUI(root, paths, filename);
+
 	sXUIPaths.clear();
 	
-	if (success)
+	if (success && paths.validateBlock())
 	{
 		LLStringUtil::format_map_t path_args;
 		path_args["[LANGUAGE]"] = LLUI::getLanguage();
 		
-		for (LLXMLNodePtr path = root->getFirstChild(); path.notNull(); path = path->getNextSibling())
+		for (LLInitParam::ParamIterator<Directory>::const_iterator it = paths.directories().begin(), 
+				end_it = paths.directories().end();
+			it != end_it;
+			++it)
 		{
-			std::string path_val_ui(path->getValue());
+			std::string path_val_ui;
+			for (LLInitParam::ParamIterator<SubDir>::const_iterator subdir_it = it->subdirs().begin(),
+					subdir_end_it = it->subdirs().end();
+				subdir_it != subdir_end_it;)
+			{
+				path_val_ui += subdir_it->value();
+				if (++subdir_it != subdir_end_it)
+					path_val_ui += gDirUtilp->getDirDelimiter();
+			}
 			LLStringUtil::format(path_val_ui, path_args);
 			if (std::find(sXUIPaths.begin(), sXUIPaths.end(), path_val_ui) == sXUIPaths.end())
 			{
 				sXUIPaths.push_back(path_val_ui);
 			}
+
 		}
 	}
 	else // parsing failed

indra/llui/lluictrlfactory.cpp

 
 	if (LLUICtrlFactory::getLayeredXMLNode(filename, root_node))
 	{
+		LLUICtrlFactory::instance().pushFileName(filename);
 		LLXUIParser::instance().readXUI(root_node, block, filename);
+		LLUICtrlFactory::instance().popFileName();
 	}
 }
 
 	bool res = true;
 	
 	lldebugs << "Building floater " << filename << llendl;
-	mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename));
+	pushFileName(filename);
 	{
 		if (!floaterp->getFactoryMap().empty())
 		{
 		floaterp->getCommitCallbackRegistrar().pushScope();
 		floaterp->getEnableCallbackRegistrar().pushScope();
 		
-		res = floaterp->initFloaterXML(root, floaterp->getParent(), output_node);
+		res = floaterp->initFloaterXML(root, floaterp->getParent(), filename, output_node);
 
 		floaterp->setXMLFilename(filename);
 		
 			mFactoryStack.pop_front();
 		}
 	}
-	mFileNames.pop_back();
+	popFileName();
 	
 	return res;
 }
 
 	lldebugs << "Building panel " << filename << llendl;
 
-	mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename));
+	pushFileName(filename);
 	{
 		if (!panelp->getFactoryMap().empty())
 		{
 			mFactoryStack.pop_front();
 		}
 	}
-	mFileNames.pop_back();
+	popFileName();
 	return didPost;
 }
 
 	return create<LLPanel>(panel_p);
 }
 
+std::string LLUICtrlFactory::getCurFileName() 
+{ 
+	return mFileNames.empty() ? "" : gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + mFileNames.back(); 
+}
+
+
+void LLUICtrlFactory::pushFileName(const std::string& name) 
+{ 
+	mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), name)); 
+}
+
+void LLUICtrlFactory::popFileName() 
+{ 
+	mFileNames.pop_back(); 
+}
+
+
 //-----------------------------------------------------------------------------
 
 //static

indra/llui/lluictrlfactory.h

 	// Returns 0 on success
 	S32 saveToXML(LLView* viewp, const std::string& filename);
 
-	std::string getCurFileName() { return mFileNames.empty() ? "" : mFileNames.back(); }
+	std::string getCurFileName();
+	void pushFileName(const std::string& name);
+	void popFileName();
 
 	static BOOL getAttributeColor(LLXMLNodePtr node, const std::string& name, LLColor4& color);
 
 		T* widget = NULL;
 
 		std::string skinned_filename = findSkinnedFilename(filename);
-		getInstance()->mFileNames.push_back(skinned_filename);
+		instance().pushFileName(filename);
 		{
 			LLXMLNodePtr root_node;
 
 			}
 		}
 fail:
-		getInstance()->mFileNames.pop_back();
+		instance().popFileName();
 		return widget;
 	}
 

indra/llui/llview.cpp

 	user_resize("user_resize"),
 	auto_resize("auto_resize"),
 	needs_translate("translate"),
+	min_width("min_width"),
+	max_width("max_width"),
 	xmlns("xmlns"),
 	xmlns_xsi("xmlns:xsi"),
 	xsi_schemaLocation("xsi:schemaLocation"),

indra/llui/llview.h

 		Ignored						user_resize,
 									auto_resize,
 									needs_translate,
+									min_width,
+									max_width,
 									xmlns,
 									xmlns_xsi,
 									xsi_schemaLocation,
 		// did we find *something* with that name?
 		if (child)
 		{
-			llwarns << "Found child named " << name << " but of wrong type " << typeid(*child).name() << ", expecting " << typeid(T*).name() << llendl;
+			llwarns << "Found child named \"" << name << "\" but of wrong type " << typeid(*child).name() << ", expecting " << typeid(T*).name() << llendl;
 		}
 		result = getDefaultWidget<T>(name);
 		if (!result)

indra/newview/character/avatar_lad.xml

       
     <param
      id="1071"
-     group="0"
+     group="2"
      wearable="tattoo"
      edit_group="colorpicker"
      name="tattoo_red"
 
     <param
      id="1072"
-     group="0"
+     group="2"
      wearable="tattoo"
      edit_group="colorpicker"
      name="tattoo_green"
 
     <param
      id="1073"
-     group="0"
+     group="2"
      wearable="tattoo"
      edit_group="colorpicker"
      name="tattoo_blue"

indra/newview/llagent.cpp

 		 param;
 		 param = (LLViewerVisualParam*)gAgentAvatarp->getNextVisualParam())
 	{
-		if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+		if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) // do not transmit params of group VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT
 		{
 			msg->nextBlockFast(_PREHASH_VisualParam );
 			

indra/newview/llcofwearables.cpp

 				 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);
+			}
 		}
 	}
 }
 		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);
+			}
 		}
 	}
 }

indra/newview/llfloaterland.cpp

 	mLandingTypeCombo = getChild<LLComboBox>( "landing type");
 	childSetCommitCallback("landing type", onCommitAny, this);
 
-	getChild<LLTextureCtrl>("snapshot_ctrl")->setFallbackImageName("default_land_picture.j2c");
-
 	return TRUE;
 }
 

indra/newview/llfloaterpreference.cpp

 #include "llscrolllistctrl.h"
 #include "llscrolllistitem.h"
 #include "llsliderctrl.h"
+#include "llsidetray.h"
 #include "lltabcontainer.h"
 #include "lltrans.h"
 #include "llviewercontrol.h"
 	mCommitCallbackRegistrar.add("Pref.applyUIColor",			boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
 	mCommitCallbackRegistrar.add("Pref.getUIColor",				boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2));
 	mCommitCallbackRegistrar.add("Pref.MaturitySettings",		boost::bind(&LLFloaterPreference::onChangeMaturity, this));
+	mCommitCallbackRegistrar.add("Pref.BlockList",				boost::bind(&LLFloaterPreference::onClickBlockList, this));
 
 	sSkin = gSavedSettings.getString("SkinCurrent");
 }
 	getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
 }
 
+// FIXME: this will stop you from spawning the sidetray from preferences dialog on login screen
+// but the UI for this will still be enabled
+void LLFloaterPreference::onClickBlockList()
+{
+	// don't create side tray on demand
+	if (LLSideTray::instanceCreated())
+	{
+		LLSideTray::getInstance()->showPanel("panel_block_list_sidetray");
+	}
+}
+
 
 void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
 {

indra/newview/llfloaterpreference.h

 	void onCommitMusicEnabled();
 	void applyResolution();
 	void onChangeMaturity();
+	void onClickBlockList();
 	void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
 	void getUIColor(LLUICtrl* ctrl, const LLSD& param);
 	

indra/newview/llfloatertools.cpp

 	childSetValue("checkbox uniform",(BOOL)gSavedSettings.getBOOL("ScaleUniform"));
 	mCheckStretchTexture	= getChild<LLCheckBoxCtrl>("checkbox stretch textures");
 	childSetValue("checkbox stretch textures",(BOOL)gSavedSettings.getBOOL("ScaleStretchTextures"));
-	mTextGridMode			= getChild<LLTextBox>("text ruler mode");
 	mComboGridMode			= getChild<LLComboBox>("combobox grid mode");
 	mCheckStretchUniformLabel = getChild<LLTextBox>("checkbox uniform label");
 
 	mCheckSnapToGrid(NULL),
 	mBtnGridOptions(NULL),
 	mTitleMedia(NULL),
-	mTextGridMode(NULL),
 	mComboGridMode(NULL),
 	mCheckStretchUniform(NULL),
 	mCheckStretchTexture(NULL),
 
 		mComboGridMode->setCurrentByIndex(index);
 	}
-	if (mTextGridMode) mTextGridMode->setVisible( edit_visible );
-
 	// Snap to grid disabled for grab tool - very confusing
 	if (mCheckSnapToGrid) mCheckSnapToGrid->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ );
 	if (mBtnGridOptions) mBtnGridOptions->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ );

indra/newview/llfloatertools.h

 
 	LLCheckBoxCtrl*	mCheckSnapToGrid;
 	LLButton*		mBtnGridOptions;
-	LLTextBox*		mTextGridMode;
 	LLComboBox*		mComboGridMode;
 	LLCheckBoxCtrl*	mCheckStretchUniform;
 	LLCheckBoxCtrl*	mCheckStretchTexture;

indra/newview/llfloaterworldmap.cpp

 #include "llinventorymodelbackgroundfetch.h"
 #include "llinventoryobserver.h"
 #include "lllandmarklist.h"
-#include "lllineeditor.h"
+#include "llsearcheditor.h"
 #include "llnotificationsutil.h"
 #include "llregionhandle.h"
 #include "llscrolllistctrl.h"
 	mPanel = getChild<LLPanel>("objects_mapview");
 
 	LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
-	if (avatar_combo)
-	{
-		avatar_combo->selectFirstItem();
-		avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
-		avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
-	}
+	avatar_combo->selectFirstItem();
+	avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
+	avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
 
-	getChild<LLScrollListCtrl>("location")->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
-
-	LLLineEditor *location_editor = getChild<LLLineEditor>("location");
-	if (location_editor)
-	{
-		location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this, _1), NULL );
-	}
+	LLSearchEditor *location_editor = getChild<LLSearchEditor>("location");
+	location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
+	location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
 	
 	getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
 
 	LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");
-	if (landmark_combo)
-	{
-		landmark_combo->selectFirstItem();
-		landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) );
-		landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
-	}
+	landmark_combo->selectFirstItem();
+	landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) );
+	landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
 
 	mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f);
 	childSetValue("zoom slider", LLWorldMapView::sMapScale);
 	LLTracker::clearFocus();
 }
 
-void LLFloaterWorldMap::onSearchTextEntry( LLLineEditor* ctrl )
+void LLFloaterWorldMap::onSearchTextEntry( )
 {
 	onComboTextEntry();
 	updateSearchEnabled();

indra/newview/llfloaterworldmap.h

 	void		    onAvatarComboCommit();
 
 	void			onComboTextEntry( );
-	void			onSearchTextEntry( LLLineEditor* ctrl );
+	void			onSearchTextEntry( );
 
 	void			onClearBtn();
 	void			onClickTeleportBtn();

indra/newview/lloutfitslist.cpp

 
 	void onTakeOff()
 	{
-		const LLUUID& selected_outfit_id = getSelectedOutfitID();
-		if (selected_outfit_id.notNull())
+		// Take off selected items if there are any
+		if (mOutfitList->hasItemSelected())
 		{
-			LLAppearanceMgr::instance().takeOffOutfit(selected_outfit_id);
+			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.
+		{
+			const LLUUID& selected_outfit_id = getSelectedOutfitID();
+			if (selected_outfit_id.notNull())
+			{
+				LLAppearanceMgr::instance().takeOffOutfit(selected_outfit_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())
 	}
 	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;
 }
 	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);
 	{
 		// 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
 	}
 }
 
+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);
 	}
 }
 
+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);
 
 	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);
 }

indra/newview/lloutfitslist.h

 
 	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
 	 */
 	 */
 	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();

indra/newview/llpanelavatar.cpp

 
 	mProfileMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
 
-	LLTextureCtrl* pic = getChild<LLTextureCtrl>("2nd_life_pic");
-	pic->setFallbackImageName("default_profile_picture.j2c");
-
-	pic = getChild<LLTextureCtrl>("real_world_pic");
-	pic->setFallbackImageName("default_profile_picture.j2c");
-
 	LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this);
 
 	resetControls();
 {
 	LLPanelAvatarProfile::postBuild();
 
-	mStatusCombobox = getChild<LLComboBox>("status_combo");
-
-	childSetCommitCallback("status_combo", boost::bind(&LLPanelMyProfile::onStatusChanged, this), NULL);
 	childSetCommitCallback("status_me_message_text", boost::bind(&LLPanelMyProfile::onStatusMessageChanged, this), NULL);
 
 	resetControls();
 
 	fillPartnerData(avatar_data);
 
-	fillStatusData(avatar_data);
-
 	fillAccountStatus(avatar_data);
 }
 
-void LLPanelMyProfile::fillStatusData(const LLAvatarData* avatar_data)
-{
-	std::string status;
-	if (gAgent.getAFK())
-	{
-		status = "away";
-	}
-	else if (gAgent.getBusy())
-	{
-		status = "busy";
-	}
-	else
-	{
-		status = "online";
-	}
-
-	mStatusCombobox->setValue(status);
-}
-
 void LLPanelMyProfile::resetControls()
 {
 	childSetVisible("status_panel", false);
 	childSetVisible("profile_me_buttons_panel", true);
 }
 
-void LLPanelMyProfile::onStatusChanged()
-{
-	LLSD::String status = mStatusCombobox->getValue().asString();
-
-	if ("online" == status)
-	{
-		gAgent.clearAFK();
-		gAgent.clearBusy();
-	}
-	else if ("away" == status)
-	{
-		gAgent.clearBusy();
-		gAgent.setAFK();
-	}
-	else if ("busy" == status)
-	{
-		gAgent.clearAFK();
-		gAgent.setBusy();
-		LLNotificationsUtil::add("BusyModeSet");
-	}
-}
 
 void LLPanelMyProfile::onStatusMessageChanged()
 {

indra/newview/llpanelavatar.h

 
 	/*virtual*/ void processProfileProperties(const LLAvatarData* avatar_data);
 
-	/**
-	 * Fills Avatar status data.
-	 */
-	virtual void fillStatusData(const LLAvatarData* avatar_data);
-
 	/*virtual*/ void resetControls();
 
 protected:
-
-	void onStatusChanged();
 	void onStatusMessageChanged();
-
-private:
-
-	LLComboBox* mStatusCombobox;
 };
 
 /**

indra/newview/llpaneleditwearable.cpp

 
 #include "llcommandhandler.h"
 #include "lltextutil.h"
+#include "llappearancemgr.h"
 
 // register panel with appropriate XML
 static LLRegisterPanelClassWrapper<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable");
 {
 }
 
+/**
+ * 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;
 
 	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));
 
 	if (mWearablePtr->getName().compare(mNameEditor->getText()) != 0)
 	{
 		// the name of the wearable has changed, re-save wearable with new name
+		LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(),false);
 		gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, mNameEditor->getText(), FALSE);
 	}
 	else
 	if (show)
 	{
 		mPanelTitle->setText(title);
+		mPanelTitle->setToolTip(title);
 		mDescTitle->setText(description_title);
 		
 		// set name
 	{
 		LLViewerVisualParam *param = (LLViewerVisualParam*) *iter;
 
-		if (param->getID() == -1
-			|| param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE 
+		if (param->getID() == -1 
+			|| !param->isTweakable()
 			|| param->getEditGroup() != edit_group 
 			|| !(param->getSex() & avatar_sex))
 		{
 		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)

indra/newview/llpaneleditwearable.h

 	// these are constant no matter what wearable we're editing
 	LLButton *mBtnRevert;
 	LLButton *mBtnBack;
+	std::string mBackBtnLabel;
 
 	LLTextBox *mPanelTitle;
 	LLTextBox *mDescTitle;

indra/newview/llpanelface.cpp

 		if(texture_ctrl)
 		{
 			texture_ctrl->setImageAssetID( LLUUID::null );
-			texture_ctrl->setFallbackImageName( "locked_image.j2c" );
 			texture_ctrl->setEnabled( FALSE );  // this is a LLUICtrl, but we don't want it to have keyboard focus so we add it as a child, not a ctrl.
 // 			texture_ctrl->setValid(FALSE);
 		}

indra/newview/llpanelnearbymedia.cpp

 {
 	LLPanel::reshape(width, height, called_from_parent);
 
-	LLButton* more_less_btn = getChild<LLButton>("more_less_btn");
-	if (more_less_btn->getValue().asBoolean())
+	LLButton* more_btn = findChild<LLButton>("more_btn");
+	if (more_btn && more_btn->getValue().asBoolean())
 	{
 		mMoreRect = getRect();
 	}

indra/newview/llpanelobject.cpp

 	//--------------------------------------------------------
 		
 	// material type popup
-	mLabelMaterial = getChild<LLTextBox>("label material");
 	mComboMaterial = getChild<LLComboBox>("material");
 	childSetCommitCallback("material",onCommitMaterial,this);
 	mComboMaterial->removeall();
 	mComboMaterialItemCount = mComboMaterial->getItemCount();
 
 	// Base Type
-	mLabelBaseType = getChild<LLTextBox>("label basetype");
 	mComboBaseType = getChild<LLComboBox>("comboBaseType");
 	childSetCommitCallback("comboBaseType",onCommitParametric,this);
 
 	if (editable && single_volume && material_same)
 	{
 		mComboMaterial->setEnabled( TRUE );
-		mLabelMaterial->setEnabled( TRUE );
 		if (material_code == LL_MCODE_LIGHT)
 		{
 			if (mComboMaterial->getItemCount() == mComboMaterialItemCount)
 	else
 	{
 		mComboMaterial->setEnabled( FALSE );
-		mLabelMaterial->setEnabled( FALSE );	
 	}
 	//----------------------------------------------------------------------------
 
 	}
 
 	// Update field enablement
-	mLabelBaseType	->setEnabled( enabled );
 	mComboBaseType	->setEnabled( enabled );
 
 	mLabelCut		->setEnabled( enabled );
 	mCheckCastShadows->setEnabled( FALSE );
 #endif
 	mComboMaterial	->setEnabled( FALSE );
-	mLabelMaterial	->setEnabled( FALSE );
 	// Disable text labels
 	mLabelPosition	->setEnabled( FALSE );
 	mLabelSize		->setEnabled( FALSE );
 	mLabelRotation	->setEnabled( FALSE );
-	mLabelBaseType	->setEnabled( FALSE );
 	mLabelCut		->setEnabled( FALSE );
 	mLabelHollow	->setEnabled( FALSE );
 	mLabelHoleType	->setEnabled( FALSE );

indra/newview/llpanelobject.h

 protected:
 	S32				mComboMaterialItemCount;
 
-	LLTextBox*		mLabelMaterial;
 	LLComboBox*		mComboMaterial;
 	
 	// Per-object options
-	LLTextBox*		mLabelBaseType;
 	LLComboBox*		mComboBaseType;
 
 	LLTextBox*		mLabelCut;

indra/newview/llpaneloutfitedit.cpp

 	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;
 		displayCurrentOutfit();
 		mInitialized = true;
 	}
+
+	showAddWearablesPanel(false);
+	mWearableItemsList->resetSelection();
+	mInventoryItemsPanel->clearSelection();
 }
 
 void LLPanelOutfitEdit::moveWearable(bool closer_to_body)
 
 void LLPanelOutfitEdit::onPlusBtnClicked(void)
 {
-	LLUUID selected_id = getSelectedItemUUID();
+	LLUUID selected_id;
+	getCurrentItemUUID(selected_id);
 
 	if (selected_id.isNull()) return;
 
 
 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)
+	mPlusBtn->setEnabled(can_add);
+
+	LLViewerInventoryItem* first_item(gInventory.getItem(selected_items.front()));
+
+	if (can_add && 
+		first_item &&
+		selected_items.size() == 1 && 
+		first_item->getType() == LLAssetType::AT_BODYPART)
 	{
-		return;
+		mPlusBtn->setToolTip(getString("replace_body_part"));
+	}
+	else
+	{
+		mPlusBtn->setToolTip(LLStringUtil::null);
 	}
 
-	switch (item->getType())
-	{
-	case LLAssetType::AT_BODYPART:
-		mPlusBtn->setToolTip(getString("replace_body_part"));
-		break;
-	case LLAssetType::AT_CLOTHING:
-	case LLAssetType::AT_OBJECT:
-		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,
 	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();
 	}
 	{
 		selected_id = mWearableItemsList->getSelectedUUID();
 	}
-
-	return selected_id;
 }
 
 
+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;
+}
+
+
 // EOF

indra/newview/llpaneloutfitedit.h

 	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;

indra/newview/llpaneloutfitsinventory.cpp

 
 void LLPanelOutfitsInventory::onWearButtonClick()
 {
-	mMyOutfitsPanel->performAction("replaceoutfit");
+	if (mMyOutfitsPanel->hasItemSelected())
+	{
+		mMyOutfitsPanel->wearSelectedItems();
+	}
+	else
+	{
+		mMyOutfitsPanel->performAction("replaceoutfit");
+	}
 }
 
 bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD& response)

indra/newview/llpanelplace.cpp

 		mDescEditor->setText(getString("server_update_text"));
 	}
 	mSnapshotCtrl->setImageAssetID(LLUUID::null);
-	mSnapshotCtrl->setFallbackImageName("default_land_picture.j2c");
 }
 
 // static

indra/newview/llpanelplaceinfo.cpp

 	mDescEditor->setText(loading);
 
 	mSnapshotCtrl->setImageAssetID(LLUUID::null);
-	mSnapshotCtrl->setFallbackImageName("default_land_picture.j2c");
 }
 
 //virtual

indra/newview/llpanelvolumepulldown.cpp

 #include "lltabcontainer.h"
 #include "llfloaterreg.h"
 #include "llfloaterpreference.h"
-#include "llslider.h"
+#include "llsliderctrl.h"
 
 /* static */ const F32 LLPanelVolumePulldown::sAutoCloseFadeStartTimeSec = 4.0f;
 /* static */ const F32 LLPanelVolumePulldown::sAutoCloseTotalTimeSec = 5.0f;
 BOOL LLPanelVolumePulldown::postBuild()
 {
 	// set the initial volume-slider's position to reflect reality
-	LLSlider* volslider =  getChild<LLSlider>( "mastervolume" );
+	LLSliderCtrl* volslider =  getChild<LLSliderCtrl>( "mastervolume" );
 	volslider->setValue(gSavedSettings.getF32("AudioLevelMaster"));
 
 	return LLPanel::postBuild();

indra/newview/llsidepanelinventory.cpp

 		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));
 	mPlayBtn->setEnabled(FALSE);
  	mTeleportBtn->setVisible(FALSE);
  	mTeleportBtn->setEnabled(FALSE);
+ 	mShopBtn->setVisible(TRUE);
 
 	mShareBtn->setEnabled(canShare());
 
 		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;

indra/newview/llsidepanelinventory.h

 	LLButton*					mPlayBtn;
 	LLButton*					mTeleportBtn;
 	LLButton*					mOverflowBtn;
+	LLButton*					mShopBtn;
 
 };
 

indra/newview/llsidepaneliteminfo.cpp

 	getChild<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
 	// Mark for sale or not, and sale info
 	getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
-	getChild<LLUICtrl>("RadioSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleType, this));
 	// "Price" label for edit
 	getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
 	refresh();
 			"CheckNextOwnerCopy",
 			"CheckNextOwnerTransfer",
 			"CheckPurchase",
-			"RadioSaleType",
 			"Edit Cost"
 		};
 
 		"CheckNextOwnerTransfer",
 		"CheckPurchase",
 		"SaleLabel",
-		"RadioSaleType",
 		"combobox sale copy",
 		"Edit Cost",
 		"TextPrice"
 		childSetEnabled("CheckNextOwnerCopy",(base_mask & PERM_COPY) && !cannot_restrict_permissions);
 		childSetEnabled("CheckNextOwnerTransfer",(next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
 
-		childSetEnabled("RadioSaleType",is_complete && is_for_sale);
 		childSetEnabled("TextPrice",is_complete && is_for_sale);
 		childSetEnabled("Edit Cost",is_complete && is_for_sale);
 	}
 		childSetEnabled("CheckNextOwnerCopy",FALSE);
 		childSetEnabled("CheckNextOwnerTransfer",FALSE);
 
-		childSetEnabled("RadioSaleType",FALSE);
 		childSetEnabled("TextPrice",FALSE);
 		childSetEnabled("Edit Cost",FALSE);
 	}
 	childSetValue("CheckNextOwnerCopy",LLSD(BOOL(next_owner_mask & PERM_COPY)));
 	childSetValue("CheckNextOwnerTransfer",LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
 
-	LLRadioGroup* radioSaleType = getChild<LLRadioGroup>("RadioSaleType");
 	if (is_for_sale)
 	{
-		radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1);
 		S32 numerical_price;
 		numerical_price = sale_info.getSalePrice();
 		childSetText("Edit Cost",llformat("%d",numerical_price));
 	}
 	else
 	{
-		radioSaleType->setSelectedIndex(-1);
 		childSetText("Edit Cost",llformat("%d",0));
 	}
 }

indra/newview/llstatusbar.cpp

 
 LLStatusBar::LLStatusBar(const LLRect& rect)
 :	LLPanel(),
-	mTextHealth(NULL),
 	mTextTime(NULL),
 	mSGBandwidth(NULL),
 	mSGPacketLoss(NULL),
 	// build date necessary data (must do after panel built)
 	setupDate();
 
-	mTextHealth = getChild<LLTextBox>("HealthText" );
 	mTextTime = getChild<LLTextBox>("TimeText" );
 	
-	getChild<LLUICtrl>("buycurrency")->setCommitCallback( 
-		boost::bind(&LLStatusBar::onClickBuyCurrency, this));
 	getChild<LLUICtrl>("buyL")->setCommitCallback(
 		boost::bind(&LLStatusBar::onClickBuyCurrency, this));
 
 			BOOL flash = S32(mHealthTimer->getElapsedSeconds() * ICON_FLASH_FREQUENCY) & 1;
 			childSetVisible("health", flash);
 		}
-		mTextHealth->setVisible(TRUE);
 
 		// Health
 		childGetRect( "health", buttonRect );
 		r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
 		childSetRect("health", r);
 		x += buttonRect.getWidth();
-
-		const S32 health_width = S32( LLFontGL::getFontSansSerifSmall()->getWidth(std::string("100%")) );
-		r.set(x, y+TEXT_HEIGHT - 2, x+health_width, y);
-		mTextHealth->setRect(r);
-		x += health_width;
-	}
-	else
-	{
-		// invisible if region doesn't allow damage
-		childSetVisible("health", false);
-		mTextHealth->setVisible(FALSE);
 	}
 
 	mSGBandwidth->setVisible(net_stats_visible);
 void LLStatusBar::setHealth(S32 health)
 {
 	//llinfos << "Setting health to: " << buffer << llendl;
-	mTextHealth->setText(llformat("%d%%", health));
-
 	if( mHealth > health )
 	{
 		if (mHealth > (health + gSavedSettings.getF32("UISndHealthReductionThreshold")))

indra/newview/llstatusbar.h

 	static void onClickMediaToggle(void* data);
 
 private:
-	LLTextBox	*mTextHealth;
 	LLTextBox	*mTextTime;
 
 	LLStatGraph *mSGBandwidth;

indra/newview/lltexturectrl.cpp

 		PermissionMask immediate_filter_perm_mask,
 		PermissionMask non_immediate_filter_perm_mask,
 		BOOL can_apply_immediately,
-		const std::string& fallback_image_name);
+		LLUIImagePtr fallback_image_name);
 
 	virtual ~LLFloaterTexturePicker();
 
 	LLTextureCtrl*		mOwner;
 
 	LLUUID				mImageAssetID; // Currently selected texture
-	std::string			mFallbackImageName; // What to show if currently selected texture is null.
+	LLUIImagePtr		mFallbackImage; // What to show if currently selected texture is null.
 
 	LLUUID				mWhiteImageAssetID;
 	LLUUID				mSpecialCurrentImageAssetID;  // Used when the asset id has no corresponding texture in the user's inventory.
 	PermissionMask immediate_filter_perm_mask,
 	PermissionMask non_immediate_filter_perm_mask,
 	BOOL can_apply_immediately,
-	const std::string& fallback_image_name)
+	LLUIImagePtr fallback_image)
 :	LLFloater(LLSD()),
 	mOwner( owner ),
 	mImageAssetID( owner->getImageAssetID() ),
-	mFallbackImageName( fallback_image_name ),
+	mFallbackImage( fallback_image ),
 	mWhiteImageAssetID( gSavedSettings.getString( "UIImgWhiteUUID" ) ),
 	mOriginalImageAssetID(owner->getImageAssetID()),
 	mLabel(label),
 			mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES);
 			mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
 		}
-		else if (!mFallbackImageName.empty())
-		{
-			mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName);
-			mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
-		}
 
 		if (mTentativeLabel)
 		{
 
 			// Pump the priority
 			mTexturep->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
-
-			// Draw Tentative Label over the image
-			if( mOwner->getTentative() && !mViewModel->isDirty() )
-			{
-				mTentativeLabel->setVisible( TRUE );
-				drawChild(mTentativeLabel);
-			}
+		}
+		else if (!mFallbackImage.isNull())
+		{
+			mFallbackImage->draw(interior);
 		}
 		else
 		{
 			// Draw X
 			gl_draw_x(interior, LLColor4::black );
 		}
+
+		// Draw Tentative Label over the image
+		if( mOwner->getTentative() && !mViewModel->isDirty() )
+		{
+			mTentativeLabel->setVisible( TRUE );
+			drawChild(mTentativeLabel);
+		}
 	}
 }
 
 	mShowLoadingPlaceholder( TRUE ),
 	mImageAssetID(p.image_id),
 	mDefaultImageAssetID(p.default_image_id),
-	mDefaultImageName(p.default_image_name)
+	mDefaultImageName(p.default_image_name),
+	mFallbackImage(p.fallback_image)
 {
 	setAllowNoTexture(p.allow_no_texture);
 	setCanApplyImmediately(p.can_apply_immediately);
 			mImmediateFilterPermMask,
 			mNonImmediateFilterPermMask,
 			mCanApplyImmediately,
-			mFallbackImageName);
+			mFallbackImage);
 
 		mFloaterHandle = floaterp->getHandle();
 
 
 		mTexturep = texture;
 	}
-	else if (!mFallbackImageName.empty())
-	{
-		// Show fallback image.
-		mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName);
-		mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
-	}
 	else//mImageAssetID == LLUUID::null
 	{
 		mTexturep = NULL;
 		gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep);
 		mTexturep->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
 	}
+	else if (!mFallbackImage.isNull())
+	{
+		mFallbackImage->draw(interior);
+	}
 	else
 	{
 		gl_rect_2d( interior, LLColor4::grey, TRUE );

indra/newview/lltexturectrl.h

 														// only on DnD or when OK is pressed in the picker
 		Optional<S32>			label_width;
 		Optional<LLUIColor>		border_color;
+		Optional<LLUIImage*>	fallback_image;
 		
 		Optional<LLTextBox::Params>	multiselect_text,
 									caption_text;
 			no_commit_on_selection("no_commit_on_selection", false),
 		    label_width("label_width", -1),
 			border_color("border_color"),
+			fallback_image("fallback_image"),
 			multiselect_text("multiselect_text"),
 			caption_text("caption_text"),
 			border("border")
 
 	const std::string&	getDefaultImageName() const					{ return mDefaultImageName; }
 
-	void			setFallbackImageName( const std::string& name ) { mFallbackImageName = name; }			
-	const std::string& 	getFallbackImageName() const { return mFallbackImageName; }	   
-
 	void			setCaption(const std::string& caption);
 	void			setCanApplyImmediately(BOOL b);
 
 	BOOL doDrop(LLInventoryItem* item);
 
 private:
-	drag_n_drop_callback	 mDragCallback;
-	drag_n_drop_callback	 mDropCallback;
-	commit_callback_t		 mOnCancelCallback;
-	commit_callback_t		 mOnSelectCallback;
+	drag_n_drop_callback	 	mDragCallback;
+	drag_n_drop_callback	 	mDropCallback;
+	commit_callback_t		 	mOnCancelCallback;
+	commit_callback_t		 	mOnSelectCallback;
 	LLPointer<LLViewerFetchedTexture> mTexturep;
-	LLUIColor				 mBorderColor;
-	LLUUID					 mImageItemID;
-	LLUUID					 mImageAssetID;
-	LLUUID					 mDefaultImageAssetID;
-	std::string				 mFallbackImageName;
-	std::string				 mDefaultImageName;
-	LLHandle<LLFloater>			 mFloaterHandle;
-	LLTextBox*				 mTentativeLabel;
-	LLTextBox*				 mCaption;
-	std::string				 mLabel;
-	BOOL					 mAllowNoTexture; // If true, the user can select "none" as an option
-	PermissionMask			 mImmediateFilterPermMask;
-	PermissionMask			 mNonImmediateFilterPermMask;
-	BOOL					 mCanApplyImmediately;
-	BOOL					 mCommitOnSelection;
-	BOOL					 mNeedsRawImageData;
-	LLViewBorder*			 mBorder;
-	BOOL					 mValid;
-	BOOL					 mShowLoadingPlaceholder;
-	std::string				 mLoadingPlaceholderString;
-	S32						 mLabelWidth;
+	LLUIColor				 	mBorderColor;
+	LLUUID					 	mImageItemID;
+	LLUUID					 	mImageAssetID;
+	LLUUID					 	mDefaultImageAssetID;
+	LLUIImagePtr				mFallbackImage;
+	std::string					mDefaultImageName;
+	LLHandle<LLFloater>			mFloaterHandle;
+	LLTextBox*				 	mTentativeLabel;
+	LLTextBox*				 	mCaption;
+	std::string				 	mLabel;
+	BOOL					 	mAllowNoTexture; // If true, the user can select "none" as an option
+	PermissionMask			 	mImmediateFilterPermMask;
+	PermissionMask			 	mNonImmediateFilterPermMask;
+	BOOL					 	mCanApplyImmediately;
+	BOOL					 	mCommitOnSelection;
+	BOOL					 	mNeedsRawImageData;
+	LLViewBorder*			 	mBorder;
+	BOOL					 	mValid;
+	BOOL					 	mShowLoadingPlaceholder;
+	std::string				 	mLoadingPlaceholderString;
+	S32						 	mLabelWidth;
 };
 
 // XUI HACK: When floaters converted, switch this file to lltexturepicker.h/cpp

indra/newview/llvoavatar.cpp

 				 	ankle.mV[VZ] * knee_scale.mV[VZ] -
 				 	foot.mV[VZ] * ankle_scale.mV[VZ];
 
-	mBodySize.mV[VZ] = mPelvisToFoot +
+	LLVector3 new_body_size;
+	new_body_size.mV[VZ] = mPelvisToFoot +
 					   // the sqrt(2) correction below is an approximate
 					   // correction to get to the top of the head
 					   F_SQRT2 * (skull.mV[VZ] * head_scale.mV[VZ]) + 
 					   torso.mV[VZ] * pelvis_scale.mV[VZ]; 
 
 	// TODO -- measure the real depth and width
-	mBodySize.mV[VX] = DEFAULT_AGENT_DEPTH;
-	mBodySize.mV[VY] = DEFAULT_AGENT_WIDTH;
+	new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH;
+	new_body_size.mV[VY] = DEFAULT_AGENT_WIDTH;
+
+	if (new_body_size != mBodySize)
+	{
+		mBodySize = new_body_size;
+		if (isSelf())
+		{	// notify simulator of change in size
+			gAgent.sendAgentSetAppearance();
+		}
+	}
 
 /* debug spam
 	std::cout << "skull = " << skull << std::endl;				// adebug
 				 param;
 				 param = getNextVisualParam())
 			{
-				if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+				if (param->isTweakable())
 				{
 					param->stopAnimating(FALSE);
 				}
 					 param;
 					 param = getNextVisualParam())
 				{
-					if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+					if (param->isTweakable())
 					{
 						param->animate(morph_amt, FALSE);
 					}
 	     param;
 	     param = getNextVisualParam())
 	{
-		if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+		if (param->isTweakable())
 		{
 			LLViewerVisualParam* vparam = dynamic_cast<LLViewerVisualParam*>(param);
 			llassert(vparam);
 		{
 			for( S32 i = 0; i < num_blocks; i++ )
 			{
-				while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) )
+				while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) ) // should not be any of group VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT
 				{
 					param = getNextVisualParam();
 				}
 			}
 		}
 
-		const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE);
+		const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT
 		if (num_blocks != expected_tweakable_count)
 		{
 			llinfos << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << ").  Processing what we can.  object: "