diff options
Diffstat (limited to 'indra/newview/llfloaterimnearbychathandler.cpp')
-rw-r--r-- | indra/newview/llfloaterimnearbychathandler.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index ef7ec9e950..c920a3c898 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -152,7 +152,6 @@ protected: toast_list_t m_toast_pool; bool mStopProcessing; - bool mChannelRect; }; @@ -263,8 +262,8 @@ bool LLFloaterIMNearbyChatScreenChannel::createPoolToast() LLToast::Params p; p.panel = panel; - p.lifetime_secs = gSavedSettings.getS32("NearbyToastLifeTime"); - p.fading_time_secs = gSavedSettings.getS32("NearbyToastFadingTime"); + p.lifetime_secs = (F32)gSavedSettings.getS32("NearbyToastLifeTime"); + p.fading_time_secs = (F32)gSavedSettings.getS32("NearbyToastFadingTime"); LLToast* toast = new LLFloaterIMNearbyChatToast(p, this); @@ -287,7 +286,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) if (mFloaterSnapRegion == NULL) { - mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region"); + mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion(); } LLRect channel_rect; mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView); @@ -377,7 +376,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts() if (mFloaterSnapRegion == NULL) { - mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region"); + mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion(); } if (!getParent()) @@ -535,14 +534,13 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)// show error in window //("ScriptErrorsAsChat")) { - - LLColor4 txt_color; - - LLViewerChat::getChatColor(chat_msg,txt_color); + LLUIColor txt_color; + F32 alpha = 1.f; + LLViewerChat::getChatColor(chat_msg, txt_color, alpha); LLFloaterScriptDebug::addScriptLine(chat_msg.mText, chat_msg.mFromName, - txt_color, + txt_color % alpha, chat_msg.mFromID); return; } @@ -643,8 +641,18 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, } } + std::string user_preferences; + if (chat_msg.mSourceType == CHAT_SOURCE_OBJECT) + { + user_preferences = gSavedSettings.getString("NotificationObjectIMOptions"); + } + else + { + user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions"); + } + //Will show toast when chat preference is set - if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !nearby_chat->isMessagePaneExpanded()) + if((user_preferences == "toast") || !nearby_chat->isMessagePaneExpanded()) { // Add a nearby chat toast. LLUUID id; |