summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-03-25 17:10:34 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2010-03-25 17:10:34 +0200
commit08b7061b608d3385961e600844c72312f7b0d60e (patch)
tree91a4f56d50186833b3b0d3a85010994a4529d8fc /indra/newview
parentc5c72899f3f9e203474d8635aa05e154ee14add9 (diff)
parent920d54297fc13a7a975ff4372f0c1559cf9cf199 (diff)
Automated merge with https://hg.productengine.com/secondlife/viewer-trunk/
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchathistory.cpp2
-rw-r--r--indra/newview/lltoastnotifypanel.cpp19
-rw-r--r--indra/newview/lltoastnotifypanel.h7
3 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index efdfbb8d20..858ea334d1 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -751,7 +751,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
if (notification != NULL)
{
LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel(
- notification);
+ notification, chat.mSessionID);
//we can't set follows in xml since it broke toasts behavior
notify_box->setFollowsLeft();
notify_box->setFollowsRight();
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 907740a88e..c9d2d404c0 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -45,6 +45,7 @@
#include "lltrans.h"
#include "llnotificationsutil.h"
#include "llviewermessage.h"
+#include "llimfloater.h"
const S32 BOTTOM_PAD = VPAD * 3;
const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding
@@ -531,12 +532,26 @@ void LLToastNotifyPanel::disableRespondedOptions(LLNotificationPtr& notification
//////////////////////////////////////////////////////////////////////////
-LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect /* = LLRect::null */)
- : LLToastNotifyPanel(pNotification, rect)
+LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect /* = LLRect::null */)
+ : mSessionID(session_id), LLToastNotifyPanel(pNotification, rect)
{
mTextBox->setFollowsAll();
}
+LLIMToastNotifyPanel::~LLIMToastNotifyPanel()
+{
+ // We shouldn't delete notification when IM floater exists
+ // since that notification will be reused by IM floater.
+ // This may happened when IM floater reloads messages, exactly when user
+ // changes layout of IM chat log(disable/enable plaintext mode).
+ // See EXT-6500
+ LLIMFloater* im_floater = LLIMFloater::findInstance(mSessionID);
+ if (im_floater != NULL && !im_floater->isDead())
+ {
+ mCloseNotificationOnDestroy = false;
+ }
+}
+
void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
{
S32 text_height = mTextBox->getTextBoundingRect().getHeight();
diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h
index a8d2d03236..1c68e4c6b3 100644
--- a/indra/newview/lltoastnotifypanel.h
+++ b/indra/newview/lltoastnotifypanel.h
@@ -138,9 +138,14 @@ class LLIMToastNotifyPanel : public LLToastNotifyPanel
{
public:
- LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null);
+ LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect = LLRect::null);
+
+ ~LLIMToastNotifyPanel();
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+protected:
+ LLUUID mSessionID;
};
#endif /* LLTOASTNOTIFYPANEL_H_ */