From d6e22a75791e6e82b1b4f4dad045e5b53129fe8d Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 8 Dec 2009 10:03:34 +0200 Subject: Fixed major bug EXT-3191 (Crash after dragging inventory item to avatar or IM floater) Reason: Null pointer to cargo data was passed from LLToolDragAndDrop::dragOrDrop in this case. Fix: added check against NULL of the LLToolDragAndDrop::locateInventory() result in the LLToolDragAndDrop::dragOrDrop(). The same checking presents in another place of the LLToolDragAndDrop::dragOrDrop(). Handling is interrupted in this case. Thanks Andrew ProductEngine for provided call stack --HG-- branch : product-engine --- indra/newview/lltooldraganddrop.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 2d0a14dc70..aa35f22930 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -772,6 +772,9 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, { LLInventoryObject* cargo = locateInventory(item, cat); + // fix for EXT-3191 + if (NULL == cargo) return; + EAcceptance item_acceptance = ACCEPT_NO; handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, mCargoTypes[mCurItemIndex], -- cgit v1.2.3 From d4cfcfc7ce1a9ab2488942077df2a6bfc9bf11bf Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 8 Dec 2009 11:14:00 +0200 Subject: Work on EXT-3147 (Implement new states for message indicators) -- added possibility to show "99+" when unread messages count exceeds 99 --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 10 ++++++++-- indra/newview/llchiclet.h | 9 +++++++++ indra/newview/skins/default/xui/en/panel_bottomtray.xml | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 4b3b7a99d8..6d37eaed3d 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -81,17 +81,18 @@ boost::signals2::signal(button_params); @@ -108,7 +109,12 @@ void LLSysWellChiclet::setCounter(S32 counter) std::string s_count; if(counter != 0) { - s_count = llformat("%d", counter); + static std::string more_messages_exist("+"); + std::string more_messages(counter > mMaxDisplayedCount ? more_messages_exist : ""); + s_count = llformat("%d%s" + , llmin(counter, mMaxDisplayedCount) + , more_messages.c_str() + ); } mButton->setLabel(s_count); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 609ce16713..598773757e 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -757,6 +757,14 @@ public: Optional unread_notifications; + /** + * Contains maximum displayed count of unread messages. Default value is 9. + * + * If count is less than "max_unread_count" will be displayed as is. + * Otherwise 9+ will be shown (for default value). + */ + Optional max_displayed_count; + Params(); }; @@ -781,6 +789,7 @@ protected: protected: LLButton* mButton; S32 mCounter; + S32 mMaxDisplayedCount; }; /** diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 7f847237ce..c8c5bc688e 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -343,6 +343,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" left="0" + max_displayed_count="99" name="Unread IM messages" pad_left="0" pad_right="0" @@ -369,6 +370,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. height="23" layout="topleft" left="0" + max_displayed_count="99" name="notification_well" top="4" width="34"> -- cgit v1.2.3 From 20d5fafc1cd1598f38e4ecefc11f4ee891afec21 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Tue, 8 Dec 2009 12:01:32 +0200 Subject: Fixed low bug EXT - 3038 (Verb buttons in avatar profile panel don't have tool-tips) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_notes.xml | 5 +++++ indra/newview/skins/default/xui/en/panel_profile.xml | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml index c02dabed2c..9e7c9477d4 100644 --- a/indra/newview/skins/default/xui/en/panel_notes.xml +++ b/indra/newview/skins/default/xui/en/panel_notes.xml @@ -120,6 +120,7 @@ left="0" mouse_opaque="false" name="add_friend" + tool_tip="Offer friendship to the resident" top="5" width="55" />