From ffcf4dee5268f34e0e2782bc85509cdcf4c3810b Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Wed, 16 Dec 2009 17:11:41 +0200 Subject: Fixed low bug EXT-3188 ("There are no picks/classfields here" message should appear in "Picks" tab after the server response and not to). - added "Loading..." message - changed condition on which "There are no picks/classfields here" is shown and moved message string to strings.xml --HG-- branch : product-engine --- indra/newview/llpanelpicks.cpp | 21 ++++++++++++++++++--- indra/newview/llpanelpicks.h | 5 +++++ indra/newview/skins/default/xui/en/panel_picks.xml | 7 ++----- indra/newview/skins/default/xui/en/strings.xml | 4 ++++ 4 files changed, 29 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 498782fb44..8e89d845ae 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -45,6 +45,7 @@ #include "llnotificationsutil.h" #include "lltexturectrl.h" #include "lltoggleablemenu.h" +#include "lltrans.h" #include "llviewergenericmessage.h" // send_generic_message #include "llmenugl.h" #include "llviewermenu.h" @@ -198,7 +199,9 @@ LLPanelPicks::LLPanelPicks() mClassifiedsAccTab(NULL), mPanelClassifiedInfo(NULL), mPanelClassifiedEdit(NULL), - mClickThroughDisp(NULL) + mClickThroughDisp(NULL), + mNoClassifieds(false), + mNoPicks(false) { mClickThroughDisp = new LLClassifiedClickThrough(); gGenericDispatcher.addHandler("classifiedclickthrough", mClickThroughDisp); @@ -224,6 +227,11 @@ void LLPanelPicks::updateData() // Send Picks request only when we need to, not on every onOpen(during tab switch). if(isDirty()) { + mNoPicks = false; + mNoClassifieds = false; + + childSetValue("picks_panel_text", LLTrans::getString("PicksClassifiedsLoadingText")); + mPicksList->clear(); LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId()); @@ -284,6 +292,8 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) resetDirty(); updateButtons(); } + + mNoPicks = !mPicksList->size(); } else if(APT_CLASSIFIEDS == type) { @@ -317,9 +327,14 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) resetDirty(); updateButtons(); } + + mNoClassifieds = !mClassifiedsList->size(); + } + + if (mNoPicks && mNoClassifieds) + { + childSetValue("picks_panel_text", LLTrans::getString("NoPicksClassifiedsText")); } - if(!mPicksList->size() && !mClassifiedsList->size()) - childSetVisible("empty_picks_panel_text", true); } LLPickItem* LLPanelPicks::getSelectedPickItem() diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h index 893a0c53a3..2a284513ef 100644 --- a/indra/newview/llpanelpicks.h +++ b/indra/newview/llpanelpicks.h @@ -156,6 +156,11 @@ private: LLAccordionCtrlTab* mClassifiedsAccTab; LLClassifiedClickThrough* mClickThroughDisp; + + //true if picks list is empty after processing picks + bool mNoPicks; + //true if classifieds list is empty after processing classifieds + bool mNoClassifieds; }; class LLPickItem : public LLPanel, public LLAvatarPropertiesObserver diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index 4facedc7ea..2230229b14 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -20,12 +20,9 @@ height="535" layout="topleft" left="6" - name="empty_picks_panel_text" + name="picks_panel_text" top="10" - visible="false" - width="313"> - There are no picks/classifieds here - + width="313"/> Clicks: [TELEPORT] teleport, [MAP] map, [PROFILE] profile (will update after publish) + + + There are no picks/classifieds here + Loading... Preview -- cgit v1.2.3