diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2011-08-12 14:53:25 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2011-08-12 14:53:25 -0700 |
commit | 10ec0049125317d5c0bdd1bf89b96a54a9b2d873 (patch) | |
tree | 97efa1a6731aef7e703e1a6ca2eaa4a01dbb6fa8 /indra/newview/llpanelmarketplaceoutbox.cpp | |
parent | e69efc8369a65008d41155717761fbaec0e309c5 (diff) | |
parent | 25f1653ca0a25c73b3c0649ee5bb7c65e5378eac (diff) |
merge from viewer-experience
Diffstat (limited to 'indra/newview/llpanelmarketplaceoutbox.cpp')
-rw-r--r-- | indra/newview/llpanelmarketplaceoutbox.cpp | 92 |
1 files changed, 39 insertions, 53 deletions
diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index d2f1282c8f..88feb05114 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -87,24 +87,7 @@ void LLPanelMarketplaceOutbox::onFocusReceived() { LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory"); - if (sidepanel_inventory) - { - LLInventoryPanel * inv_panel = sidepanel_inventory->getActivePanel(); - - if (inv_panel) - { - inv_panel->clearSelection(); - } - - LLInventoryPanel * inbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox"); - - if (inbox_panel) - { - inbox_panel->clearSelection(); - } - - sidepanel_inventory->updateVerbs(); - } + sidepanel_inventory->clearSelections(true, true, false); } void LLPanelMarketplaceOutbox::onSelectionChange() @@ -114,7 +97,7 @@ void LLPanelMarketplaceOutbox::onSelectionChange() sidepanel_inventory->updateVerbs(); } -void LLPanelMarketplaceOutbox::setupInventoryPanel() +LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel() { LLView * outbox_inventory_placeholder = getChild<LLView>("outbox_inventory_placeholder"); LLView * outbox_inventory_parent = outbox_inventory_placeholder->getParent(); @@ -123,7 +106,7 @@ void LLPanelMarketplaceOutbox::setupInventoryPanel() LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_outbox_inventory.xml", outbox_inventory_parent, LLInventoryPanel::child_registry_t::instance()); - + llassert(mInventoryPanel); // Reshape the inventory to the proper size @@ -139,6 +122,8 @@ void LLPanelMarketplaceOutbox::setupInventoryPanel() // Hide the placeholder text outbox_inventory_placeholder->setVisible(FALSE); + + return mInventoryPanel; } BOOL LLPanelMarketplaceOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, @@ -213,6 +198,7 @@ public: { // Complete success llinfos << "success" << llendl; + } else { @@ -227,7 +213,7 @@ private: }; void LLPanelMarketplaceOutbox::onSyncButtonClicked() -{ +{ // Get the sync animation going mSyncInProgress = true; updateSyncButtonStatus(); @@ -281,39 +267,39 @@ void LLPanelMarketplaceOutbox::updateSyncButtonStatus() } } -U32 LLPanelMarketplaceOutbox::getTotalItemCount() const
-{
- U32 item_count = 0;
-
- if (mInventoryPanel)
- {
- const LLFolderViewFolder * outbox_folder = mInventoryPanel->getRootFolder();
-
- if (outbox_folder)
- {
- item_count += outbox_folder->getFoldersCount();
- }
- }
-
- return item_count;
-}
+U32 LLPanelMarketplaceOutbox::getTotalItemCount() const +{ + U32 item_count = 0; + + if (mInventoryPanel) + { + const LLFolderViewFolder * outbox_folder = mInventoryPanel->getRootFolder(); + + if (outbox_folder) + { + item_count += outbox_folder->getFoldersCount(); + } + } + + return item_count; +} void LLPanelMarketplaceOutbox::draw() { - U32 item_count = getTotalItemCount();
-
- if (item_count > 0)
- {
- std::string item_count_str = llformat("%d", item_count);
-
- LLStringUtil::format_map_t args;
- args["[NUM]"] = item_count_str;
- getChild<LLButton>("outbox_btn")->setLabel(getString("OutboxLabelWithArg", args));
- }
- else
- {
- getChild<LLButton>("outbox_btn")->setLabel(getString("OutboxLabelNoArg"));
- }
-
- LLPanel::draw();
+ U32 item_count = getTotalItemCount(); + + if (item_count > 0) + { + std::string item_count_str = llformat("%d", item_count); + + LLStringUtil::format_map_t args; + args["[NUM]"] = item_count_str; + getChild<LLButton>("outbox_btn")->setLabel(getString("OutboxLabelWithArg", args)); + } + else + { + getChild<LLButton>("outbox_btn")->setLabel(getString("OutboxLabelNoArg")); + } + + LLPanel::draw(); } |