summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimview.cpp')
-rwxr-xr-xindra/newview/llimview.cpp40
1 files changed, 26 insertions, 14 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 76a314f807..2c20409381 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -174,6 +174,8 @@ void on_new_message(const LLSD& msg)
// determine state of conversations floater
enum {CLOSED, NOT_ON_TOP, ON_TOP, ON_TOP_AND_ITEM_IS_SELECTED} conversations_floater_status;
+
+
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
@@ -181,9 +183,9 @@ void on_new_message(const LLSD& msg)
{
conversations_floater_status = CLOSED;
}
- else if ( !im_box->hasFocus() &&
- (!session_floater || !LLFloater::isVisible(session_floater)
- || session_floater->isMinimized() || !session_floater->hasFocus()))
+ else if (!im_box->hasFocus() &&
+ !(session_floater && LLFloater::isVisible(session_floater)
+ && !session_floater->isMinimized() && session_floater->hasFocus()))
{
conversations_floater_status = NOT_ON_TOP;
}
@@ -226,7 +228,7 @@ void on_new_message(const LLSD& msg)
// 0. nothing - exit
if (("none" == user_preferences ||
ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status)
- && session_floater->isMessagePaneExpanded())
+ && session_floater->isMessagePaneExpanded())
{
return;
}
@@ -274,7 +276,9 @@ void on_new_message(const LLSD& msg)
// 2. Flash line item
if ("openconversations" == user_preferences
- || ON_TOP == conversations_floater_status)
+ || ON_TOP == conversations_floater_status
+ || ("toast" == user_preferences && ON_TOP != conversations_floater_status)
+ || ("flash" == user_preferences && CLOSED == conversations_floater_status))
{
if(!LLMuteList::getInstance()->isMuted(participant_id))
{
@@ -295,8 +299,11 @@ void on_new_message(const LLSD& msg)
}
// 4. Toast
- if ("toast" == user_preferences
+ if ((("toast" == user_preferences) &&
+ (CLOSED == conversations_floater_status
+ || NOT_ON_TOP == conversations_floater_status))
|| !session_floater->isMessagePaneExpanded())
+
{
//Show IM toasts (upper right toasts)
// Skip toasting for system messages and for nearby chat
@@ -1393,7 +1400,7 @@ public:
mAgents = agents_to_invite;
}
- virtual void error(U32 statusNum, const std::string& reason)
+ virtual void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
//try an "old school" way.
if ( statusNum == 400 )
@@ -1405,6 +1412,9 @@ public:
mAgents);
}
+ llwarns << "LLStartConferenceChatResponder error [status:"
+ << statusNum << "]: " << content << llendl;
+
//else throw an error back to the client?
//in theory we should have just have these error strings
//etc. set up in this file as opposed to the IMMgr,
@@ -1550,8 +1560,10 @@ public:
}
}
- void error(U32 statusNum, const std::string& reason)
- {
+ void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
+ {
+ llwarns << "LLViewerChatterBoxInvitationAcceptResponder error [status:"
+ << statusNum << "]: " << content << llendl;
//throw something back to the viewer here?
if ( gIMMgr )
{
@@ -2839,6 +2851,8 @@ LLUUID LLIMMgr::addSession(
//we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions
if (!new_session) return session_id;
+ llinfos << "LLIMMgr::addSession, new session added, name = " << name << ", session id = " << session_id << llendl;
+
//Per Plan's suggestion commented "explicit offline status warning" out to make Dessie happier (see EXT-3609)
//*TODO After February 2010 remove this commented out line if no one will be missing that warning
//noteOfflineUsers(session_id, floater, ids);
@@ -2874,6 +2888,8 @@ void LLIMMgr::removeSession(const LLUUID& session_id)
LLIMModel::getInstance()->clearSession(session_id);
+ llinfos << "LLIMMgr::removeSession, session removed, session id = " << session_id << llendl;
+
notifyObserverSessionRemoved(session_id);
}
@@ -2891,7 +2907,6 @@ void LLIMMgr::inviteToSession(
// voice invite question is different from default only for group call (EXT-7118)
std::string question_type = "VoiceInviteQuestionDefault";
- BOOL ad_hoc_invite = FALSE;
BOOL voice_invite = FALSE;
bool is_linden = LLMuteList::getInstance()->isLinden(caller_name);
@@ -2914,13 +2929,11 @@ void LLIMMgr::inviteToSession(
//else it's an ad-hoc
//and a voice ad-hoc
notify_box_type = "VoiceInviteAdHoc";
- ad_hoc_invite = TRUE;
voice_invite = TRUE;
}
else if ( inv_type == INVITATION_TYPE_IMMEDIATE )
{
notify_box_type = "InviteAdHoc";
- ad_hoc_invite = TRUE;
}
LLSD payload;
@@ -3505,10 +3518,9 @@ public:
}
std::string buffer = saved + message;
- BOOL is_this_agent = FALSE;
if(from_id == gAgentID)
{
- is_this_agent = TRUE;
+ return;
}
gIMMgr->addMessage(
session_id,