diff options
27 files changed, 137 insertions, 109 deletions
| diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index f56cb2eee7..c3dd4ae647 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -127,6 +127,10 @@ void LLDockableFloater::setVisible(BOOL visible)  		mDockControl.get()->repositionDockable();  	} +	if (visible) +	{ +		LLFloater::setFrontmost(TRUE); +	}  	LLFloater::setVisible(visible);  } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 70d78c77cd..c376a73615 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -139,6 +139,7 @@ public:  	// TODO: add optional style parameter  	virtual void			setText(const LLStringExplicit &utf8str , const LLStyle::Params& input_params = LLStyle::Params()); // uses default style  	virtual std::string		getText() const; +	void					setMaxTextLength(S32 length) { mMaxTextByteLength = length; }  	// wide-char versions  	void					setWText(const LLWString& text); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ca1688ad1f..1257cf9789 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -107,6 +107,7 @@  #include "llnavigationbar.h" //to show/hide navigation bar when changing mouse look state  #include "llagentui.h" +#include "llchannelmanager.h"  using namespace LLVOAvatarDefines; @@ -2166,6 +2167,7 @@ void LLAgent::setBusy()  	{  		gBusyMenu->setLabel(LLTrans::getString("AvatarSetNotBusy"));  	} +	LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(true);  }  //----------------------------------------------------------------------------- @@ -2179,6 +2181,7 @@ void LLAgent::clearBusy()  	{  		gBusyMenu->setLabel(LLTrans::getString("AvatarSetBusy"));  	} +	LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(false);  }  //----------------------------------------------------------------------------- diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 845a264327..f82d178089 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -89,6 +89,8 @@  #include "llvfsthread.h"  #include "llvolumemgr.h" +#include "llnotificationmanager.h" +  // Third party library includes  #include <boost/bind.hpp> @@ -2340,6 +2342,8 @@ bool LLAppViewer::initWindow()  		gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),  		gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),  		FALSE, ignorePixelDepth); + +	LLNotificationsUI::LLNotificationManager::getInstance();  	if (gSavedSettings.getBOOL("WindowFullScreen"))  	{ diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index fd711b72b0..958dbf226a 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -317,11 +317,6 @@ BOOL LLBottomTray::postBuild()  	// Registering Chat Bar to receive Voice client status change notifications.  	gVoiceClient->addObserver(this); -	if (mChicletPanel && mToolbarStack && mNearbyChatBar) -	{ -		verifyChildControlsSizes(); -	} -  	return TRUE;  } @@ -340,35 +335,6 @@ void LLBottomTray::log(LLView* panel, const std::string& descr)  		;   } -void LLBottomTray::verifyChildControlsSizes() -{ -	LLRect rect = mChicletPanel->getRect(); -	/* -	if (rect.getWidth() < mChicletPanel->getMinWidth()) -	{ -		llwarns << "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ: chiclet panel less then min" << llendl; -		mChicletPanel->reshape(mChicletPanel->getMinWidth(), rect.getHeight()); -	} -*/ -	rect = mNearbyChatBar->getRect(); -/* -	if (rect.getWidth() < mNearbyChatBar->getMinWidth()) -	{ -		llwarns << "WWWWWWWWWWWWWWWWWWWWWWWWWWWWW: near chat panel less then min" << llendl; -		mNearbyChatBar->reshape(mNearbyChatBar->getMinWidth(), rect.getHeight()); -	} -	else  -*/ -		if (rect.getWidth() > mNearbyChatBar->getMaxWidth()) -	{ -		llerrs << "WWWWWWWWWWWWWWWWWWWWWWWWWWWWW: near chat panel more then max width" << llendl; - -		rect.setLeftTopAndSize(rect.mLeft, rect.mTop, mNearbyChatBar->getMaxWidth(), rect.getHeight()); -		mNearbyChatBar->reshape(mNearbyChatBar->getMaxWidth(), rect.getHeight()); -		mNearbyChatBar->setRect(rect); -	} -} -  void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)  {  	static S32 debug_calling_number = 0; @@ -393,7 +359,6 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)  	if (mChicletPanel && mToolbarStack && mNearbyChatBar)  	{  		mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, TRUE); - 		verifyChildControlsSizes();  		// bottom tray is narrowed  		if (delta_width < 0) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 974289d5e0..8989816bfe 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -101,8 +101,6 @@ private:  		, RS_RESIZABLE_BUTTONS			= /*RS_BUTTON_SNAPSHOT | */RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES  	}EResizeState; -	void updateResizeState(S32 new_width, S32 cur_width); -	void verifyChildControlsSizes();  	S32 processWidthDecreased(S32 delta_width);  	void processWidthIncreased(S32 delta_width);  	void log(LLView* panel, const std::string& descr); diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 914435b640..3443d8b593 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -220,5 +220,12 @@ void LLChannelManager::removeChannelByID(const LLUUID id)  }  //-------------------------------------------------------------------------- - +void LLChannelManager::muteAllChannels(bool mute) +{ +	for (std::vector<ChannelElem>::iterator it = mChannelList.begin(); +			it != mChannelList.end(); it++) +	{ +		it->channel->setShowToasts(!mute); +	} +} diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h index b927d369cd..4b66a1ef89 100644 --- a/indra/newview/llchannelmanager.h +++ b/indra/newview/llchannelmanager.h @@ -102,6 +102,13 @@ public:  	// remove channel methods  	void	removeChannelByID(const LLUUID id); +	/** +	 * Manages toasts showing for all channels. +	 * +	 * @param mute Flag to disable/enable toasts showing. +	 */ +	void muteAllChannels(bool mute); +  private:  	LLScreenChannel* createChannel(LLChannelManager::Params& p); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 9e290c8c04..4078fac4ec 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -797,13 +797,11 @@ LLChicletPanel::Params::Params()  	chiclet_padding = 3;  	scrolling_offset = 40; -/*  	if (!min_width.isProvided())  	{  		// min_width = 4 chiclets + 3 paddings  		min_width = 180 + 3*chiclet_padding;  	} -*/  };  LLChicletPanel::LLChicletPanel(const Params&p) diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 01603f390d..ae5be8cc7c 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -74,6 +74,7 @@ public:  		mName("(Loading...)"),  		mPosX(0),  		mPosY(0), +		mPosZ(0),  		mLoaded(false)   	{} @@ -101,6 +102,14 @@ public:  			requestNameAndPos();  		return mPosY;  	} + +	S32 getPosZ() +	{ +		if (!mLoaded) +			requestNameAndPos(); +		return mPosZ; +	} +  private:  	/**  	 * Requests landmark data from server. @@ -114,14 +123,15 @@ private:  		if(LLLandmarkActions::getLandmarkGlobalPos(mLandmarkID, g_pos))  		{  			LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(g_pos, -				boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, this, _1, _2, _3)); +				boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, this, _1, _2, _3, _4));  		}  	} -	void landmarkNameCallback(const std::string& name, S32 x, S32 y) +	void landmarkNameCallback(const std::string& name, S32 x, S32 y, S32 z)  	{  		mPosX = x;  		mPosY = y; +		mPosZ = z;  		mName = name;  		mLoaded = true;  	} @@ -130,6 +140,7 @@ private:  	std::string mName;  	S32 mPosX;  	S32 mPosY; +	S32 mPosZ;  	bool mLoaded;  }; @@ -151,7 +162,8 @@ public:  		if (!region_name.empty())  		{  			LLToolTip::Params params; -			params.message = llformat("%s\n%s (%d, %d)", getLabelSelected().c_str(), region_name.c_str(), mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY()); +			params.message = llformat("%s\n%s (%d, %d, %d)", getLabelSelected().c_str(), region_name.c_str(),  +				mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY(), mLandmarkInfoGetter.getPosZ());  			params.sticky_rect = calcScreenRect();  			LLToolTipMgr::instance().show(params);  		} diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 23d9436fa6..ac060cef15 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -44,27 +44,24 @@  // Constants; -static const std::string INVENTORY_STRING_FRIENDS_SUBFOLDER = "Friends"; -static const std::string INVENTORY_STRING_FRIENDS_ALL_SUBFOLDER = "All"; +static const std::string INVENTORY_STRING_FRIENDS_SUBFOLDER = "InvFolder Friends"; +static const std::string INVENTORY_STRING_FRIENDS_ALL_SUBFOLDER = "InvFolder All";  // helper functions -/* -mantipov *NOTE: unable to use  -LLTrans::getString("InvFolder Friends"); or -LLTrans::getString("InvFolder FriendsAll"); -in next two functions to set localized folders' names because of there is a hack in the -LLFolderViewItem::refreshFromListener() method for protected asset types. -So, localized names will be got from the strings with "InvFolder LABEL_NAME" in the strings.xml -*/ -inline const std::string& get_friend_folder_name() +// NOTE: Usage of LLTrans::getString(); in next two functions to set localized +// folders' names is caused by a hack in the LLFolderViewItem::refreshFromListener() +// method for protected asset types. +// So, localized names will be got from the strings with "InvFolder LABEL_NAME" +// in the strings.xml +inline const std::string get_friend_folder_name()  { -	return INVENTORY_STRING_FRIENDS_SUBFOLDER; +	return LLTrans::getString(INVENTORY_STRING_FRIENDS_SUBFOLDER);  } -inline const std::string& get_friend_all_subfolder_name() +inline const std::string get_friend_all_subfolder_name()  { -	return INVENTORY_STRING_FRIENDS_ALL_SUBFOLDER; +	return LLTrans::getString(INVENTORY_STRING_FRIENDS_ALL_SUBFOLDER);  }  void move_from_to_arrays(LLInventoryModel::cat_array_t& from, LLInventoryModel::cat_array_t& to) @@ -81,15 +78,20 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect  	LLInventoryModel::cat_array_t cats;  	LLInventoryModel::item_array_t items; -	gInventory.collectDescendentsIf(parentFolderUUID, cats, items,  +	gInventory.collectDescendentsIf(parentFolderUUID, cats, items,  		LLInventoryModel::EXCLUDE_TRASH, matchFunctor); -	if (cats.count() == 1) +	S32 cats_count = cats.count(); + +	if (cats_count > 1)  	{ -		return cats.get(0)->getUUID(); +		LL_WARNS("LLFriendCardsManager") +			<< "There is more than one Friend card folder." +			<< "The first folder will be used." +			<< LL_ENDL;  	} -	return LLUUID::null; +	return (cats_count >= 1) ? cats.get(0)->getUUID() : LLUUID::null;  }  /** @@ -348,13 +350,8 @@ const LLUUID& LLFriendCardsManager::findFriendAllSubfolderUUIDImpl() const  	return findChildFolderUUID(friendFolderUUID, friendAllSubfolderName);  } -const LLUUID& LLFriendCardsManager::findChildFolderUUID(const LLUUID& parentFolderUUID, const std::string& folderLabel) const +const LLUUID& LLFriendCardsManager::findChildFolderUUID(const LLUUID& parentFolderUUID, const std::string& localizedName) const  { -	// mantipov *HACK: get localaized name in the same way like in the LLFolderViewItem::refreshFromListener() method. -	// be sure these both methods are synchronized. -	// see also get_friend_folder_name() and get_friend_all_subfolder_name() functions -	std::string localizedName = LLTrans::getString("InvFolder " + folderLabel); -  	LLNameCategoryCollector matchFolderFunctor(localizedName);  	return get_folder_uuid(parentFolderUUID, matchFolderFunctor); diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h index 98dc3153d0..b94d5ec2c0 100644 --- a/indra/newview/llfriendcard.h +++ b/indra/newview/llfriendcard.h @@ -120,7 +120,7 @@ private:  		return (mBuddyIDSet.end() != mBuddyIDSet.find(avatarID));  	} -	const LLUUID& findChildFolderUUID(const LLUUID& parentFolderUUID, const std::string& folderLabel) const; +	const LLUUID& findChildFolderUUID(const LLUUID& parentFolderUUID, const std::string& localizedName) const;  	const LLUUID& findFriendFolderUUIDImpl() const;  	const LLUUID& findFriendAllSubfolderUUIDImpl() const;  	const LLUUID& findFriendCardInventoryUUIDImpl(const LLUUID& avatarID); diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index d7eaad94f0..0acc67ff5a 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -134,15 +134,17 @@ void LLJoystick::updateSlop()  	return;  } -BOOL LLJoystick::pointInCircle(S32 x, S32 y) const  +bool LLJoystick::pointInCircle(S32 x, S32 y) const   {  -	//cnt is x and y coordinates of center of joystick circle, and also its radius, -	//because area is not just rectangular, it's a square! -	//Make sure to change method if this changes. -	int cnt = this->getLocalRect().mTop/2; -	if((x-cnt)*(x-cnt)+(y-cnt)*(y-cnt)<=cnt*cnt) +	if(this->getLocalRect().mTop!=this->getLocalRect().mRight) +	{ +		llwarns << "Joystick shape is not square"<<llendl;  		return TRUE; -	return FALSE; +	} +	//center is x and y coordinates of center of joystick circle, and also its radius +	int center = this->getLocalRect().mTop/2; +	bool in_circle = (x - center) * (x - center) + (y - center) * (y - center) <= center * center; +	return in_circle;  }  BOOL LLJoystick::handleMouseDown(S32 x, S32 y, MASK mask) @@ -150,7 +152,7 @@ BOOL LLJoystick::handleMouseDown(S32 x, S32 y, MASK mask)  	//llinfos << "joystick mouse down " << x << ", " << y << llendl;  	bool handles = false; -	if(handles = pointInCircle(x, y)) +	if(pointInCircle(x, y))  	{  		mLastMouse.set(x, y);  		mFirstMouse.set(x, y); diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index 0465f78031..2b071a8999 100644 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -79,7 +79,13 @@ public:  	static void		onBtnHeldDown(void *userdata);		// called by llbutton callback handler  	void            setInitialQuadrant(EJoystickQuadrant initial) { mInitialQuadrant = initial; }; -	BOOL			pointInCircle(S32 x, S32 y) const; +	/** +	 * Checks if click location is inside joystick circle. +	 * +	 * Image containing circle is square and this square has adherent points with joystick +	 * circle. Make sure to change method according to shape other than square.  +	 */ +	bool			pointInCircle(S32 x, S32 y) const;  	static std::string nameFromQuadrant(const EJoystickQuadrant quadrant);  	static EJoystickQuadrant quadrantFromName(const std::string& name); diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index e0dc1b6f0f..003afafa87 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -324,7 +324,7 @@ void LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(const LLVector3d& gl  	{  		LLVector3 pos = sim_infop->getLocalPos(global_pos);  		std::string name = sim_infop->getName() ; -		cb(name, llround(pos.mV[VX]), llround(pos.mV[VY])); +		cb(name, llround(pos.mV[VX]), llround(pos.mV[VY]),llround(pos.mV[VZ]));  	}  	else  	{ @@ -368,7 +368,7 @@ void LLLandmarkActions::onRegionResponseNameAndCoords(region_name_and_coords_cal  	{  		LLVector3 local_pos = sim_infop->getLocalPos(global_pos);  		std::string name = sim_infop->getName() ; -		cb(name, llround(local_pos.mV[VX]), llround(local_pos.mV[VY])); +		cb(name, llround(local_pos.mV[VX]), llround(local_pos.mV[VY]), llround(local_pos.mV[VZ]));  	}  } diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h index 1c524c820c..c65b831f3e 100644 --- a/indra/newview/lllandmarkactions.h +++ b/indra/newview/lllandmarkactions.h @@ -43,7 +43,7 @@ class LLLandmarkActions  {  public:  	typedef boost::function<void(std::string& slurl)> slurl_callback_t; -	typedef boost::function<void(std::string& slurl, S32 x, S32 y)> region_name_and_coords_callback_t; +	typedef boost::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t;  	/**  	 * @brief Fetches landmark LLViewerInventoryItems for the given landmark name.  diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 85db69174d..029019a8dc 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -203,5 +203,12 @@ void LLNearbyChat::getAllowedRect(LLRect& rect)  {  	rect = gViewerWindow->getWorldViewRectRaw();  } - +void LLNearbyChat::setMinimized	(BOOL minimize) +{ +	if(minimize && !isDocked()) +	{ +		setVisible(FALSE); +	} +	LLDockableFloater::setMinimized(minimize); +} diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 3303c388af..1f4e57cf89 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -56,6 +56,7 @@ public:  	/*virtual*/ void	onOpen	(const LLSD& key);  	virtual void setRect		(const LLRect &rect); +	virtual void setMinimized	(BOOL minimize);  private:  	virtual void    applySavedVariables(); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 333646d2c5..8fb4ea4211 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -252,19 +252,6 @@ bool LLNearbyChatBar::instanceExists()  void LLNearbyChatBar::draw()  { -// TODO: mantipov: remove -/* -	LLRect rect = getRect(); -	S32 max_width = getMaxWidth(); - -	if (rect.getWidth() > max_width) -	{ -		rect.setLeftTopAndSize(rect.mLeft, rect.mTop, max_width, rect.getHeight()); -		reshape(rect.getWidth(), rect.getHeight(), FALSE); -		setRect(rect); -	} -*/ -  	displaySpeakingIndicator();  	LLPanel::draw();  } diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp index fc6fb25644..26730e1f10 100644 --- a/indra/newview/llnotificationgrouphandler.cpp +++ b/indra/newview/llnotificationgrouphandler.cpp @@ -37,6 +37,7 @@  #include "llgroupactions.h"  #include "llviewercontrol.h"  #include "llviewerwindow.h" +#include "llnotificationmanager.h"  using namespace LLNotificationsUI; @@ -47,6 +48,9 @@ LLGroupHandler::LLGroupHandler(e_notification_type type, const LLSD& id)  	// Getting a Channel for our notifications  	mChannel = LLChannelManager::getInstance()->createNotificationChannel(); +	LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); +	if(channel) +		channel->setOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1));  }  //-------------------------------------------------------------------------- @@ -118,5 +122,15 @@ void LLGroupHandler::onDeleteToast(LLToast* toast)  }  //-------------------------------------------------------------------------- +void LLGroupHandler::onRejectToast(LLUUID& id) +{ +	LLNotificationPtr notification = LLNotifications::instance().find(id); + +	if (notification && LLNotificationManager::getInstance()->getHandlerForNotification(notification->getType()) == this) +	{ +		LLNotifications::instance().cancel(notification); +	} +} +//-------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 23998a0e5d..42cc7cacc2 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -209,6 +209,9 @@ public:  protected:  	virtual void onDeleteToast(LLToast* toast);  	virtual void initChannel(); + +	// own handlers +	void onRejectToast(LLUUID& id);  };  /** diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 1f5ffb7335..709525d4e2 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -448,6 +448,7 @@ LLPanelPeople::LLPanelPeople()  	mFriendListUpdater = new LLFriendListUpdater(boost::bind(&LLPanelPeople::updateFriendList,	this));  	mNearbyListUpdater = new LLNearbyListUpdater(boost::bind(&LLPanelPeople::updateNearbyList,	this));  	mRecentListUpdater = new LLRecentListUpdater(boost::bind(&LLPanelPeople::updateRecentList,	this)); +	mCommitCallbackRegistrar.add("People.addFriend", boost::bind(&LLPanelPeople::onAddFriendButtonClicked, this));  }  LLPanelPeople::~LLPanelPeople() @@ -547,7 +548,6 @@ BOOL LLPanelPeople::postBuild()  		boost::bind(&LLPanelPeople::onFriendsAccordionExpandedCollapsed, this, _2, mOnlineFriendList));  	buttonSetAction("view_profile_btn",	boost::bind(&LLPanelPeople::onViewProfileButtonClicked,	this)); -	buttonSetAction("add_friend_btn",	boost::bind(&LLPanelPeople::onAddFriendButtonClicked,	this));  	buttonSetAction("group_info_btn",	boost::bind(&LLPanelPeople::onGroupInfoButtonClicked,	this));  	buttonSetAction("chat_btn",			boost::bind(&LLPanelPeople::onChatButtonClicked,		this));  	buttonSetAction("im_btn",			boost::bind(&LLPanelPeople::onImButtonClicked,			this)); @@ -707,7 +707,7 @@ void LLPanelPeople::updateButtons()  	bool nearby_tab_active	= (cur_tab == NEARBY_TAB_NAME);  	bool friends_tab_active = (cur_tab == FRIENDS_TAB_NAME);  	bool group_tab_active	= (cur_tab == GROUP_TAB_NAME); -	bool recent_tab_active	= (cur_tab == RECENT_TAB_NAME); +	//bool recent_tab_active	= (cur_tab == RECENT_TAB_NAME);  	LLUUID selected_id;  	std::vector<LLUUID> selected_uuids; @@ -717,7 +717,6 @@ void LLPanelPeople::updateButtons()  	buttonSetVisible("group_info_btn",		group_tab_active);  	buttonSetVisible("chat_btn",			group_tab_active); -	buttonSetVisible("add_friend_btn",		nearby_tab_active || recent_tab_active);  	buttonSetVisible("view_profile_btn",	!group_tab_active);  	buttonSetVisible("im_btn",				!group_tab_active);  	buttonSetVisible("call_btn",			!group_tab_active); @@ -750,7 +749,9 @@ void LLPanelPeople::updateButtons()  			is_friend = LLAvatarTracker::instance().getBuddyInfo(selected_id) != NULL;  		} -		childSetEnabled("add_friend_btn",	!is_friend); +		LLPanel* cur_panel = mTabContainer->getCurrentPanel(); +		if (cur_panel) +			cur_panel->childSetEnabled("add_friend_btn", !is_friend);  	}  	buttonSetEnabled("teleport_btn",		friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 61501cc1b1..0c7cc9af38 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -542,16 +542,16 @@ void LLPanelPlaceProfile::updateCovenantText(const std::string &text)  void LLPanelPlaceProfile::onForSaleBannerClick()  {  	LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance(); -	LLParcelSelectionHandle hParcel = mgr->getFloatingParcelSelection(); +	LLParcel* parcel = mgr->getFloatingParcelSelection()->getParcel();  	LLViewerRegion* selected_region =  mgr->getSelectionRegion(); -	if(!hParcel.isNull() && selected_region) +	if(parcel && selected_region)  	{ -		if(hParcel->getParcel()->getLocalID() == mSelectedParcelID && +		if(parcel->getLocalID() == mSelectedParcelID &&  				mLastSelectedRegionID ==selected_region->getRegionID())  		{ -			if(hParcel->getParcel()->getSalePrice() - gStatusBar->getBalance() > 0) +			if(parcel->getSalePrice() - gStatusBar->getBalance() > 0)  			{ -				LLFloaterBuyCurrency::buyCurrency("Buying selected land ", hParcel->getParcel()->getSalePrice()); +				LLFloaterBuyCurrency::buyCurrency("Buying selected land ", parcel->getSalePrice());  			}  			else  			{ diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 2fb6550107..eada387945 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -90,9 +90,9 @@ BOOL LLSysWellWindow::postBuild()  void LLSysWellWindow::setMinimized(BOOL minimize)  {  	// we don't show empty Message Well window -	if (!minimize) +	if (!minimize && isWindowEmpty())  	{ -		setVisible(!isWindowEmpty()); +		return;  	}  	LLDockableFloater::setMinimized(minimize); @@ -268,8 +268,11 @@ void LLSysWellWindow::toggleWindow()  	{  		setVisible(FALSE);  	} -	//set window in foreground -	setFocus(getVisible()); +	else if(!isDocked()) +	{ +		// bring to front undocked floater +		setVisible(TRUE); +	}  }  //--------------------------------------------------------------------------------- diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 903df21e78..ed2cedbd10 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -225,6 +225,7 @@ void LLToast::setVisible(BOOL show)  		{  			mTimer.start();  		} +		LLModalDialog::setFrontmost(FALSE);  	}  	LLPanel::setVisible(show);  	if(mPanel) diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 0c23947a8c..48b68e4292 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -128,6 +128,7 @@ mAddedDefaultBtn(false)  	// *TODO: magic numbers(???) - copied from llnotify.cpp(250)  	const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE;  +	mTextBox->setMaxTextLength(MAX_LENGTH);  	mTextBox->setVisible(TRUE);  	mTextBox->setValue(notification->getMessage()); diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 9fac7d34f7..a370b450e9 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -107,7 +107,10 @@ background_visible="true"                   name="add_friend_btn"                   top_delta="0"                   tool_tip="Add selected resident to your friends List" -                 width="18" /> +                 width="18"> +               <commit_callback +                  function="People.addFriend" /> +             </button>              </panel>          </panel>          <panel @@ -325,7 +328,10 @@ background_visible="true"                   name="add_friend_btn"                   top_delta="0"                   tool_tip="Add selected resident to your friends List" -                 width="18" /> +                 width="18"> +                <commit_callback +                   function="People.addFriend" /> +              </button>              </panel>          </panel>      </tab_container> | 
