From b7d732334576963efdf9d64cb1466a7f37e4b5ae Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 19 Feb 2012 12:29:00 +0100 Subject: [PATCH] Show IMs in console also if sender's IM panel has focus --- indra/newview/llimview.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e114361833..7e13f195c5 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -125,7 +125,11 @@ void toast_callback(const LLSD& msg){ // check whether incoming IM belongs to an active session or not if (LLIMModel::getInstance()->getActiveSessionID().notNull() - && LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"]) + // Don't abort if we want to log in chat console and the IM floater has focus + // && LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"]) + && LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"] + && !gSavedSettings.getBOOL("FSLogImToChatConsole")) + // Don't abort if we want to log in chat console and the IM floater has focus { return; } @@ -152,16 +156,20 @@ void toast_callback(const LLSD& msg){ // Skip toasting if we have open window of IM with this session id LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]); + // Don't abort if we want to log in chat console + //if (open_im_floater && open_im_floater->getVisible()) if (open_im_floater && open_im_floater->getVisible() && !gSavedSettings.getBOOL("FSLogImToChatConsole")) + // Don't abort if we want to log in chat console { return; } - // Ansariel: Don't toast if the message is an announcement + // Don't toast if the message is an announcement if (msg["is_announcement"].asBoolean()) { return; } + // Don't toast if the message is an announcement LLAvatarNameCache::get(msg["from_id"].asUUID(), boost::bind(&on_avatar_name_cache_toast,