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/llpanelpicks.cpp | |
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/llpanelpicks.cpp')
-rw-r--r-- | indra/newview/llpanelpicks.cpp | 21 |
1 files changed, 18 insertions, 3 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() |