summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloater.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-06-26 17:15:48 -0700
committerMerov Linden <merov@lindenlab.com>2012-06-26 17:15:48 -0700
commite8ec428539d951bdd3a26623b1dc38c54a04753b (patch)
tree125b780a9c8c3847f7b53925a242ede581fee6f5 /indra/newview/llimfloater.cpp
parentc233f0c9494d7dddbd8baab0f87b0ad54f42b0f9 (diff)
parentabe106bd9c33fef12dcf4eacca228d5d669d9e34 (diff)
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r--indra/newview/llimfloater.cpp84
1 files changed, 39 insertions, 45 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index f89bafc7ea..9ea4bec069 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -105,51 +105,6 @@ void LLIMFloater::onFocusReceived()
}
}
-// virtual
-void LLIMFloater::onClose(bool app_quitting)
-{
- // Always suppress the IM from the conversations list on close if present for any reason
- if (LLIMConversation::isChatMultiTab())
- {
- LLIMFloaterContainer* im_box = LLIMFloaterContainer::findInstance();
- if (im_box)
- {
- im_box->removeConversationListItem(mSessionID);
- }
- }
-
- LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(
- mSessionID);
-
- if (session == NULL)
- {
- llwarns << "Empty session." << llendl;
- return;
- }
-
- bool is_call_with_chat = session->isGroupSessionType()
- || session->isAdHocSessionType() || session->isP2PSessionType();
-
- LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
-
- if (is_call_with_chat && voice_channel != NULL
- && voice_channel->isActive())
- {
- LLSD payload;
- payload["session_id"] = mSessionID;
- LLNotificationsUtil::add("ConfirmLeaveCall", LLSD(), payload, confirmLeaveCallCallback);
- return;
- }
-
- setTyping(false);
-
- // The source of much argument and design thrashing
- // Should the window hide or the session close when the X is clicked?
- //
- // Last change:
- // EXT-3516 X Button should end IM session, _ button should hide
- gIMMgr->leaveSession(mSessionID);
-}
/* static */
void LLIMFloater::newIMCallback(const LLSD& data)
@@ -616,6 +571,45 @@ LLIMFloater* LLIMFloater::getInstance(const LLUUID& session_id)
return conversation;
}
+void LLIMFloater::onClose(bool app_quitting)
+{
+ LLIMConversation::onClose(app_quitting);
+
+
+ LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(
+ mSessionID);
+
+ if (session == NULL)
+ {
+ llwarns << "Empty session." << llendl;
+ return;
+ }
+
+ bool is_call_with_chat = session->isGroupSessionType()
+ || session->isAdHocSessionType() || session->isP2PSessionType();
+
+ LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
+
+ if (is_call_with_chat && voice_channel != NULL
+ && voice_channel->isActive())
+ {
+ LLSD payload;
+ payload["session_id"] = mSessionID;
+ LLNotificationsUtil::add("ConfirmLeaveCall", LLSD(), payload, confirmLeaveCallCallback);
+ return;
+ }
+
+ setTyping(false);
+
+ // The source of much argument and design thrashing
+ // Should the window hide or the session close when the X is clicked?
+ //
+ // Last change:
+ // EXT-3516 X Button should end IM session, _ button should hide
+ gIMMgr->leaveSession(mSessionID);
+
+}
+
void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
{
// update notification channel state