diff options
22 files changed, 177 insertions, 95 deletions
| diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index ee36318107..e379954b4f 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -820,20 +820,29 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)  	// Tab panel  	S32 tab_panel_top;  	S32 tab_panel_bottom; -	if( getTabPosition() == LLTabContainer::TOP ) +	if (!getTabsHidden())   	{ -		S32 tab_height = mIsVertical ? BTN_HEIGHT : tabcntr_tab_height; -		tab_panel_top = getRect().getHeight() - getTopBorderHeight() - (tab_height - tabcntr_button_panel_overlap);	 -		tab_panel_bottom = LLPANEL_BORDER_WIDTH; +		if( getTabPosition() == LLTabContainer::TOP ) +		{ +			S32 tab_height = mIsVertical ? BTN_HEIGHT : tabcntr_tab_height; +			tab_panel_top = getRect().getHeight() - getTopBorderHeight() - (tab_height - tabcntr_button_panel_overlap);	 +			tab_panel_bottom = LLPANEL_BORDER_WIDTH; +		} +		else +		{ +			tab_panel_top = getRect().getHeight() - getTopBorderHeight(); +			tab_panel_bottom = (tabcntr_tab_height - tabcntr_button_panel_overlap);  // Run to the edge, covering up the border +		}  	}  	else  	{ -		tab_panel_top = getRect().getHeight() - getTopBorderHeight(); -		tab_panel_bottom = (tabcntr_tab_height - tabcntr_button_panel_overlap);  // Run to the edge, covering up the border +		//Scip tab button space if they are invisible(EXT - 576) +		tab_panel_top = getRect().getHeight(); +		tab_panel_bottom = LLPANEL_BORDER_WIDTH;  	} -	 +  	LLRect tab_panel_rect; -	if (mIsVertical) +	if (!getTabsHidden() && mIsVertical)  	{  		tab_panel_rect = LLRect(mMinTabWidth + (LLPANEL_BORDER_WIDTH * 2) + tabcntrv_pad,   								getRect().getHeight() - LLPANEL_BORDER_WIDTH, @@ -967,16 +976,21 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)  	LLTabTuple* tuple = new LLTabTuple( this, child, btn, textbox );  	insertTuple( tuple, insertion_point ); -	if (textbox) -	{ -		textbox->setSaveToXML(false); -		addChild( textbox, 0 ); -	} -	if (btn) +	//Don't add button and textbox if tab buttons are invisible(EXT - 576) +	if (!getTabsHidden())  	{ -		btn->setSaveToXML(false); -		addChild( btn, 0 ); +		if (textbox) +		{ +			textbox->setSaveToXML(false); +			addChild( textbox, 0 ); +		} +		if (btn) +		{ +			btn->setSaveToXML(false); +			addChild( btn, 0 ); +		}  	} +  	if (child)  	{  		LLUICtrl::addChild(child, 1); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4e64b8662c..4e2f836606 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6866,7 +6866,7 @@        <key>Value</key>        <integer>0</integer>      </map> -    <key>ShowCrosshairs</key> +    <key>ShowCoordinatesOption</key>      <map>        <key>Comment</key>        <string>Show Coordinates in  Location Input Field</string> @@ -6877,7 +6877,7 @@        <key>Value</key>        <integer>0</integer>      </map> -    <key>ShowCoordinatesOption</key> +    <key>ShowCrosshairs</key>      <map>        <key>Comment</key>        <string>Display crosshairs when in mouselook mode</string> diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 9f71def63e..5ca630f8d1 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -263,13 +263,6 @@ private:  	// Region  	//--------------------------------------------------------------------  public: -	enum ELocationFormat -	{ -		LOCATION_FORMAT_NORMAL, -		LOCATION_FORMAT_LANDMARK, -		LOCATION_FORMAT_WITHOUT_SIM, -		LOCATION_FORMAT_FULL, -	};  	void			setRegion(LLViewerRegion *regionp);  	LLViewerRegion	*getRegion() const;  	LLHost			getRegionHost() const; diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 93d88bf3df..1a69f1d975 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -89,7 +89,7 @@ std::string LLAgentUI::buildSLURL(const bool escaped /*= true*/)  	return slurl;  } -BOOL LLAgentUI::buildLocationString(std::string& str, LLAgent::ELocationFormat fmt,const LLVector3& agent_pos_region) +BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region)  {  	LLViewerRegion* region = gAgent.getRegion();  	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); @@ -128,14 +128,14 @@ BOOL LLAgentUI::buildLocationString(std::string& str, LLAgent::ELocationFormat f  		// the parcel doesn't have a name  		switch (fmt)  		{ -		case LLAgent::LOCATION_FORMAT_LANDMARK: +		case LOCATION_FORMAT_LANDMARK:  			buffer = llformat("%.100s", region_name.c_str());  			break; -		case LLAgent::LOCATION_FORMAT_NORMAL: +		case LOCATION_FORMAT_NORMAL:  			buffer = llformat("%s", region_name.c_str());  			break; -		case LLAgent::LOCATION_FORMAT_WITHOUT_SIM: -		case LLAgent::LOCATION_FORMAT_FULL: +		case LOCATION_FORMAT_WITHOUT_SIM: +		case LOCATION_FORMAT_FULL:  			buffer = llformat("%s (%d, %d, %d)",  				region_name.c_str(),  				pos_x, pos_y, pos_z); @@ -147,19 +147,19 @@ BOOL LLAgentUI::buildLocationString(std::string& str, LLAgent::ELocationFormat f  		// the parcel has a name, so include it in the landmark name  		switch (fmt)  		{ -		case LLAgent::LOCATION_FORMAT_LANDMARK: +		case LOCATION_FORMAT_LANDMARK:  			buffer = llformat("%.100s", parcel_name.c_str());  			break; -		case LLAgent::LOCATION_FORMAT_NORMAL: +		case LOCATION_FORMAT_NORMAL:  			buffer = llformat("%s, %s", region_name.c_str(), parcel_name.c_str());  			break; -		case LLAgent::LOCATION_FORMAT_WITHOUT_SIM: +		case LOCATION_FORMAT_WITHOUT_SIM:  			buffer = llformat("%s, %s (%d, %d, %d)",  				region_name.c_str(),  				parcel_name.c_str(),  				pos_x, pos_y, pos_z);  			break; -		case LLAgent::LOCATION_FORMAT_FULL: +		case LOCATION_FORMAT_FULL:  			std::string sim_access_string = region->getSimAccessString();  			buffer = llformat("%s, %s (%d, %d, %d)%s%s",  				region_name.c_str(), @@ -173,7 +173,7 @@ BOOL LLAgentUI::buildLocationString(std::string& str, LLAgent::ELocationFormat f  	str = buffer;  	return TRUE;  } -BOOL LLAgentUI::buildLocationString(std::string& str, LLAgent::ELocationFormat fmt) +BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt)  {  	return buildLocationString(str,fmt, gAgent.getPositionAgent());  } diff --git a/indra/newview/llagentui.h b/indra/newview/llagentui.h index c3bc58d791..47ecb04547 100644 --- a/indra/newview/llagentui.h +++ b/indra/newview/llagentui.h @@ -33,19 +33,25 @@  #ifndef LLAGENTUI_H  #define LLAGENTUI_H -#include "llagent.h" -  class LLAgentUI  {  public: +	enum ELocationFormat +	{ +		LOCATION_FORMAT_NORMAL, +		LOCATION_FORMAT_LANDMARK, +		LOCATION_FORMAT_WITHOUT_SIM, +		LOCATION_FORMAT_FULL, +	}; +  	static void buildName(std::string& name);  	static void buildFullname(std::string &name);  	static std::string buildSLURL(const bool escaped = true);  	//build location string using the current position of gAgent. -	static BOOL buildLocationString(std::string& str, LLAgent::ELocationFormat fmt = LLAgent::LOCATION_FORMAT_LANDMARK); +	static BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK);  	//build location string using a region position of the avatar.  -	static BOOL buildLocationString(std::string& str, LLAgent::ELocationFormat fmt,const LLVector3& agent_pos_region); +	static BOOL buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region);  };  #endif //LLAGENTUI_H diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index dd73ebbd8f..b5c36b1083 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -968,7 +968,7 @@ void LLSnapshotLivePreview::saveTexture()  	{  		LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE);  		std::string pos_string; -		LLAgentUI::buildLocationString(pos_string, LLAgent::LOCATION_FORMAT_FULL); +		LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL);  		std::string who_took_it;  		LLAgentUI::buildFullname(who_took_it);  		LLAssetStorage::LLStoreAssetCallback callback = NULL; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 404751a44a..5272bc2165 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -162,6 +162,14 @@ bool LLIMModel::newSession(LLUUID session_id, std::string name, EInstantMessage  } +bool LLIMModel::clearSession(LLUUID session_id) +{ +	if (sSessionsMap.find(session_id) == sSessionsMap.end()) return false; +	delete (sSessionsMap[session_id]); +	sSessionsMap.erase(session_id); +	return true; +} +  std::list<LLSD> LLIMModel::getMessages(LLUUID session_id, int start_index)  {  	std::list<LLSD> return_list; @@ -1438,7 +1446,8 @@ LLUUID LLIMMgr::addSession(  }  // This removes the panel referenced by the uuid, and then restores -// internal consistency. The internal pointer is not deleted. +// internal consistency. The internal pointer is not deleted? Did you mean +// a pointer to the corresponding LLIMSession? Session data is cleared now.  void LLIMMgr::removeSession(const LLUUID& session_id)  {  	LLFloaterIMPanel* floater = findFloaterBySession(session_id); @@ -1452,6 +1461,12 @@ void LLIMMgr::removeSession(const LLUUID& session_id)  		clearPendingAgentListUpdates(session_id);  	}  	notifyObserverSessionRemoved(session_id); + +	//if we don't clear session data on removing the session +	//we can't use LLBottomTray as observer of session creation/delettion and  +	//creating chiclets only on session created even, we need to handle chiclets creation +	//the same way as LLFloaterIMPanels were managed. +	LLIMModel::getInstance()->clearSession(session_id);  }  void LLIMMgr::inviteToSession( diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 777d68978e..ce6f0394dd 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -70,6 +70,7 @@ public:  	boost::signals2::connection addChangedCallback( boost::function<void (const LLSD& data)> cb );  	bool newSession(LLUUID session_id, std::string name, EInstantMessage type, LLUUID other_participant_id); +	bool clearSession(LLUUID session_id);  	std::list<LLSD> getMessages(LLUUID session_id, int start_index = 0);  	bool addMessage(LLUUID session_id, std::string from, LLUUID other_participant_id, std::string utf8_text);  	bool addToHistory(LLUUID session_id, std::string from, std::string utf8_text);  diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 2c56a70ced..df9aa32d1b 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -218,8 +218,8 @@ void LLLandmarkActions::createLandmarkHere()  {  	std::string landmark_name, landmark_desc; -	LLAgentUI::buildLocationString(landmark_name, LLAgent::LOCATION_FORMAT_LANDMARK); -	LLAgentUI::buildLocationString(landmark_desc, LLAgent::LOCATION_FORMAT_FULL); +	LLAgentUI::buildLocationString(landmark_name, LLAgentUI::LOCATION_FORMAT_LANDMARK); +	LLAgentUI::buildLocationString(landmark_desc, LLAgentUI::LOCATION_FORMAT_FULL);  	LLUUID folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);  	createLandmarkHere(landmark_name, landmark_desc, folder_id); diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 1542c7483a..a8ec826e88 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -44,7 +44,6 @@  #include "lluictrlfactory.h"  // newview includes -#include "llagent.h"  #include "llinventorymodel.h"  #include "lllandmarkactions.h"  #include "lllandmarklist.h" @@ -494,8 +493,8 @@ void LLLocationInputCtrl::refreshLocation()  	// Update location field.  	std::string location_name; -	LLAgent::ELocationFormat format =  (gSavedSettings.getBOOL("ShowCoordinatesOption") ?  -			LLAgent::LOCATION_FORMAT_WITHOUT_SIM: LLAgent::LOCATION_FORMAT_NORMAL); +	LLAgentUI::ELocationFormat format =  (gSavedSettings.getBOOL("ShowCoordinatesOption") ?  +			LLAgentUI::LOCATION_FORMAT_WITHOUT_SIM: LLAgentUI::LOCATION_FORMAT_NORMAL);  	if (!LLAgentUI::buildLocationString(location_name, format)) location_name = "Unknown";  	setText(location_name); diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 46bbb382a5..e40568a0cb 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -349,7 +349,7 @@ void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos)  	 * At this moment gAgent.getPositionAgent() contains previous coordinates.  	 * according to EXT-65 agent position is being reseted on each frame.    	 */ -	LLAgentUI::buildLocationString(location, LLAgent::LOCATION_FORMAT_WITHOUT_SIM, +	LLAgentUI::buildLocationString(location, LLAgentUI::LOCATION_FORMAT_WITHOUT_SIM,  			gAgent.getPosAgentFromGlobal(global_agent_pos));  	//Touch it, if it is at list already, add new location otherwise @@ -411,7 +411,7 @@ void LLNavigationBar::rebuildTeleportHistoryMenu()  		else  			type = LLTeleportHistoryMenuItem::TYPE_CURRENT; -		LLTeleportHistoryMenuItem::Params item_params(type, hist_items[i].mTitle); +		LLTeleportHistoryMenuItem::Params item_params(type, hist_items[i].getTitle());  		item_params.on_click.function(boost::bind(&LLNavigationBar::onTeleportHistoryMenuItemClicked, this, i));  		mTeleportHistoryMenu->addChild(LLUICtrlFactory::create<LLTeleportHistoryMenuItem>(item_params));  	} @@ -575,6 +575,11 @@ void LLNavigationBar::showNavigationPanel(BOOL visible)  			setRect(nbRect);  		}  	} + +	if(LLSideTray::instanceCreated()) +	{ +		LLSideTray::getInstance()->resetPanelRect(); +	}  }  void LLNavigationBar::showFavoritesPanel(BOOL visible) @@ -636,4 +641,8 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible)  	}  	fb->setVisible(visible); +	if(LLSideTray::instanceCreated()) +	{ +		LLSideTray::getInstance()->resetPanelRect(); +	}  } diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 2e87f0b65b..4cbb018ce9 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -180,6 +180,8 @@ BOOL LLPanelGroup::postBuild()  	if(panel_roles)		mTabs.push_back(panel_roles);  	if(panel_notices)	mTabs.push_back(panel_notices);  	if(panel_land)		mTabs.push_back(panel_land); + +	panel_general->setupCtrls(this);  	return TRUE;  } @@ -194,7 +196,7 @@ void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent )  	if(button)  	{  		btn_rect = button->getRect(); -		btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight()); +		btn_rect.setLeftTopAndSize( btn_rect.mLeft, btn_rect.getHeight() + 2, btn_rect.getWidth(), btn_rect.getHeight());  		button->setRect(btn_rect);  	} @@ -202,7 +204,7 @@ void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent )  	if(button)  	{  		btn_rect = button->getRect(); -		btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight()); +		btn_rect.setLeftTopAndSize( btn_rect.mLeft, btn_rect.getHeight() + 2, btn_rect.getWidth(), btn_rect.getHeight());  		button->setRect(btn_rect);  	} @@ -211,7 +213,7 @@ void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent )  	if(button)  	{  		btn_rect = button->getRect(); -		btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight()); +		btn_rect.setLeftTopAndSize( btn_rect.mLeft, btn_rect.getHeight() + 2, btn_rect.getWidth(), btn_rect.getHeight());  		button->setRect(btn_rect);  	}  } diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index e5e1d1b6ad..6db6738d18 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -160,6 +160,8 @@ public:  	const LLUUID& getGroupID() const { return mGroupID;} +	virtual void setupCtrls	(LLPanel* parent) {}; +  protected:  	LLUUID	mGroupID;  	std::string	mHelpText; diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 2d06dcdb36..73ea990b3f 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -99,13 +99,6 @@ BOOL LLPanelGroupGeneral::postBuild()  	// General info  	mGroupNameEditor = getChild<LLLineEditor>("group_name_editor", recurse); -	mInsignia = getChild<LLTextureCtrl>("insignia", recurse); -	if (mInsignia) -	{ -		mInsignia->setCommitCallback(onCommitAny, this); -		mDefaultIconID = mInsignia->getImageAssetID(); -	} -	  	mEditCharter = getChild<LLTextEditor>("charter", recurse);  	if(mEditCharter)  	{ @@ -115,7 +108,6 @@ BOOL LLPanelGroupGeneral::postBuild()  	} -	mFounderName = getChild<LLNameBox>("founder_name");  	mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);  	if (mListVisibleMembers) @@ -215,6 +207,17 @@ BOOL LLPanelGroupGeneral::postBuild()  	return LLPanelGroupTab::postBuild();  } +void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group) +{ +	mInsignia = panel_group->getChild<LLTextureCtrl>("insignia"); +	if (mInsignia) +	{ +		mInsignia->setCommitCallback(onCommitAny, this); +		mDefaultIconID = mInsignia->getImageAssetID(); +	} +	mFounderName = panel_group->getChild<LLNameBox>("founder_name"); +} +  // static  void LLPanelGroupGeneral::onFocusEdit(LLFocusableElement* ctrl, void* data)  { @@ -848,7 +851,6 @@ void LLPanelGroupGeneral::reset()  {  	mFounderName->setVisible(false); -	getChild<LLUICtrl>("prepend_founded_by")->setVisible(false);  	mCtrlReceiveNotices->set(false); @@ -876,7 +878,8 @@ void LLPanelGroupGeneral::reset()  	mGroupNameEditor->setVisible(true);  	mComboActiveTitle->setVisible(false); -	mInsignia->setImageAssetID(mDefaultIconID); + +	mInsignia->setImageAssetID(LLUUID::null);  	{  		std::string empty_str = ""; @@ -968,7 +971,8 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id)  	mComboActiveTitle = getChild<LLComboBox>("active_title");  	mFounderName->setVisible(true); -	getChild<LLUICtrl>("prepend_founded_by")->setVisible(true); + +	mInsignia->setImageAssetID(LLUUID::null);  	resetDirty(); diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 21d526f43d..b828480a12 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -67,6 +67,8 @@ public:  	virtual void setGroupID(const LLUUID& id); +	virtual void setupCtrls	(LLPanel* parent); +  private:  	void	reset(); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 5e5608460c..3ac9076e85 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -40,6 +40,7 @@  #include "llaccordionctrl.h"  #include "llfocusmgr.h"  #include "llrootview.h" +#include "llnavigationbar.h"  #include "llaccordionctrltab.h" @@ -642,10 +643,30 @@ LLPanel*	LLSideTray::showPanel		(const std::string& panel_name, const LLSD& para  }  static const S32	fake_offset = 132; -static const S32	fake_top_offset = 78; +static const S32	fake_top_offset = 18; + +void LLSideTray::resetPanelRect	() +{ +	LLNavigationBar* nav_bar = LLNavigationBar::getInstance(); +	LLRect nav_rect = nav_bar->getRect(); +	const LLRect& parent_rect = gViewerWindow->getRootView()->getRect(); + +	static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());	 + +	S32 panel_width = sidetray_params.default_button_width+sidetray_params.default_button_margin; +	if(!mCollapsed) +		panel_width+=mMaxBarWidth; + +	S32 panel_height = parent_rect.getHeight()-fake_top_offset; + +	reshape(panel_width,panel_height); +}  void	LLSideTray::setPanelRect	()  { +	LLNavigationBar* nav_bar = LLNavigationBar::getInstance(); +	LLRect nav_rect = nav_bar->getRect(); +	  	static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());	  	const LLRect& parent_rect = gViewerWindow->getRootView()->getRect(); @@ -654,9 +675,11 @@ void	LLSideTray::setPanelRect	()  	if(!mCollapsed)  		panel_width+=mMaxBarWidth; -	S32 panel_height = parent_rect.getHeight() - fake_top_offset - LLBottomTray::getInstance()->getRect().getHeight(); +	S32 panel_height = parent_rect.getHeight()-fake_top_offset - nav_rect.getHeight(); +	S32 panel_top = parent_rect.mTop-fake_top_offset - nav_rect.getHeight(); +  	LLRect panel_rect; -	panel_rect.setLeftTopAndSize( parent_rect.mRight-panel_width, parent_rect.mTop-fake_top_offset, panel_width, panel_height); +	panel_rect.setLeftTopAndSize( parent_rect.mRight-panel_width, panel_top, panel_width, panel_height);  	setRect(panel_rect);  } diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index b691a42db1..13acbbb659 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -207,6 +207,9 @@ public:  	void		reshape			(S32 width, S32 height, BOOL called_from_parent = TRUE);  	S32			getTrayWidth(); +	void		resetPanelRect	(); +	 +  protected:  	LLSideTrayTab* getTab		(const std::string& name); @@ -217,9 +220,10 @@ protected:  	void		toggleTabButton	(LLSideTrayTab* tab); -  	void		setPanelRect	(); +	 +  private:  	// Implementation of LLDestroyClass<LLSideTray>  	static void destroyClass() diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index 5235dc9358..bc886d5743 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -40,6 +40,7 @@  #include "llagent.h"  #include "llslurl.h"  #include "llurlsimstring.h" +#include "llviewercontrol.h"        // for gSavedSettings  #include "llviewerparcelmgr.h"  #include "llviewerregion.h"  #include "llworldmap.h" @@ -49,20 +50,9 @@  // LLTeleportHistoryItem  ////////////////////////////////////////////////////////////////////////////// -LLTeleportHistoryItem::LLTeleportHistoryItem(const LLSD& val) +const std::string& LLTeleportHistoryItem::getTitle() const  { -	mTitle = val["title"].asString(); -	mGlobalPos.setValue(val["global_pos"]); -} - -LLSD LLTeleportHistoryItem::toLLSD() const -{ -	LLSD val; - -	val["title"]		= mTitle; -	val["global_pos"]	= mGlobalPos.getValue(); -	 -	return val; +	return gSavedSettings.getBOOL("ShowCoordinatesOption") ? mFullTitle : mTitle;  }  ////////////////////////////////////////////////////////////////////////////// @@ -149,7 +139,9 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)  			llwarns << "Invalid current item. (this should not happen)" << llendl;  			return;  		} -		mItems[mCurrentItem].mTitle = getCurrentLocationTitle(); +		LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos); +		mItems[mCurrentItem].mFullTitle = getCurrentLocationTitle(true, new_pos_local); +		mItems[mCurrentItem].mTitle = getCurrentLocationTitle(false, new_pos_local);  		mItems[mCurrentItem].mGlobalPos	= new_pos;  		mItems[mCurrentItem].mRegionID = gAgent.getRegion()->getRegionID();  	} @@ -182,10 +174,12 @@ void LLTeleportHistory::purgeItems()  }  // static -std::string LLTeleportHistory::getCurrentLocationTitle() +std::string LLTeleportHistory::getCurrentLocationTitle(bool full, const LLVector3& local_pos_override)  {  	std::string location_name; -	if (!LLAgentUI::buildLocationString(location_name, LLAgent::LOCATION_FORMAT_NORMAL)) location_name = "Unknown"; +	LLAgentUI::ELocationFormat fmt = full ? LLAgentUI::LOCATION_FORMAT_WITHOUT_SIM : LLAgentUI::LOCATION_FORMAT_NORMAL; + +	if (!LLAgentUI::buildLocationString(location_name, fmt, local_pos_override)) location_name = "Unknown";  	return location_name;  } diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h index 060534635d..9f5563ed0b 100644 --- a/indra/newview/llteleporthistory.h +++ b/indra/newview/llteleporthistory.h @@ -55,11 +55,14 @@ public:  	LLTeleportHistoryItem(std::string title, LLVector3d global_pos)  		: mTitle(title), mGlobalPos(global_pos)  	{} -	 -	LLTeleportHistoryItem(const LLSD& val); -	LLSD toLLSD() const; +	/** +	 * @return title formatted according to the current value of the ShowCoordinatesOption setting. +	 */ +	const std::string& getTitle() const; +	  	std::string	mTitle;		// human-readable location title +	std::string mFullTitle; // human-readable location title including coordinates  	LLVector3d	mGlobalPos; // global position  	LLUUID		mRegionID;	// region ID for getting the region info   }; @@ -168,8 +171,15 @@ private:  	 * Invokes the "history changed" callback(s).  	 */  	void					onHistoryChanged(); -	 -	static std::string		getCurrentLocationTitle(); + +	/** +	 * Format current agent location in a human-readable manner. +	 *  +	 * @param full whether to include coordinates +	 * @param local_pos_override hack: see description of updateCurrentLocation() +	 * @return +	 */ +	static std::string		getCurrentLocationTitle(bool full, const LLVector3& local_pos_override);  	/**  	 * Actually, the teleport history. diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 3c7a8d757b..1b47fa43c7 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1197,6 +1197,10 @@ void LLTextureCtrl::draw()  		mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName);  		mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);  	} +	else//mImageAssetID == LLUUID::null +	{ +		mTexturep = NULL; +	}  	// Border  	LLRect border( 0, getRect().getHeight(), getRect().getWidth(), BTN_HEIGHT_SMALL ); diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index 2243df951e..03e2d35b9f 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -2,7 +2,7 @@  <panel   border="true"   follows="all" - height="470" + height="445"   label="General"   class="panel_group_general"   layout="topleft" @@ -43,14 +43,14 @@ Hover your mouse over the options for more help.      <text_editor       type="string"       follows="left|top" -     left="95" +     left="5"       height="75"       hide_scrollbar="true"       layout="topleft"       max_length="511"       name="charter" -     top="30" -     width="170" +     top="5" +     width="260"       word_wrap="true">          Group Charter      </text_editor> 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 65d1e3c3a7..2de41a9ee6 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 @@ -44,10 +44,10 @@       height="113"       label=""       layout="topleft" -     left_delta="-10" +	 left="10"       name="insignia"       tool_tip="Click to choose a picture" -     top_pad="5" +     top_pad="15"       width="100" />      <text       type="string" @@ -99,8 +99,8 @@       left="5"       visible="false"       width="65" /> -      <accordion layout="topleft" left="2" width="296" top="135" height="600" follows="all" name="group_accordion"> -		<accordion_tab min_height="515" title="Group General" name="group_general_tab"> +      <accordion layout="topleft" left="2" width="296" top="135" height="500" follows="all" name="group_accordion"> +		<accordion_tab min_height="445" title="Group General" name="group_general_tab">          	<panel class="panel_group_general" filename="panel_group_general.xml" name="group_general_tab_panel"/>  		</accordion_tab>  		<accordion_tab min_height="380" title="Group Roles" name="group_roles_tab" expanded="False" can_resize="false"> | 
