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.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 6905c7e546..4abb60dded 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -32,12 +32,15 @@
#include "llviewerprecompiledheaders.h"
+#include "llpanelpicks.h"
+
#include "llagent.h"
#include "llagentpicksinfo.h"
#include "llavatarconstants.h"
#include "llflatlistview.h"
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
+#include "llnotificationsutil.h"
#include "lltexturectrl.h"
#include "lltoggleablemenu.h"
#include "llviewergenericmessage.h" // send_generic_message
@@ -47,7 +50,6 @@
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
-#include "llpanelpicks.h"
#include "llavatarpropertiesprocessor.h"
#include "llpanelavatar.h"
#include "llpanelprofile.h"
@@ -230,6 +232,8 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
updateButtons();
}
}
+ if(!mPicksList->size() && !mClassifiedsList->size())
+ childSetVisible("empty_picks_panel_text", true);
}
LLPickItem* LLPanelPicks::getSelectedPickItem()
@@ -346,11 +350,18 @@ void LLPanelPicks::onAccordionStateChanged(const LLAccordionCtrlTab* acc_tab)
void LLPanelPicks::onOverflowButtonClicked()
{
- LLRect rect;
- childGetRect(XML_BTN_OVERFLOW, rect);
+ if (!mOverflowMenu->toggleVisibility())
+ return;
+ LLView* btn = getChild<LLView>(XML_BTN_OVERFLOW);
+
+ if (mOverflowMenu->getButtonRect().isEmpty())
+ {
+ mOverflowMenu->setButtonRect(btn);
+ }
mOverflowMenu->updateParent(LLMenuGL::sMenuContainer);
- mOverflowMenu->setButtonRect(rect, this);
+
+ LLRect rect = btn->getRect();
LLMenuGL::showPopup(this, mOverflowMenu, rect.mRight, rect.mTop);
}
@@ -422,7 +433,7 @@ void LLPanelPicks::onClickDelete()
{
LLSD args;
args["PICK"] = value[PICK_NAME];
- LLNotifications::instance().add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeletePick, this, _1, _2));
+ LLNotificationsUtil::add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeletePick, this, _1, _2));
return;
}
@@ -431,14 +442,14 @@ void LLPanelPicks::onClickDelete()
{
LLSD args;
args["NAME"] = value[CLASSIFIED_NAME];
- LLNotifications::instance().add("DeleteClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeleteClassified, this, _1, _2));
+ LLNotificationsUtil::add("DeleteClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeleteClassified, this, _1, _2));
return;
}
}
bool LLPanelPicks::callbackDeletePick(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLSD pick_value = mPicksList->getSelectedValue();
if (0 == option)
@@ -452,7 +463,7 @@ bool LLPanelPicks::callbackDeletePick(const LLSD& notification, const LLSD& resp
bool LLPanelPicks::callbackDeleteClassified(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLSD value = mClassifiedsList->getSelectedValue();
if (0 == option)
@@ -466,7 +477,7 @@ bool LLPanelPicks::callbackDeleteClassified(const LLSD& notification, const LLSD
bool LLPanelPicks::callbackTeleport( const LLSD& notification, const LLSD& response )
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
@@ -531,7 +542,7 @@ void LLPanelPicks::onDoubleClickPickItem(LLUICtrl* item)
LLSD args;
args["PICK"] = pick_value[PICK_NAME];
- LLNotifications::instance().add("TeleportToPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
+ LLNotificationsUtil::add("TeleportToPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
}
void LLPanelPicks::onDoubleClickClassifiedItem(LLUICtrl* item)
@@ -541,7 +552,7 @@ void LLPanelPicks::onDoubleClickClassifiedItem(LLUICtrl* item)
LLSD args;
args["CLASSIFIED"] = value[CLASSIFIED_NAME];
- LLNotifications::instance().add("TeleportToClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
+ LLNotificationsUtil::add("TeleportToClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
}
void LLPanelPicks::updateButtons()