diff options
Diffstat (limited to 'indra/newview/llnotificationtiphandler.cpp')
-rw-r--r-- | indra/newview/llnotificationtiphandler.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 1f1afe293a..e528f871af 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -41,10 +41,11 @@ #include "llviewercontrol.h" #include "llviewerwindow.h" #include "llnotificationmanager.h" +#include "llpaneltiptoast.h" using namespace LLNotificationsUI; -class LLOnlineStatusToast : public LLToastPanel +class LLOnlineStatusToast : public LLPanelTipToast { public: @@ -57,7 +58,7 @@ public: Params() {} }; - LLOnlineStatusToast(Params& p) : LLToastPanel(p.notification) + LLOnlineStatusToast(Params& p) : LLPanelTipToast(p.notification) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_online_status_toast.xml"); @@ -71,8 +72,8 @@ public: p.notification->getResponseTemplate())); } - // set line max count to 2 in case of a very long name - snapToMessageHeight(getChild<LLTextBox>("message"), 2); + // set line max count to 3 in case of a very long name + snapToMessageHeight(getChild<LLTextBox>("message"), 3); } }; @@ -157,6 +158,7 @@ bool LLTipHandler::processNotification(const LLSD& notify) } LLToastPanel* notify_box = NULL; + // TODO: this should be implemented in LLToastPanel::buidPanelFromNotification if("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) { LLOnlineStatusToast::Params p; @@ -167,6 +169,14 @@ bool LLTipHandler::processNotification(const LLSD& notify) } 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); } |