summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmarketplaceinbox.cpp
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-10-19 13:04:54 -0400
committerLogan Dethrow <log@lindenlab.com>2011-10-19 13:04:54 -0400
commit77876a3c4f18b480f9afd17be57b123d2e5f1e84 (patch)
tree04b31f26cceef5cc411b166d30eb694707d995aa /indra/newview/llpanelmarketplaceinbox.cpp
parente0f6e449594c44511d9634ea54faf54f8fe5cb7c (diff)
parentdd61baa3401a09bd8ff1e894514c15390946cdb3 (diff)
Merged with viewer-development.
Diffstat (limited to 'indra/newview/llpanelmarketplaceinbox.cpp')
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 0579ecbb90..ac528947a4 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -32,6 +32,7 @@
#include "llappviewer.h"
#include "llbutton.h"
#include "llinventorypanel.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llsidepanelinventory.h"
#include "llviewercontrol.h"
@@ -58,8 +59,6 @@ LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
// virtual
BOOL LLPanelMarketplaceInbox::postBuild()
{
- LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLPanelMarketplaceInbox::handleLoginComplete, this));
-
LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this));
return TRUE;
@@ -67,18 +66,12 @@ BOOL LLPanelMarketplaceInbox::postBuild()
void LLPanelMarketplaceInbox::onSelectionChange()
{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+ LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
sidepanel_inventory->updateVerbs();
}
-void LLPanelMarketplaceInbox::handleLoginComplete()
-{
- // Set us up as the class to drive the badge value for the sidebar_inventory button
- LLSideTray::getInstance()->setTabButtonBadgeDriver("sidebar_inventory", this);
-}
-
LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel()
{
LLView * inbox_inventory_placeholder = getChild<LLView>("inbox_inventory_placeholder");
@@ -113,9 +106,11 @@ LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel()
void LLPanelMarketplaceInbox::onFocusReceived()
{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- sidepanel_inventory->clearSelections(true, false, true);
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->clearSelections(true, false, true);
+ }
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
@@ -186,9 +181,10 @@ std::string LLPanelMarketplaceInbox::getBadgeString() const
{
std::string item_count_str("");
+ LLPanel *inventory_panel = LLFloaterSidePanelContainer::getPanel("inventory");
+
// If the inbox is visible, and the side panel is collapsed or expanded and not the inventory panel
- if (getParent()->getVisible() &&
- (LLSideTray::getInstance()->getCollapsed() || !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")))
+ if (getParent()->getVisible() && inventory_panel && !inventory_panel->isInVisibleChain())
{
U32 item_count = getFreshItemCount();