summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationofferhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
-rw-r--r--indra/newview/llnotificationofferhandler.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 471dd28426..cfe7fd09ac 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -37,9 +37,8 @@
#include "lltoastnotifypanel.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
-#include "llimview.h"
-#include "llimfloater.h"
#include "llnotificationmanager.h"
+#include "llnotifications.h"
using namespace LLNotificationsUI;
@@ -65,7 +64,7 @@ LLOfferHandler::~LLOfferHandler()
//--------------------------------------------------------------------------
void LLOfferHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRectRaw().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
}
@@ -91,17 +90,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change")
{
- // add message to IM
- LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, notification->getPayload()["from_id"]);
- if (!LLIMMgr::instance().hasSession(session_id))
- {
- session_id = LLIMMgr::instance().addSession(
- notification->getSubstitutions()["NAME"], IM_NOTHING_SPECIAL,
- notification->getPayload()["from_id"]);
- }
- LLIMMgr::instance().addMessage(session_id, LLUUID(),
- notification->getSubstitutions()["NAME"],
- notification->getMessage());
+ LLHandlerUtil::logToIM(notification);
LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification);