summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationtiphandler.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-04-28 13:37:21 -0400
committerLoren Shih <seraph@lindenlab.com>2010-04-28 13:37:21 -0400
commit29e1804139691229a887144b612f147e1c9dcffb (patch)
treeef7b33360da228b7f2e078dbea5af763c1548230 /indra/newview/llnotificationtiphandler.cpp
parent26d324a2dd06ebde896f7856622a55414eb75d77 (diff)
parent96df3f3eb1351973d140ba73b507de44b1052c89 (diff)
automated merge
Diffstat (limited to 'indra/newview/llnotificationtiphandler.cpp')
-rw-r--r--indra/newview/llnotificationtiphandler.cpp56
1 files changed, 2 insertions, 54 deletions
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 407de79c89..df6f04b6ea 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -41,41 +41,10 @@
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llnotificationmanager.h"
+#include "llpaneltiptoast.h"
using namespace LLNotificationsUI;
-class LLOnlineStatusToast : public LLToastPanel
-{
-public:
-
- struct Params
- {
- LLNotificationPtr notification;
- LLUUID avatar_id;
- std::string message;
-
- Params() {}
- };
-
- LLOnlineStatusToast(Params& p) : LLToastPanel(p.notification)
- {
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_online_status_toast.xml");
-
- childSetValue("avatar_icon", p.avatar_id);
- childSetValue("message", p.message);
-
- if (p.notification->getPayload().has("respond_on_mousedown")
- && p.notification->getPayload()["respond_on_mousedown"] )
- {
- setMouseDownCallback(boost::bind(&LLNotification::respond, p.notification,
- p.notification->getResponseTemplate()));
- }
-
- // set line max count to 3 in case of a very long name
- snapToMessageHeight(getChild<LLTextBox>("message"), 3);
- }
-};
-
//--------------------------------------------------------------------------
LLTipHandler::LLTipHandler(e_notification_type type, const LLSD& id)
{
@@ -156,28 +125,7 @@ bool LLTipHandler::processNotification(const LLSD& notify)
return true;
}
- LLToastPanel* notify_box = NULL;
- // TODO: this should be implemented in LLToastPanel::buidPanelFromNotification
- if("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName())
- {
- LLOnlineStatusToast::Params p;
- p.notification = notification;
- p.message = notification->getMessage();
- p.avatar_id = notification->getPayload()["FROM_ID"];
- notify_box = new LLOnlineStatusToast(p);
- }
- else
- {
- notify_box = LLToastPanel::buidPanelFromNotification(notification);
- }
-
- // TODO: this if statement should be removed after modification of
- // LLToastPanel::buidPanelFromNotification() to allow create generic tip panel
- // for all tip notifications except FriendOnline and FriendOffline
- if (notify_box == NULL)
- {
- notify_box = new LLToastNotifyPanel(notification);
- }
+ LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification);
LLToast::Params p;
p.notif_id = notification->getID();