diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index f56cb2eee7248cbd1ac660645d0d52e1d3fff6a3..c3dd4ae647d9436b85fbde6d9d8b2927ea24373f 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 70d78c77cdebffbe15c1425d75f46a80ffd8f96e..c376a73615caf4f1cfe5b3f86dd05871446bef84 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -139,6 +139,7 @@ class LLTextBase
 	// 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 ca1688ad1f7a463bac899dc3ed437ec6ae408d12..1257cf97897a84ed695cd7ae104014b21fa42396 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 845a264327d8d6f9b1f443808b55e37a7b3b4e31..f82d17808954775dc00ce6752bf012491f3b8923 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 fd711b72b0e9c06883b7f677e589705403f538f8..958dbf226a8d104d745e985dd61841e7cb680be9 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 974289d5e0f290baf5c7b54667bdabe2a942bfe1..8989816bfec846c5e06ecd44aeaace53bea50a12 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -101,8 +101,6 @@ class LLBottomTray
 		, 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 914435b6409d7d6645d6fdaacbace88775d7d9ac..3443d8b593aa86bad84ef0fdacdce6efa9c9d213 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 b927d369cd4b6d17cfd5339d3c1371c53e59ac4f..4b66a1ef8922bed27e92d18dd239d5c1b7b687cc 100644
--- a/indra/newview/llchannelmanager.h
+++ b/indra/newview/llchannelmanager.h
@@ -102,6 +102,13 @@ class LLChannelManager : public LLSingleton<LLChannelManager>
 	// 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 9e290c8c046fcd5d0ff4509deee34c27b7b20de6..4078fac4ecbadad10e198e505437ebebd2aecea1 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 01603f390def7cef46db24861b61bc4a9414e656..ae5be8cc7c92ce04c0bef6687a9c581cce2f80dc 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -74,6 +74,7 @@ class LLLandmarkInfoGetter
 		mName("(Loading...)"),
 		mPosX(0),
 		mPosY(0),
+		mPosZ(0),
 		mLoaded(false) 
 	{}
 
@@ -101,6 +102,14 @@ class LLLandmarkInfoGetter
 			requestNameAndPos();
 		return mPosY;
 	}
+
+	S32 getPosZ()
+	{
+		if (!mLoaded)
+			requestNameAndPos();
+		return mPosZ;
+	}
+
 private:
 	/**
 	 * Requests landmark data from server.
@@ -114,14 +123,15 @@ class LLLandmarkInfoGetter
 		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 @@ class LLLandmarkInfoGetter
 	std::string mName;
 	S32 mPosX;
 	S32 mPosY;
+	S32 mPosZ;
 	bool mLoaded;
 };
 
@@ -151,7 +162,8 @@ class LLFavoriteLandmarkButton : public LLButton
 		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 23d9436fa610d39f4116a4816400e845e671928b..ac060cef158b0733024a26a6cf0c05845503f882 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 98dc3153d0de47d2efae46e146a6f46754de1800..b94d5ec2c0058c51c6e4de51798ae5d4e8e3c018 100644
--- a/indra/newview/llfriendcard.h
+++ b/indra/newview/llfriendcard.h
@@ -120,7 +120,7 @@ class LLFriendCardsManager
 		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 d7eaad94f017a8524d935b4f49d9e2ea8d0aa8a1..0acc67ff5a8a78ac28617ecbb4fa5978505e54b5 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 0465f78031fdd8d6f5c081aef1ffd2788d3ce852..2b071a8999befd61cb7ba6face2f0183b81bc1dc 100644
--- a/indra/newview/lljoystickbutton.h
+++ b/indra/newview/lljoystickbutton.h
@@ -79,7 +79,13 @@ class LLJoystick
 	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 e0dc1b6f0fce150a0771e390e9431f2f3a6d5c9b..003afafa87abfa3a43fb218cb13c9611f7e7b98c 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 1c524c820c962b27abda5df1525babc96e64ffa4..c65b831f3e62017c7f4d253d039d2c57ed2364da 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 85db69174d9a97edace9e453bed0b1730eebd5b0..029019a8dca8bfae7f293537175308c659fdc1fe 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 3303c388afe631b72ee2774848ac9557b3c7ebb5..1f4e57cf89e8111b8c9a8519a8098fe6fb4aead0 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -56,6 +56,7 @@ class LLNearbyChat: public LLDockableFloater
 	/*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 333646d2c5e2b2cb45cb28ad179f057f28bdb9a6..8fb4ea42119eb226eb45eb6a4af62dafe0892dda 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 fc6fb25644a94a12cf2adf281fdf2cc98e391b15..26730e1f108093fb093a6874779629d8de4ae020 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 23998a0e5d1bbef91e4ff232d495c41ac7f1df51..42cc7cacc238e5e38a6c8619e3f2973981e1ca30 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -209,6 +209,9 @@ class LLGroupHandler : public LLSysHandler
 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 1f5ffb7335be46db1157767451ba47e62d174544..709525d4e268310b8e711ab8d64af5a3e96b0b7b 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 61501cc1b1bf00450eda7fae88e40c3c870ea2db..0c7cc9af3857370f289fbae71f94280020b227d9 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 2fb6550107a40c19ac772d83f4428dbe5b6e7793..eada3879456eddb085ae715e8e80867ef8b6fa72 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 903df21e785044ceb557eba7c05fd6332156737c..ed2cedbd10d13f6bba0080bb4c119dab2395e5e4 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 0c23947a8ce99c62eefe08b8673e5e00e0f08e0e..48b68e4292f52f388ebb12bdc8047a2ae77cb936 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 9fac7d34f75f6b2ca260ccef711f9b0039cc9239..a370b450e9adf582c7cd54c3975755c1ad672df3 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>