CHUI-953 FIXED Set dnd and close all conversation before quittinq.

Mnikolenko ProductEngine 2013-05-20 15:55:06 +03:00
parent f5217acb4e
commit bf5f53bf64
2 changed files with 31 additions and 1 deletions

View File

@ -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);
}
}
}

View File

@ -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;