Skip to content
Snippets Groups Projects
Commit 2a031df7 authored by Merov Linden's avatar Merov Linden
Browse files

DD-12, DD-19 : Add a button to create a new listing folder. Also added a...

DD-12, DD-19 : Add a button to create a new listing folder. Also added a validate button though it does nothing ATM
parent 253781f8
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,7 @@ LLPanelMarketplaceListings::LLPanelMarketplaceListings() ...@@ -59,6 +59,7 @@ LLPanelMarketplaceListings::LLPanelMarketplaceListings()
BOOL LLPanelMarketplaceListings::postBuild() BOOL LLPanelMarketplaceListings::postBuild()
{ {
mAllPanel = getChild<LLInventoryPanel>("All Items"); mAllPanel = getChild<LLInventoryPanel>("All Items");
childSetAction("add_btn", boost::bind(&LLPanelMarketplaceListings::onAddButtonClicked, this));
// Set the sort order newest to oldest // Set the sort order newest to oldest
LLInventoryPanel* panel = getChild<LLInventoryPanel>("All Items"); LLInventoryPanel* panel = getChild<LLInventoryPanel>("All Items");
...@@ -87,6 +88,16 @@ void LLPanelMarketplaceListings::draw() ...@@ -87,6 +88,16 @@ void LLPanelMarketplaceListings::draw()
LLPanel::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) void LLPanelMarketplaceListings::onViewSortMenuItemClicked(const LLSD& userdata)
{ {
std::string chosen_item = userdata.asString(); std::string chosen_item = userdata.asString();
......
...@@ -54,6 +54,7 @@ class LLPanelMarketplaceListings : public LLPanel ...@@ -54,6 +54,7 @@ class LLPanelMarketplaceListings : public LLPanel
// UI callbacks // UI callbacks
void onViewSortMenuItemClicked(const LLSD& userdata); void onViewSortMenuItemClicked(const LLSD& userdata);
bool onViewSortMenuItemCheck(const LLSD& userdata); bool onViewSortMenuItemCheck(const LLSD& userdata);
void onAddButtonClicked();
LLInventoryPanel* mAllPanel; LLInventoryPanel* mAllPanel;
LLInventoryFilter::ESortOrderType mSortOrder; LLInventoryFilter::ESortOrderType mSortOrder;
......
...@@ -28,6 +28,30 @@ ...@@ -28,6 +28,30 @@
image_selected="Toolbar_Middle_Selected" image_selected="Toolbar_Middle_Selected"
image_unselected="Toolbar_Middle_Off" image_unselected="Toolbar_Middle_Off"
menu_position="bottomleft"/> menu_position="bottomleft"/>
<button
name="add_btn"
tool_tip="Create a new listing folder"
layout="topleft"
follows="top|left"
width="31"
height="25"
left_pad="2"
image_hover_unselected="Toolbar_Middle_Over"
image_overlay="Conv_toolbar_plus"
image_selected="Toolbar_Middle_Selected"
image_unselected="Toolbar_Middle_Off"/>
<button
name="audit_btn"
tool_tip="Validate your marketplace listings"
layout="topleft"
follows="top|left"
width="31"
height="25"
left_pad="2"
image_hover_unselected="Toolbar_Middle_Over"
image_overlay="Info"
image_selected="Toolbar_Middle_Selected"
image_unselected="Toolbar_Middle_Off"/>
</panel> </panel>
<panel <panel
name="tab_container_panel" name="tab_container_panel"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment