diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2009-12-16 17:11:41 +0200 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2009-12-16 17:11:41 +0200 |
commit | ffcf4dee5268f34e0e2782bc85509cdcf4c3810b (patch) | |
tree | 34af1fd2a388dc8f08d8150a58981b91d5a952d9 /indra/newview | |
parent | 9dd2b290318f657b3dca81278f597cc702a6e149 (diff) |
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
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelpicks.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llpanelpicks.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_picks.xml | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 4 |
4 files changed, 29 insertions, 8 deletions
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 - </text> + width="313"/> <accordion fit_parent="true" follows="all" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 2f50c5ee6c..0aefc15090 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2074,6 +2074,10 @@ this texture in your inventory <!-- panel classified --> <string name="ClassifiedClicksTxt">Clicks: [TELEPORT] teleport, [MAP] map, [PROFILE] profile</string> <string name="ClassifiedUpdateAfterPublish">(will update after publish)</string> + + <!-- panel picks --> + <string name="NoPicksClassifiedsText">There are no picks/classifieds here</string> + <string name="PicksClassifiedsLoadingText">Loading...</string> <!-- Multi Preview Floater --> <string name="MultiPreviewTitle">Preview</string> |