summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llimconversation.cpp14
-rw-r--r--indra/newview/llimconversation.h1
-rw-r--r--indra/newview/llimfloater.cpp84
3 files changed, 54 insertions, 45 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index cbebf3edd3..f304997abf 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -339,6 +339,20 @@ void LLIMConversation::onOpen(const LLSD& key)
updateHeaderAndToolbar();
}
+// virtual
+void LLIMConversation::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);
+ }
+ }
+}
+
void LLIMConversation::onTearOffClicked()
{
onClickTearOff(this);
diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h
index f4b8a38242..47c98d6f8b 100644
--- a/indra/newview/llimconversation.h
+++ b/indra/newview/llimconversation.h
@@ -63,6 +63,7 @@ public:
// LLFloater overrides
/*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onClose(bool app_quitting);
/*virtual*/ BOOL postBuild();
protected:
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 98ebc82f99..37ee7b8a7c 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)
@@ -611,6 +566,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