diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-05-20 15:55:06 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-05-20 15:55:06 +0300 |
commit | bf5f53bf6467fca2783f10d07eae8d111af5dd82 (patch) | |
tree | 22c023836339ed9a7eff0e6b2e70b868869b4130 | |
parent | f5217acb4e8c2c27d57f4b8af88e21199aaaaaed (diff) |
CHUI-953 FIXED Set dnd and close all conversation before quittinq.
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.h | 2 |
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; |