summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsession.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2013-04-11 16:23:36 -0700
committersimon <none@none>2013-04-11 16:23:36 -0700
commit066f2acadf6f1624fcdfc22263a890c370473887 (patch)
treea4e52b29d8074cdc8782ff28b9b0500b32dada50 /indra/newview/llfloaterimsession.cpp
parent98a82c50d539451e1931826ca75fbc01d611806d (diff)
parent460c81070e5fa1c51ce7e186a9ecb8c5f1c995e1 (diff)
Forgot to commit @#! merge
Diffstat (limited to 'indra/newview/llfloaterimsession.cpp')
-rw-r--r--indra/newview/llfloaterimsession.cpp37
1 files changed, 35 insertions, 2 deletions
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 73adfd0eda..8ec85e1160 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -39,6 +39,7 @@
#include "llchannelmanager.h"
#include "llchiclet.h"
#include "llchicletbar.h"
+#include "lldonotdisturbnotificationstorage.h"
#include "llfloaterreg.h"
#include "llfloateravatarpicker.h"
#include "llfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container
@@ -618,6 +619,8 @@ void LLFloaterIMSession::onClose(bool app_quitting)
// Last change:
// EXT-3516 X Button should end IM session, _ button should hide
gIMMgr->leaveSession(mSessionID);
+ // *TODO: Study why we need to restore the floater before we close it.
+ // Might be because we want to save some state data in some clean open state.
LLFloaterIMSessionTab::restoreFloater();
// Clean up the conversation *after* the session has been ended
LLFloaterIMSessionTab::onClose(app_quitting);
@@ -643,6 +646,23 @@ void LLFloaterIMSession::setDocked(bool docked, bool pop_on_undock)
}
}
+void LLFloaterIMSession::setMinimized(BOOL b)
+{
+ bool wasMinimized = isMinimized();
+ LLFloaterIMSessionTab::setMinimized(b);
+
+ //Switching from minimized state to un-minimized state
+ if(wasMinimized && !b)
+ {
+ //When in DND mode, remove stored IM notifications
+ //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal
+ if(gAgent.isDoNotDisturb())
+ {
+ LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, mSessionID);
+ }
+ }
+}
+
void LLFloaterIMSession::setVisible(BOOL visible)
{
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
@@ -711,6 +731,18 @@ BOOL LLFloaterIMSession::getVisible()
return visible;
}
+void LLFloaterIMSession::setFocus(BOOL focus)
+{
+ LLFloaterIMSessionTab::setFocus(focus);
+
+ //When in DND mode, remove stored IM notifications
+ //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal
+ if(focus && gAgent.isDoNotDisturb())
+ {
+ LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, mSessionID);
+ }
+}
+
//static
bool LLFloaterIMSession::toggle(const LLUUID& session_id)
{
@@ -1123,9 +1155,10 @@ public:
mSessionID = session_id;
}
- void error(U32 statusNum, const std::string& reason)
+ void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- llinfos << "Error inviting all agents to session" << llendl;
+ llwarns << "Error inviting all agents to session [status:"
+ << statusNum << "]: " << content << llendl;
//throw something back to the viewer here?
}