diff options
Diffstat (limited to 'indra')
28 files changed, 318 insertions, 114 deletions
| diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 4944ed4fe7..14b77925f2 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -771,12 +771,7 @@ void LLButton::draw()  			center_x++;  		} -		S32 text_width_delta = overlay_width + 1; -		// if image paddings set, they should participate in scaling process -		S32 image_size_delta = mImageOverlayTopPad + mImageOverlayBottomPad; -		overlay_width = overlay_width - image_size_delta; -		overlay_height = overlay_height - image_size_delta; - +		center_y += (mImageOverlayBottomPad - mImageOverlayTopPad);  		// fade out overlay images on disabled buttons  		LLColor4 overlay_color = mImageOverlayColor.get();  		if (!enabled) @@ -788,10 +783,9 @@ void LLButton::draw()  		switch(mImageOverlayAlignment)  		{  		case LLFontGL::LEFT: -			text_left += overlay_width + mImageOverlayRightPad + 1; -			text_width -= text_width_delta; +			text_left += overlay_width + 1;  			mImageOverlay->draw( -				mLeftHPad,  +				mImageOverlayLeftPad,  				center_y - (overlay_height / 2),   				overlay_width,   				overlay_height,  @@ -806,10 +800,9 @@ void LLButton::draw()  				overlay_color);  			break;  		case LLFontGL::RIGHT: -			text_right -= overlay_width + mImageOverlayLeftPad+ 1; -			text_width -= text_width_delta; +			text_right -= overlay_width + 1;  			mImageOverlay->draw( -				getRect().getWidth() - mRightHPad - overlay_width,  +				getRect().getWidth() - mImageOverlayRightPad - overlay_width,  				center_y - (overlay_height / 2),   				overlay_width,   				overlay_height,  diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 7fa9a88059..d18abbfb2f 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3941,7 +3941,6 @@ BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu)  	item = LLUICtrlFactory::create<LLContextMenuBranch>(p);  	LLMenuGL::sMenuContainer->addChild(item->getBranch()); -	item->setFont( LLFontGL::getFontSansSerif() );  	return append( item );  } diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 6be76605fd..19408989a5 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -35,7 +35,6 @@  #include "lltabcontainer.h"  #include "llfocusmgr.h" -#include "llbutton.h"  #include "lllocalcliprect.h"  #include "llrect.h"  #include "llresizehandle.h" @@ -96,6 +95,90 @@ public:  //---------------------------------------------------------------------------- +//============================================================================ +/* + * @file lltabcontainer.cpp + * @brief class implements LLButton with LLIconCtrl on it + */ +class LLCustomButtonIconCtrl : public LLButton +{ +public: +	struct Params +	: public LLInitParam::Block<Params, LLButton::Params> +	{ +		// LEFT, RIGHT, TOP, BOTTOM paddings of LLIconCtrl in this class has same value +		Optional<S32>					icon_ctrl_pad; + +		Params(): +		icon_ctrl_pad("icon_ctrl_pad", 1) +		{} +	}; + +protected: +	friend class LLUICtrlFactory; +	LLCustomButtonIconCtrl(const Params& p): +		LLButton(p), +		mIcon(NULL), +		mIconCtrlPad(p.icon_ctrl_pad) +		{} + +public: + +	void updateLayout() +	{ +		LLRect button_rect = getRect(); +		LLRect icon_rect = mIcon->getRect(); + +		S32 icon_size = button_rect.getHeight() - 2*mIconCtrlPad; + +		switch(mIconAlignment) +		{ +		case LLFontGL::LEFT: +			icon_rect.setLeftTopAndSize(button_rect.mLeft + mIconCtrlPad, button_rect.mTop - mIconCtrlPad,  +				icon_size, icon_size); +			setLeftHPad(icon_size + mIconCtrlPad * 2); +			break; +		case LLFontGL::HCENTER: +			icon_rect.setLeftTopAndSize(button_rect.mRight - (button_rect.getWidth() + mIconCtrlPad - icon_size)/2, button_rect.mTop - mIconCtrlPad,  +				icon_size, icon_size); +			setRightHPad(icon_size + mIconCtrlPad * 2); +			break; +		case LLFontGL::RIGHT: +			icon_rect.setLeftTopAndSize(button_rect.mRight - mIconCtrlPad - icon_size, button_rect.mTop - mIconCtrlPad,  +				icon_size, icon_size); +			setRightHPad(icon_size + mIconCtrlPad * 2); +			break; +		default: +			break; +		} +		mIcon->setRect(icon_rect); +	} + +	void setIcon(LLIconCtrl* icon, LLFontGL::HAlign alignment = LLFontGL::LEFT) +	{ +		if(icon) +		{ +			if(mIcon) +			{ +				removeChild(mIcon); +				mIcon->die(); +			} +			mIcon = icon; +			mIconAlignment = alignment; + +			addChild(mIcon); +			updateLayout(); +		} +	} + + +private: +	LLIconCtrl* mIcon; +	LLFontGL::HAlign mIconAlignment; +	S32 mIconCtrlPad; +}; +//============================================================================ +  struct LLPlaceHolderPanel : public LLPanel  {  	// create dummy param block to register with "placeholder" nane @@ -127,7 +210,9 @@ LLTabContainer::Params::Params()  	tab_padding_right("tab_padding_right"),  	first_tab("first_tab"),  	middle_tab("middle_tab"), -	last_tab("last_tab") +	last_tab("last_tab"), +	use_custom_icon_ctrl("use_custom_icon_ctrl", false), +	tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0)  {  	name(std::string("tab_container"));  	mouse_opaque = false; @@ -162,7 +247,9 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)  	mFont(p.font),  	mFirstTabParams(p.first_tab),  	mMiddleTabParams(p.middle_tab), -	mLastTabParams(p.last_tab) +	mLastTabParams(p.last_tab), +	mCustomIconCtrlUsed(p.use_custom_icon_ctrl), +	mTabIconCtrlPad(p.tab_icon_ctrl_pad)  {  	static LLUICachedControl<S32> tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0); @@ -905,6 +992,11 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)  	LLTextBox* textbox = NULL;  	LLButton* btn = NULL; +	LLCustomButtonIconCtrl::Params custom_btn_params; +	{ +		custom_btn_params.icon_ctrl_pad(mTabIconCtrlPad); +	} +	LLButton::Params normal_btn_params;  	if (placeholder)  	{ @@ -924,7 +1016,9 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)  	{  		if (mIsVertical)  		{ -			LLButton::Params p; +			LLButton::Params& p = (mCustomIconCtrlUsed)? +					custom_btn_params:normal_btn_params; +  			p.name(std::string("vert tab button"));  			p.rect(btn_rect);  			p.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT); @@ -942,11 +1036,22 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)  			{  				p.pad_left(indent);  			} -			btn = LLUICtrlFactory::create<LLButton>(p); +			 +			 +			if(mCustomIconCtrlUsed) +			{ +				btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params); +				 +			} +			else +			{ +				btn = LLUICtrlFactory::create<LLButton>(p); +			}  		}  		else  		{ -			LLButton::Params p; +			LLButton::Params& p = (mCustomIconCtrlUsed)? +					custom_btn_params:normal_btn_params;  			p.name(std::string(child->getName()) + " tab");  			p.rect(btn_rect);  			p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child)); @@ -980,7 +1085,14 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)  				p.follows.flags = p.follows.flags() | FOLLOWS_BOTTOM;  			} -++			btn = LLUICtrlFactory::create<LLButton>(p); +			if(mCustomIconCtrlUsed) +			{ +				btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params); +			} +			else +			{ +				btn = LLUICtrlFactory::create<LLButton>(p); +			}  		}  	} @@ -1484,7 +1596,7 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L  	if( tuple )  	{  		tuple->mButton->setImageOverlay(image_name, LLFontGL::LEFT, color); -		reshape_tuple(tuple); +		reshapeTuple(tuple);  	}  } @@ -1494,11 +1606,26 @@ void LLTabContainer::setTabImage(LLPanel* child, const LLUUID& image_id, const L  	if( tuple )  	{  		tuple->mButton->setImageOverlay(image_id, LLFontGL::LEFT, color); -		reshape_tuple(tuple); +		reshapeTuple(tuple); +	} +} + +void LLTabContainer::setTabImage(LLPanel* child, LLIconCtrl* icon) +{ +	LLTabTuple* tuple = getTabByPanel(child); +	LLCustomButtonIconCtrl* button; + +	if(tuple) +	{ +		button = dynamic_cast<LLCustomButtonIconCtrl*>(tuple->mButton); +		if(button) +		{ +			button->setIcon(icon); +		}  	}  } -void LLTabContainer::reshape_tuple(LLTabTuple* tuple) +void LLTabContainer::reshapeTuple(LLTabTuple* tuple)  {  	static LLUICachedControl<S32> tab_padding ("UITabPadding", 0);  	static LLUICachedControl<S32> image_left_padding ("UIButtonImageLeftPadding", 4); diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 2a55877d3c..4b5d45fb73 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -36,6 +36,8 @@  #include "llpanel.h"  #include "lltextbox.h"  #include "llframetimer.h" +#include "lliconctrl.h" +#include "llbutton.h"  class LLTabTuple; @@ -90,6 +92,16 @@ public:  											middle_tab,  											last_tab; +		/** +		 * Use LLCustomButtonIconCtrl or LLButton in LLTabTuple +		 */ +		Optional<bool>						use_custom_icon_ctrl; + +		/** +		 *  Paddings for LLIconCtrl in case of LLCustomButtonIconCtrl usage(use_custom_icon_ctrl = true) +		 */ +		Optional<S32>						tab_icon_ctrl_pad; +  		Params();  	}; @@ -173,6 +185,7 @@ public:  	void		setTabPanelFlashing(LLPanel* child, BOOL state);  	void 		setTabImage(LLPanel* child, std::string img_name, const LLColor4& color = LLColor4::white);  	void 		setTabImage(LLPanel* child, const LLUUID& img_id, const LLColor4& color = LLColor4::white); +	void		setTabImage(LLPanel* child, LLIconCtrl* icon);  	void		setTitle( const std::string& title );  	const std::string getPanelTitle(S32 index); @@ -228,7 +241,7 @@ private:  	// updates tab button images given the tuple, tab position and the corresponding params  	void update_images(LLTabTuple* tuple, TabParams params, LLTabContainer::TabPosition pos); -	void reshape_tuple(LLTabTuple* tuple); +	void reshapeTuple(LLTabTuple* tuple);  	// Variables @@ -278,6 +291,9 @@ private:  	TabParams						mFirstTabParams;  	TabParams						mMiddleTabParams;  	TabParams						mLastTabParams; + +	bool							mCustomIconCtrlUsed; +	S32								mTabIconCtrlPad;  };  #endif  // LL_TABCONTAINER_H diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 3fdb48b3ca..ac5a0376fc 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -242,7 +242,8 @@ LLTextEditor::Params::Params()  	handle_edit_keys_directly("handle_edit_keys_directly", false),  	show_line_numbers("show_line_numbers", false),  	default_color("default_color"), -    commit_on_focus_lost("commit_on_focus_lost", false) +    commit_on_focus_lost("commit_on_focus_lost", false), +	show_context_menu("show_context_menu")  {}  LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : @@ -258,7 +259,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :  	mMouseDownX(0),  	mMouseDownY(0),  	mTabsToNextField(p.ignore_tab), -	mContextMenu(NULL) +	mContextMenu(NULL), +	mShowContextMenu(p.show_context_menu)  {  	mDefaultFont = p.font; @@ -720,7 +722,7 @@ BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)  	}  	if (!LLTextBase::handleRightMouseDown(x, y, mask))  	{ -		if(getMouseOpaque()) +		if(getChowContextMenu())  		{  			showContextMenu(x, y);  		} diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index a136f9ccce..d96198d9ce 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -68,7 +68,8 @@ public:  								ignore_tab,  								handle_edit_keys_directly,  								show_line_numbers, -								commit_on_focus_lost; +								commit_on_focus_lost, +								show_context_menu;  		//colors  		Optional<LLUIColor>		default_color; @@ -200,6 +201,9 @@ public:  	const LLTextSegmentPtr	getPreviousSegment() const;  	void getSelectedSegments(segment_vec_t& segments) const; +	void			setShowContextMenu(bool show) { mShowContextMenu = show; } +	bool			getChowContextMenu() const { return mShowContextMenu; } +  protected:  	void			showContextMenu(S32 x, S32 y);  	void			drawPreeditMarker(); @@ -319,6 +323,7 @@ private:  	BOOL			mTakesFocus;  	BOOL			mAllowEmbeddedItems; +	bool			mShowContextMenu;  	LLUUID			mSourceID; diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index bd4fae6ab6..53ae001923 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -750,18 +750,26 @@ void LLCallFloater::reset(const LLVoiceChannel::EState& new_state)  	mParticipants = NULL;  	mAvatarList->clear(); -	// "loading" is shown in parcel with disabled voice only when state is "ringing" -	// to avoid showing it in nearby chat vcp all the time- "no_one_near" is now shown there (EXT-4648) -	bool show_loading = LLVoiceChannel::STATE_RINGING == new_state; -	if(!show_loading && !LLViewerParcelMgr::getInstance()->allowAgentVoice() && mVoiceType ==  VC_LOCAL_CHAT) +	// These ifs were added instead of simply showing "loading" to make VCP work correctly in parcels +	// with disabled voice (EXT-4648 and EXT-4649) +	if (!LLViewerParcelMgr::getInstance()->allowAgentVoice() && LLVoiceChannel::STATE_HUNG_UP == new_state)  	{ +		// hides "Leave Call" when call is ended in parcel with disabled voice- hiding usually happens in +		// updateSession() which won't be called here because connect to nearby voice never happens  +		childSetVisible("leave_call_btn_panel", false); +		// setting title to nearby chat an "no one near..." text- because in region with disabled +		// voice we won't have chance to really connect to nearby, so VCP is changed here manually +		setTitle(getString("title_nearby"));  		mAvatarList->setNoItemsCommentText(getString("no_one_near"));  	} -	else +	// "loading" is shown  only when state is "ringing" to avoid showing it in nearby chat vcp +	// of parcels with disabled voice all the time- "no_one_near" is now shown there (EXT-4648) +	else if (new_state == LLVoiceChannel::STATE_RINGING)  	{  		// update floater to show Loading while waiting for data.  		mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData"));  	} +  	mAvatarList->setVisible(TRUE);  	mNonAvatarCaller->setVisible(FALSE); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index f646bcccb5..18bd7b725f 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -545,6 +545,7 @@ void LLIMChiclet::toggleSpeakerControl()  	}  	setRequiredWidth(); +	mSpeakerCtrl->setSpeakerId(LLUUID::null);  	mSpeakerCtrl->setVisible(getShowSpeaker());  } @@ -954,7 +955,10 @@ LLIMGroupChiclet::~LLIMGroupChiclet()  void LLIMGroupChiclet::draw()  { -	switchToCurrentSpeaker(); +	if(getShowSpeaker()) +	{ +		switchToCurrentSpeaker(); +	}  	LLIMChiclet::draw();  } diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 0f52b30567..1e8a739d78 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -298,6 +298,20 @@ public:  		return TRUE;  	} +	void setVisible(BOOL b) +	{ +		// Overflow menu shouldn't hide when it still has focus. See EXT-4217. +		if (!b && hasFocus()) +			return; +		LLToggleableMenu::setVisible(b); +		setFocus(b); +	} + +	void onFocusLost() +	{ +		setVisible(FALSE); +	} +  protected:  	LLFavoriteLandmarkToggleableMenu(const LLToggleableMenu::Params& p):  		LLToggleableMenu(p) @@ -777,6 +791,15 @@ void LLFavoritesBarCtrl::updateButtons()  			mChevronButton->setRect(rect);  			mChevronButton->setVisible(TRUE);  		} +		// Update overflow menu +		LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mPopupMenuHandle.get()); +		if (overflow_menu && overflow_menu->getVisible()) +		{ +			overflow_menu->setFocus(FALSE); +			overflow_menu->setVisible(FALSE); +			if (mUpdateDropDownItems) +				showDropDownMenu(); +		}  	}  	else  	{ @@ -892,6 +915,8 @@ void LLFavoritesBarCtrl::showDropDownMenu()  	if (menu)  	{ +		// Release focus to allow changing of visibility. +		menu->setFocus(FALSE);  		if (!menu->toggleVisibility())  			return; diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 22eb9a51d2..ba034609e9 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -37,6 +37,7 @@  #include "llfloaterreg.h"  #include "llimview.h"  #include "llavatariconctrl.h" +#include "llgroupiconctrl.h"  #include "llagent.h"  // @@ -90,43 +91,34 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp,  	LLUUID session_id = floaterp->getKey(); +	LLIconCtrl* icon = 0; +  	if(gAgent.isInGroup(session_id))  	{ +		LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>(); +		icon_params.group_id = session_id; +		icon = LLUICtrlFactory::instance().createWidget<LLGroupIconCtrl>(icon_params); +  		mSessions[session_id] = floaterp; -		LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(session_id); -		LLGroupMgr* gm = LLGroupMgr::getInstance(); -		gm->addObserver(session_id, this);  		floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); - -		if (group_data && group_data->mInsigniaID.notNull()) -		{ -			mTabContainer->setTabImage(get_ptr_in_map(mSessions, session_id), group_data->mInsigniaID); -		} -		else -		{ -			mTabContainer->setTabImage(floaterp, "Generic_Group"); -			gm->sendGroupPropertiesRequest(session_id); -		}  	}  	else  	{  		LLUUID avatar_id = LLIMModel::getInstance()->getOtherParticipantID(session_id); -		LLAvatarPropertiesProcessor& app = LLAvatarPropertiesProcessor::instance(); -		app.addObserver(avatar_id, this); -		floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, avatar_id)); -		mSessions[avatar_id] = floaterp; -		LLUUID* icon_id_ptr = LLAvatarIconIDCache::getInstance()->get(avatar_id); -		if(icon_id_ptr && icon_id_ptr->notNull()) -		{ -			mTabContainer->setTabImage(floaterp, *icon_id_ptr); -		} -		else -		{ -			mTabContainer->setTabImage(floaterp, "Generic_Person"); -			app.sendAvatarPropertiesRequest(avatar_id); -		} +		LLAvatarIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLAvatarIconCtrl>(); +		icon_params.avatar_id = avatar_id; +		icon = LLUICtrlFactory::instance().createWidget<LLAvatarIconCtrl>(icon_params); + +		mSessions[avatar_id] = floaterp; +		floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, avatar_id));  	} +	mTabContainer->setTabImage(floaterp, icon); +} + +void LLIMFloaterContainer::onCloseFloater(LLUUID& id) +{ +	mSessions.erase(id);  }  void LLIMFloaterContainer::processProperties(void* data, enum EAvatarProcessorType type) @@ -159,13 +151,6 @@ void LLIMFloaterContainer::changed(const LLUUID& group_id, LLGroupChange gc)  	}  } -void LLIMFloaterContainer::onCloseFloater(LLUUID id) -{ -	LLAvatarPropertiesProcessor::instance().removeObserver(id, this); -	LLGroupMgr::instance().removeObserver(id, this); - -} -  void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data)  {  	LLUUID session_id = data["from_id"].asUUID(); diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index bc06f0cbd3..b07ef2d71d 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -51,6 +51,7 @@ public:  	/*virtual*/ BOOL postBuild();  	/*virtual*/ void onOpen(const LLSD& key); +	void onCloseFloater(LLUUID& id);  	/*virtual*/ void addFloater(LLFloater* floaterp,   								BOOL select_added_floater,  @@ -69,7 +70,6 @@ private:  	typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;  	avatarID_panel_map_t mSessions; -	void onCloseFloater(LLUUID avatar_id);  	void onNewMessageReceived(const LLSD& data);  }; diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index be48770567..29e3c66684 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -345,8 +345,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)  		//	tmp_chat.mFromName = tmp_chat.mFromID.asString();  	}  	nearby_chat->addMessage(chat_msg, true, args); -	if(nearby_chat->getVisible()) -		return;//no need in toast if chat is visible +	if( nearby_chat->getVisible() +		|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT +			&& gSavedSettings.getBOOL("UseChatBubbles") ) ) +		return;//no need in toast if chat is visible or if bubble chat is enabled  	// Handle irc styled messages for toast panel  	if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 388fdeea7a..9857e37bc3 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -249,6 +249,11 @@ void LLOutputMonitorCtrl::draw()  void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id)  { +	if (speaker_id.isNull() && mSpeakerId.notNull()) +	{ +		LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this); +	} +  	if (speaker_id.isNull() || speaker_id == mSpeakerId) return;  	if (mSpeakerId.notNull()) @@ -256,6 +261,7 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id)  		// Unregister previous registration to avoid crash. EXT-4782.  		LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);  	} +  	mSpeakerId = speaker_id;  	LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this); diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 4a7cdfc856..d7c558d188 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -196,10 +196,9 @@ void LLPanelAvatarNotes::fillRightsData()  		childSetValue("map_check",LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);  		childSetValue("objects_check",LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE); -		childSetEnabled("status_check",TRUE); -		childSetEnabled("map_check",TRUE); -		childSetEnabled("objects_check",TRUE);  	} + +	enableCheckboxes(NULL != relation);  }  void LLPanelAvatarNotes::onCommitNotes() @@ -250,6 +249,17 @@ void LLPanelAvatarNotes::confirmModifyRights(bool grant, S32 rights)  void LLPanelAvatarNotes::onCommitRights()  { +	const LLRelationship* buddy_relationship = +		LLAvatarTracker::instance().getBuddyInfo(getAvatarId()); + +	if (NULL == buddy_relationship) +	{ +		// Lets have a warning log message instead of having a crash. EXT-4947. +		llwarns << "Trying to modify rights for non-friend avatar. Skipped." << llendl; +		return; +	} + +  	S32 rights = 0;  	if(childGetValue("status_check").asBoolean()) @@ -259,8 +269,6 @@ void LLPanelAvatarNotes::onCommitRights()  	if(childGetValue("objects_check").asBoolean())  		rights |= LLRelationship::GRANT_MODIFY_OBJECTS; -	const LLRelationship* buddy_relationship = -			LLAvatarTracker::instance().getBuddyInfo(getAvatarId());  	bool allow_modify_objects = childGetValue("objects_check").asBoolean();  	// if modify objects checkbox clicked @@ -304,9 +312,7 @@ void LLPanelAvatarNotes::resetControls()  	//Disable "Add Friend" button for friends.  	childSetEnabled("add_friend", TRUE); -	childSetEnabled("status_check",FALSE); -	childSetEnabled("map_check",FALSE); -	childSetEnabled("objects_check",FALSE); +	enableCheckboxes(false);  }  void LLPanelAvatarNotes::onAddFriendButtonClick() @@ -334,6 +340,13 @@ void LLPanelAvatarNotes::onShareButtonClick()  	//*TODO not implemented.  } +void LLPanelAvatarNotes::enableCheckboxes(bool enable) +{ +	childSetEnabled("status_check", enable); +	childSetEnabled("map_check", enable); +	childSetEnabled("objects_check", enable); +} +  LLPanelAvatarNotes::~LLPanelAvatarNotes()  {  	if(getAvatarId().notNull()) @@ -348,6 +361,9 @@ LLPanelAvatarNotes::~LLPanelAvatarNotes()  void LLPanelAvatarNotes::changed(U32 mask)  {  	childSetEnabled("teleport", LLAvatarTracker::instance().isBuddyOnline(getAvatarId())); + +	// update rights to avoid have checkboxes enabled when friendship is terminated. EXT-4947. +	fillRightsData();  }  // virtual diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index 632590aa27..52b4255e34 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -259,8 +259,8 @@ private:  };  /** -* Panel for displaying Avatar's notes and modifying friend's rights. -*/ + * Panel for displaying Avatar's notes and modifying friend's rights. + */  class LLPanelAvatarNotes   	: public LLPanelProfileTab  	, public LLFriendObserver @@ -311,6 +311,7 @@ protected:  	void onCallButtonClick();  	void onTeleportButtonClick();  	void onShareButtonClick(); +	void enableCheckboxes(bool enable);  };  #endif // LL_LLPANELAVATAR_H diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index 8edeebaeeb..6c6eb7c719 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -174,6 +174,15 @@ S32	LLPlacesInventoryPanel::notify(const LLSD& info)  //  PUBLIC METHODS  ////////////////////////////////////////////////////////////////////////// +LLPlacesFolderView::LLPlacesFolderView(const LLFolderView::Params& p) +: LLFolderView(p) +{ +	// we do not need auto select functionality in places landmarks, so override default behavior. +	// this disables applying of the LLSelectFirstFilteredItem in LLFolderView::doIdle. +	// Fixed issues: EXT-1631, EXT-4994. +	mAutoSelectOverride = TRUE; +} +  BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask)  {  	// let children to change selection first diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h index 86937e7c7f..04c6758eae 100644 --- a/indra/newview/llplacesinventorypanel.h +++ b/indra/newview/llplacesinventorypanel.h @@ -67,7 +67,7 @@ private:  class LLPlacesFolderView : public LLFolderView  {  public: -	LLPlacesFolderView(const LLFolderView::Params& p) : LLFolderView(p) {}; +	LLPlacesFolderView(const LLFolderView::Params& p);  	/**  	 *	Handles right mouse down  	 * diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml index be32e917e5..214fb6ce54 100644 --- a/indra/newview/skins/default/xui/en/floater_help_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml @@ -2,7 +2,7 @@  <floater   legacy_header_height="18"   can_resize="true" - height="480" + height="600"   layout="topleft"   min_height="150"   min_width="500" @@ -11,7 +11,7 @@   save_rect="true"   single_instance="true"   title="HELP BROWSER" - width="620"> + width="650">      <floater.string       name="loading_text">          Loading... @@ -20,20 +20,20 @@       name="done_text">      </floater.string>      <layout_stack -     bottom="480" +     bottom="600"       follows="left|right|top|bottom"       layout="topleft"       left="5"       name="stack1"       top="20" -     width="610"> +     width="640">          <layout_panel           layout="topleft"           left_delta="0"           top_delta="0"           name="external_controls"           user_resize="false" -         width="590"> +         width="620">              <web_browser               bottom="-11"               follows="left|right|top|bottom" @@ -41,8 +41,8 @@               left="0"               name="browser"               top="0" -             height="500" -             width="590" /> +             height="610" +             width="620" />              <text               follows="bottom|left"               height="16" diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index bd25288a9e..978b40da77 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -19,8 +19,11 @@       left="1"       name="im_box_tab_container"       tab_position="bottom" -     tab_width="80" +     tab_width="64" +     tab_max_width = "134"       tab_height="16" +     use_custom_icon_ctrl="true" +     tab_icon_ctrl_pad="2"       top="0"       width="390" />      <icon diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index 1903e7c714..5d35275e17 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -3,12 +3,10 @@   legacy_header_height="18"   can_minimize="true"    can_resize="true" - center_horiz="true" - center_vert="true"   follows="top|right"   height="218"   layout="topleft" - min_height="60" + min_height="174"   min_width="174"   name="Map"   title="Mini Map" @@ -16,6 +14,8 @@   save_rect="true"   save_visibility="true"   single_instance="true" + left="0" + top="0"   width="200">      <floater.string       name="mini_map_north"> diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index 775e7d66f7..9ca18d455b 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -2,16 +2,16 @@  <floater   legacy_header_height="13"   can_resize="true" - height="546" + height="600"   layout="topleft" - min_height="546" - min_width="670" + min_height="400" + min_width="450"   name="floater_search"   help_topic="floater_search"   save_rect="true"   single_instance="true"   title="FIND" - width="670"> + width="650">      <floater.string       name="loading_text">          Loading... @@ -21,20 +21,20 @@          Done      </floater.string>      <layout_stack -     bottom="541" +     bottom="595"       follows="left|right|top|bottom"       layout="topleft"       left="10"       name="stack1"       top="20" -     width="650"> +     width="630">          <layout_panel           layout="topleft"           left_delta="0"           top_delta="0"           name="browser_layout"           user_resize="false" -         width="650"> +         width="630">              <web_browser               bottom="-10"               follows="left|right|top|bottom" @@ -42,8 +42,8 @@               left="0"               name="browser"               top="0" -             height="500" -             width="650" /> +             height="555" +             width="630" />              <text               follows="bottom|left"               height="16" diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index e1df50bf58..34d4b19410 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -4,7 +4,7 @@   can_resize="true"   center_horiz="true"   center_vert="true" - height="535" + height="600"   layout="topleft"   min_height="520"   min_width="520" @@ -14,16 +14,16 @@   save_visibility="true"   single_instance="true"   title="WORLD MAP" - width="800"> + width="650">      <panel       filename="panel_world_map.xml"       follows="all" -     height="500" +     height="555"       layout="topleft"       left="10"       name="objects_mapview"       top="25" -     width="542" /> +     width="375" />       <panel       name="layout_panel_1"       height="22" @@ -394,7 +394,7 @@      <panel       follows="right|top|bottom" -	 height="270" +	 height="310"  	 top_pad="0"  	 width="238">  	 <icon @@ -514,7 +514,7 @@       draw_stripes="false"       bg_writeable_color="MouseGray"       follows="all" -     height="115" +     height="145"       layout="topleft"       left="28"       name="search_results" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index cc71f53bd7..72ac457882 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -407,7 +407,7 @@ Do you wish to proceed?     icon="alertmodal.tga"     name="JoinGroupNoCost"     type="alertmodal"> -You are Joining group [NAME]. +You are joining group [NAME].  Do you wish to proceed?      <usetemplate       name="okcancelbuttons" @@ -3851,7 +3851,7 @@ Are you sure you want to quit?    <notification     icon="alertmodal.tga"     name="HelpReportAbuseEmailLL" -   type="alertmodal"> +   type="alert">  Use this tool to report violations of the [http://secondlife.com/corporate/tos.php Terms of Service] and [http://secondlife.com/corporate/cs.php Community Standards].  All reported abuses are investigated and resolved. @@ -4763,7 +4763,7 @@ The objects on the selected parcel that are NOT owned by you have been returned     name="ServerObjectMessage"     type="notify">  Message from [NAME]: -[MSG] +<nolink>[MSG]</nolink>    </notification>    <notification diff --git a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml index 0c1418fc2d..9518151b72 100644 --- a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml @@ -64,7 +64,7 @@       layout="topleft"       left="103"       name="description" -     textbox.mouse_opaque="false"  +     textbox.show_context_menu="false"        top_pad="0"       width="178"       word_wrap="true" /> diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml index e62c1278f9..9bcce1685e 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml @@ -64,7 +64,7 @@       layout="topleft"       left="103"       name="picture_descr" -     textbox.mouse_opaque="false"  +     textbox.show_context_menu="false"        top_pad="0"       width="178"       word_wrap="true" /> diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml index 26568c2a28..c06e67a4bb 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general.xml @@ -134,6 +134,7 @@       top="200"       width="80" />      <spinner +     decimal_digits="0"       follows="left|top"       height="20"       increment="1" diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml index 597c4e83b6..4a163fc1e3 100644 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -5,6 +5,7 @@ label_pad_left - padding to the left of tab button labels  -->  <tab_container tab_min_width="60"                 tab_max_width="150" +               use_custom_icon_ctrl="false"                 halign="center"                 font="SansSerifSmall"                  tab_height="21" diff --git a/indra/newview/skins/default/xui/en/widgets/text_editor.xml b/indra/newview/skins/default/xui/en/widgets/text_editor.xml index 23ca8ea338..2ced8b1b4b 100644 --- a/indra/newview/skins/default/xui/en/widgets/text_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/text_editor.xml @@ -1,4 +1,5 @@  <?xml version="1.0" encoding="utf-8" standalone="yes" ?>  <!-- Core parameters are in simple_text_editor.xml -->  <text_editor -  allow_html="false"/> +  allow_html="false" +  show_context_menu="true"/> | 
