summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpicks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelpicks.cpp')
-rw-r--r--indra/newview/llpanelpicks.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 0a13180c73..4d22d96072 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"
@@ -216,7 +217,9 @@ LLPanelPicks::LLPanelPicks()
mClassifiedsAccTab(NULL),
mPanelClassifiedInfo(NULL),
mPanelClassifiedEdit(NULL),
- mClickThroughDisp(NULL)
+ mClickThroughDisp(NULL),
+ mNoClassifieds(false),
+ mNoPicks(false)
{
mClickThroughDisp = new LLClassifiedClickThrough();
gGenericDispatcher.addHandler("classifiedclickthrough", mClickThroughDisp);
@@ -242,6 +245,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());
@@ -302,6 +310,8 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
resetDirty();
updateButtons();
}
+
+ mNoPicks = !mPicksList->size();
}
else if(APT_CLASSIFIEDS == type)
{
@@ -335,9 +345,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()