From aba8b04cfc6763ee565a5ae9929e8be044272b08 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Mon, 16 Nov 2009 18:51:54 +0200 Subject: fix of a normal bug (EXT-2448) [BSI] Notification toasts should resize when text is to long to be displayed A maximum number of characters for textbox/texteditor could be set only through XML. In case when a corresponding attribute was absent - the maximun number was set to 255, and there were no chance (no function) to change it. So in this fix such a function was added. --HG-- branch : product-engine --- indra/newview/lltoastnotifypanel.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/lltoastnotifypanel.cpp') diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 0c23947a8c..48b68e4292 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -128,6 +128,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()); -- cgit v1.2.3 From 4dc294e6dc6a88201ccb2dce76eab25ca936e062 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Wed, 18 Nov 2009 18:36:10 +0200 Subject: fixed low bug (EXT-2552) Building of notification toast's panel produces a creation of dummy icon removed commented code from XML file removed from toast notify panel Icon member and a corresponding code --HG-- branch : product-engine --- indra/newview/lltoastnotifypanel.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'indra/newview/lltoastnotifypanel.cpp') diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 48b68e4292..699424ef36 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -48,7 +48,6 @@ const LLFontGL* LLToastNotifyPanel::sFontSmall = NULL; LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification) : LLToastPanel(notification), mTextBox(NULL), -mIcon(NULL), mInfoPanel(NULL), mControlPanel(NULL), mNumOptions(0), @@ -58,7 +57,6 @@ mAddedDefaultBtn(false) LLUICtrlFactory::getInstance()->buildPanel(this, "panel_notification.xml"); mInfoPanel = getChild("info_panel"); mControlPanel = getChild("control_panel"); - mIcon = getChild("info_icon"); // customize panel's attributes // is it intended for displaying a tip @@ -94,26 +92,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) -- cgit v1.2.3