summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-02-25 21:20:45 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-02-25 21:20:45 -0800
commit5c73a908353cdd7210e3148f7162d30afab7873a (patch)
tree3ff858042b69b20a9eb3062b7cabd0c390e1b5cf /indra/newview/llchathistory.cpp
parent9b05fecbf6b3d65dae5a010fc35821dc116a44d0 (diff)
parent5eee046bb7d62e24df6c35018b3c5383f87ab587 (diff)
automated merge
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp37
1 files changed, 34 insertions, 3 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 5ec18dab29..d0108c1b1c 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -51,9 +51,12 @@
#include "llslurl.h"
#include "lllayoutstack.h"
#include "llagent.h"
+#include "llnotificationsutil.h"
+#include "lltoastnotifypanel.h"
#include "llviewerregion.h"
#include "llworld.h"
+
#include "llsidetray.h"//for blocked objects panel
static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
@@ -310,7 +313,7 @@ protected:
showSystemContextMenu(x,y);
if(mSourceType == CHAT_SOURCE_AGENT)
showAvatarContextMenu(x,y);
- if(mSourceType == CHAT_SOURCE_OBJECT)
+ if(mSourceType == CHAT_SOURCE_OBJECT && SYSTEM_FROM != mFrom)
showObjectContextMenu(x,y);
}
@@ -653,8 +656,36 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
mLastMessageTimeStr = chat.mTimeStr;
}
- std::string message = irc_me ? chat.mText.substr(3) : chat.mText;
- mEditor->appendText(message, FALSE, style_params);
+ if (chat.mNotifId.notNull())
+ {
+ LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId);
+ if (notification != NULL)
+ {
+ LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(
+ notification);
+ notify_box->setFollowsLeft();
+ notify_box->setFollowsRight();
+ //Prepare the rect for the view
+ LLRect target_rect = mEditor->getDocumentView()->getRect();
+ // squeeze down the widget by subtracting padding off left and right
+ target_rect.mLeft += mLeftWidgetPad + mEditor->getHPad();
+ target_rect.mRight -= mRightWidgetPad;
+ notify_box->reshape(target_rect.getWidth(),
+ notify_box->getRect().getHeight());
+ notify_box->setOrigin(target_rect.mLeft, notify_box->getRect().mBottom);
+
+ LLInlineViewSegment::Params params;
+ params.view = notify_box;
+ params.left_pad = mLeftWidgetPad;
+ params.right_pad = mRightWidgetPad;
+ mEditor->appendWidget(params, "\n", false);
+ }
+ }
+ else
+ {
+ std::string message = irc_me ? chat.mText.substr(3) : chat.mText;
+ mEditor->appendText(message, FALSE, style_params);
+ }
mEditor->blockUndo();
// automatically scroll to end when receiving chat from myself