summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermarketplacelistings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatermarketplacelistings.cpp')
-rwxr-xr-xindra/newview/llfloatermarketplacelistings.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp
index 9bbe63de72..dcf27baae7 100755
--- a/indra/newview/llfloatermarketplacelistings.cpp
+++ b/indra/newview/llfloatermarketplacelistings.cpp
@@ -59,6 +59,7 @@ LLPanelMarketplaceListings::LLPanelMarketplaceListings()
BOOL LLPanelMarketplaceListings::postBuild()
{
mAllPanel = getChild<LLInventoryPanel>("All Items");
+ childSetAction("add_btn", boost::bind(&LLPanelMarketplaceListings::onAddButtonClicked, this));
// Set the sort order newest to oldest
LLInventoryPanel* panel = getChild<LLInventoryPanel>("All Items");
@@ -87,6 +88,16 @@ void LLPanelMarketplaceListings::draw()
LLPanel::draw();
}
+void LLPanelMarketplaceListings::onAddButtonClicked()
+{
+ LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, true);
+ llassert(marketplacelistings_id.notNull());
+ LLFolderType::EType preferred_type = LLFolderType::lookup("category");
+ LLUUID category = gInventory.createNewCategory(marketplacelistings_id, preferred_type, LLStringUtil::null);
+ gInventory.notifyObservers();
+ mAllPanel->setSelectionByID(category, TRUE);
+}
+
void LLPanelMarketplaceListings::onViewSortMenuItemClicked(const LLSD& userdata)
{
std::string chosen_item = userdata.asString();