summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychathandler.cpp
diff options
context:
space:
mode:
authorAndrew Meadows <andrew@lindenlab.com>2011-01-07 15:22:22 -0800
committerAndrew Meadows <andrew@lindenlab.com>2011-01-07 15:22:22 -0800
commitd23f7df822b6c0557f9426b5e1aa660b77aba01e (patch)
tree2e86e4ec60018beabd35a54cc18fdf322a504269 /indra/newview/llnearbychathandler.cpp
parentcf64ecb41dbbdcdc3c512510c4a7ebd28c832314 (diff)
parentc132d20a7433e2d09e3521a15497f661fcbd18b8 (diff)
merge
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r--indra/newview/llnearbychathandler.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index d2ad78f140..de5439e4e0 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -121,7 +121,7 @@ protected:
if (!toast) return;
LL_DEBUGS("NearbyChat") << "Pooling toast" << llendl;
toast->setVisible(FALSE);
- toast->stopFading();
+ toast->stopTimer();
toast->setIsHidden(true);
// Nearby chat toasts that are hidden, not destroyed. They are collected to the toast pool, so that
@@ -296,7 +296,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
{
panel->addMessage(notification);
toast->reshapeToPanel();
- toast->startFading();
+ toast->startTimer();
arrangeToasts();
return;
@@ -341,7 +341,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
panel->init(notification);
toast->reshapeToPanel();
- toast->startFading();
+ toast->startTimer();
m_active_toasts.push_back(toast->getHandle());
@@ -382,7 +382,10 @@ void LLNearbyChatScreenChannel::showToastsBottom()
return;
LLRect toast_rect;
- S32 bottom = getRect().mBottom;
+ updateBottom();
+ S32 channel_bottom = getRect().mBottom;
+
+ S32 bottom = channel_bottom;
S32 margin = gSavedSettings.getS32("ToastGap");
//sort active toasts
@@ -514,9 +517,18 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
}
nearby_chat->addMessage(chat_msg, true, args);
+
+ if(chat_msg.mSourceType == CHAT_SOURCE_AGENT
+ && chat_msg.mFromID.notNull()
+ && chat_msg.mFromID != gAgentID)
+ {
+ LLFirstUse::otherAvatarChatFirst();
+ }
+
if( nearby_chat->getVisible()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
- && gSavedSettings.getBOOL("UseChatBubbles") ) )
+ && gSavedSettings.getBOOL("UseChatBubbles") )
+ || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode
return;//no need in toast if chat is visible or if bubble chat is enabled
// Handle irc styled messages for toast panel
@@ -573,13 +585,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ;
channel->addNotification(notification);
}
-
- if(chat_msg.mSourceType == CHAT_SOURCE_AGENT
- && chat_msg.mFromID.notNull()
- && chat_msg.mFromID != gAgentID)
- {
- LLFirstUse::otherAvatarChatFirst();
- }
+
}
void LLNearbyChatHandler::onDeleteToast(LLToast* toast)