summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp30
-rw-r--r--indra/newview/llfloaterimcontainer.h2
2 files changed, 31 insertions, 1 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 51796b7486..700bc94105 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1212,7 +1212,7 @@ void LLFloaterIMContainer::doToSelectedGroup(const LLSD& userdata)
if (action == "group_profile")
{
- LLGroupActions::show(mSelectedSession);
+ LLGroupActions::show(mSelectedSession);
}
else if (action == "activate_group")
{
@@ -2095,8 +2095,31 @@ void LLFloaterIMContainer::closeHostedFloater()
onClickCloseBtn();
}
+void LLFloaterIMContainer::closeAllConversations()
+{
+ conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
+ for (;widget_it != mConversationsWidgets.end(); ++widget_it)
+ {
+ if (widget_it->first != LLUUID())
+ {
+ LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
+ if (widget)
+ {
+ widget->destroyView();
+ mConversationsItems.erase(widget_it->first);
+ mConversationsWidgets.erase(widget_it->first);
+ }
+ }
+ }
+}
void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
{
+ if(app_quitting)
+ {
+ gAgent.setDoNotDisturb(true);
+ closeAllConversations();
+ }
+
// Check for currently active session
LLUUID session_id = getSelectedSession();
// If current session is Nearby Chat or there is only one session remaining, close the floater
@@ -2110,6 +2133,11 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
if (active_conversation)
{
active_conversation->closeFloater();
+ if(app_quitting)
+ {
+ LLFloater::closeFloater(app_quitting);
+ }
+
}
}
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 072a83d547..5121e902cb 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -118,8 +118,10 @@ public:
void assignResizeLimits();
virtual BOOL handleKeyHere(KEY key, MASK mask );
/*virtual*/ void closeFloater(bool app_quitting = false);
+ void closeAllConversations();
/*virtual*/ BOOL isFrontmost();
+
private:
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
avatarID_panel_map_t mSessions;