diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2009-11-30 18:15:49 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2009-11-30 18:15:49 +0200 |
commit | 288f67e46207220c589cdb82d464070c1bf1ab75 (patch) | |
tree | 2323c715cd2f44e8609eeb8ee91e23e4366296bd /indra/newview | |
parent | cbab53ec392fbf3cb1e34324f0a96d04dd084ce6 (diff) | |
parent | 0c828289c04a9783eab72d2e9f77903f96f2bc62 (diff) |
Automated merge with https://hg.aws.productengine.com/secondlife/viewer-2-0/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llnotificationhandler.h | 2 | ||||
-rw-r--r-- | indra/newview/llnotificationhandlerutil.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llnotificationscripthandler.cpp | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index d42b0148d6..b561f795f5 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -268,7 +268,7 @@ public: /** * Writes notification message to IM session. */ - static void logToIM(const LLNotificationPtr& notification); + static void logToIMP2P(const LLNotificationPtr& notification); }; } diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index e1236b935e..112d829563 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -52,7 +52,7 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) } // static -void LLHandlerUtil::logToIM(const LLNotificationPtr& notification) +void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification) { // add message to IM const std::string @@ -82,7 +82,18 @@ void LLHandlerUtil::logToIM(const LLNotificationPtr& notification) return; } - LLIMModel::instance().addMessageSilently(*session, name, from_id, + + // store active session id + const LLUUID & active_session_id = + LLIMModel::instance().getActiveSessionID(); + + // set created session as active to avoid IM toast popup + LLIMModel::instance().setActiveSessionID(session->mSessionID); + + LLIMModel::instance().addMessage(session->mSessionID, name, from_id, notification->getMessage()); + + // restore active session id + LLIMModel::instance().setActiveSessionID(active_session_id); } } diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index cfe7fd09ac..c179a2cf90 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -90,7 +90,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") { - LLHandlerUtil::logToIM(notification); + LLHandlerUtil::logToIMP2P(notification); LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 6f91b6e58b..c7261199e3 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -98,7 +98,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify) { if (LLHandlerUtil::canLogToIM(notification)) { - LLHandlerUtil::logToIM(notification); + LLHandlerUtil::logToIMP2P(notification); } if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName() || SCRIPT_LOAD_URL == notification->getName()) |