summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastnotifypanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
-rw-r--r--indra/newview/lltoastnotifypanel.cpp28
1 files changed, 6 insertions, 22 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 0c23947a8c..6b9bff7b9e 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -33,7 +33,12 @@
#include "llviewerprecompiledheaders.h"
#include "lltoastnotifypanel.h"
+
+// project includes
#include "llviewercontrol.h"
+
+// library includes
+#include "llnotifications.h"
#include "lluiconstants.h"
#include "llrect.h"
#include "lltrans.h"
@@ -48,7 +53,6 @@ const LLFontGL* LLToastNotifyPanel::sFontSmall = NULL;
LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification) :
LLToastPanel(notification),
mTextBox(NULL),
-mIcon(NULL),
mInfoPanel(NULL),
mControlPanel(NULL),
mNumOptions(0),
@@ -58,7 +62,6 @@ mAddedDefaultBtn(false)
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_notification.xml");
mInfoPanel = getChild<LLPanel>("info_panel");
mControlPanel = getChild<LLPanel>("control_panel");
- mIcon = getChild<LLIconCtrl>("info_icon");
// customize panel's attributes
// is it intended for displaying a tip
@@ -94,26 +97,6 @@ mAddedDefaultBtn(false)
// preliminary adjust panel's layout
mIsTip ? adjustPanelForTipNotice() : adjustPanelForScriptNotice(form);
- // choose a right icon
- if (mIsTip)
- {
- // use the tip notification icon
- mIcon->setValue("notify_tip_icon.tga");
- LLRect icon_rect = mIcon->getRect();
- icon_rect.setLeftTopAndSize(icon_rect.mLeft, getRect().getHeight() - VPAD, icon_rect.getWidth(), icon_rect.getHeight());
- mIcon->setRect(icon_rect);
- }
- else if (mIsCaution)
- {
- // use the caution notification icon
- mIcon->setValue("notify_caution_icon.tga");
- }
- else
- {
- // use the default notification icon
- mIcon->setValue("notify_box_icon.tga");
- }
-
// adjust text options according to the notification type
// add a caution textbox at the top of a caution notification
if (mIsCaution && !mIsTip)
@@ -128,6 +111,7 @@ mAddedDefaultBtn(false)
// *TODO: magic numbers(???) - copied from llnotify.cpp(250)
const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE;
+ mTextBox->setMaxTextLength(MAX_LENGTH);
mTextBox->setVisible(TRUE);
mTextBox->setValue(notification->getMessage());