summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lldockablefloater.cpp4
-rw-r--r--indra/newview/llagent.cpp3
-rw-r--r--indra/newview/llbottomtray.cpp35
-rw-r--r--indra/newview/llbottomtray.h2
-rw-r--r--indra/newview/llchannelmanager.cpp9
-rw-r--r--indra/newview/llchannelmanager.h7
-rw-r--r--indra/newview/llchiclet.cpp2
-rw-r--r--indra/newview/llfavoritesbar.cpp18
-rw-r--r--indra/newview/llfriendcard.cpp45
-rw-r--r--indra/newview/llfriendcard.h2
-rw-r--r--indra/newview/lllandmarkactions.cpp4
-rw-r--r--indra/newview/lllandmarkactions.h2
-rw-r--r--indra/newview/llnearbychat.cpp9
-rw-r--r--indra/newview/llnearbychat.h1
-rw-r--r--indra/newview/llnearbychatbar.cpp13
-rw-r--r--indra/newview/llnotificationgrouphandler.cpp14
-rw-r--r--indra/newview/llnotificationhandler.h3
-rw-r--r--indra/newview/llsyswellwindow.cpp11
-rw-r--r--indra/newview/lltoast.cpp1
19 files changed, 96 insertions, 89 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/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/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/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/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)