diff options
-rwxr-xr-x | indra/newview/llfloatermarketplacelistings.cpp | 37 | ||||
-rwxr-xr-x | indra/newview/llinventorypanel.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml | 26 |
3 files changed, 64 insertions, 1 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index ec551aca06..f4e6b3d1ea 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -267,6 +267,7 @@ void LLFloaterMarketplaceListings::setup() { if (LLMarketplaceData::instance().getSLMStatus() != MarketplaceStatusCodes::MARKET_PLACE_MERCHANT) { + //llinfos << "Merov D&D : setup failed: we're not a merchant" << llendl; // If we are *not* a merchant or we have no market place connection established yet, do nothing return; } @@ -276,16 +277,20 @@ void LLFloaterMarketplaceListings::setup() if (marketplacelistings_id.isNull()) { // We should never get there unless the inventory fails badly + //llinfos << "Merov D&D : setup failed: couldn't get to the marketplace listings folder" << llendl; LL_ERRS("SLM") << "Inventory problem: failure to create the marketplace listings folder for a merchant!" << LL_ENDL; return; } - + + //llinfos << "Merov D&D : setup : marketplace listings folder = " << marketplacelistings_id << llendl; + // Consolidate Marketplace listings // We shouldn't have to do that but with a client/server system relying on a "well known folder" convention, things get messy and conventions get broken down eventually gInventory.consolidateForType(marketplacelistings_id, LLFolderType::FT_MARKETPLACE_LISTINGS); if (marketplacelistings_id == mRootFolderId) { + //llinfos << "Merov D&D : setup failed: Marketplace listings folder already set" << llendl; LL_WARNS("SLM") << "Inventory warning: Marketplace listings folder already set" << LL_ENDL; return; } @@ -299,6 +304,32 @@ void LLFloaterMarketplaceListings::setup() mCategoryAddedObserver = NULL; } llassert(!mCategoryAddedObserver); + + // Merov : Hack... + /* + LLInventoryPanel* inventory_panel = mPanelListings->mAllPanel; + LLTabContainer* tabs_panel = getChild<LLTabContainer>("marketplace_filter_tabs"); + if (inventory_panel) + { + tabs_panel->removeTabPanel(inventory_panel); + delete inventory_panel; + } + inventory_panel = LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_marketplace_listings_inventory.xml", tabs_panel, LLInventoryPanel::child_registry_t::instance()); + llassert(inventory_panel != NULL); + + // Reshape to the proper size + //LLRect tabs_panel_rect = tabs_panel->getRect(); + //inventory_panel->setShape(tabs_panel_rect); + + // Set sort order and callbacks + LLInventoryPanel* panel = getChild<LLInventoryPanel>("All Items"); + //panel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_FOLDERS_BY_NAME); + //panel->getFilter().markDefault(); + //panel->setSelectCallback(boost::bind(&LLPanelMarketplaceListings::onSelectionChange, this, panel, _1, _2)); + + mPanelListings->mAllPanel = panel; + */ + // Merov : end hack... // Create observer for marketplace listings modifications : clear the old one and create a new one if (mCategoriesObserver && gInventory.containsObserver(mCategoriesObserver)) @@ -348,6 +379,7 @@ void LLFloaterMarketplaceListings::updateView() // Get or create the root folder if we are a merchant and it hasn't been done already if (mRootFolderId.isNull() && (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT)) { + //llinfos << "Merov D&D : setup from updateView because root folder is null" << llendl; setup(); } @@ -371,6 +403,9 @@ void LLFloaterMarketplaceListings::updateView() } else { + // Merov : Hack... + //mPanelListings->setVisible(TRUE); + //mInventoryPlaceholder->setVisible(FALSE); mPanelListings->setVisible(FALSE); mInventoryPlaceholder->setVisible(TRUE); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 443d243816..2b542a58b1 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -240,6 +240,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) { // Determine the root folder in case specified, and // build the views starting with that folder. + //llinfos << "Merov : panel = " << getName() << ", create folder root id = " << root_id << llendl; LLFolderView* folder_view = createFolderRoot(root_id); mFolderRoot = folder_view->getHandle(); @@ -271,6 +272,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) // otherwise wait for idle callback. if (mInventory->isInventoryUsable() && !mViewsInitialized) { + //llinfos << "Merov : panel = " << getName() << ", initializeViews" << llendl; initializeViews(); } diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml new file mode 100755 index 0000000000..944a42d01c --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<inventory_panel + label="ALL" + name="All Items" + help_topic="marketplace_tab" + start_folder.name="Marketplace listings" + show_empty_message="false" + show_load_status="false" + show_root_folder="true" + start_folder.type="merchant" + follows="all" + layout="topleft" + top="16" + left="0" + height="370" + width="308" + top_pad="0" + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + border="false" + bevel_style="none" + tool_tip="Drag and drop items here to sell them" + show_item_link_overlays="true"> + <item allow_wear="false"/> +</inventory_panel> |