diff options
Diffstat (limited to 'indra/newview')
7 files changed, 32 insertions, 9 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index eb60d706e4..0be79426c1 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -151,6 +151,12 @@ void LLPanelMarketplaceListings::onSelectionChange(LLInventoryPanel *panel, cons panel->onSelectionChange(items, user_action); } +bool LLPanelMarketplaceListings::allowDropOnRoot() +{ + LLInventoryPanel* panel = (LLInventoryPanel*)getChild<LLTabContainer>("marketplace_filter_tabs")->getCurrentPanel(); + return (panel ? panel->getAllowDropOnRoot() : false); +} + void LLPanelMarketplaceListings::onTabChange() { // Find active panel @@ -163,6 +169,19 @@ void LLPanelMarketplaceListings::onTabChange() // Set filter string on active panel panel->setFilterSubString(mFilterSubString); + + // Show/hide the drop zone and resize the inventory tabs panel accordingly + LLPanel* drop_zone = (LLPanel*)getChild<LLPanel>("marketplace_drop_zone"); + bool drop_zone_visible = drop_zone->getVisible(); + if (drop_zone_visible != panel->getAllowDropOnRoot()) + { + LLPanel* tabs = (LLPanel*)getChild<LLPanel>("tab_container_panel"); + S32 delta_height = drop_zone->getRect().getHeight(); + delta_height = (drop_zone_visible ? delta_height : -delta_height); + tabs->reshape(tabs->getRect().getWidth(),tabs->getRect().getHeight() + delta_height); + tabs->translate(0,-delta_height); + } + drop_zone->setVisible(panel->getAllowDropOnRoot()); } } @@ -538,14 +557,17 @@ BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BO // marketplace listings root folder if (!handled || !isAccepted(*accept)) { - if (!mPanelListings->getVisible() && mRootFolderId.notNull()) + if ((LLMarketplaceData::instance().getSLMStatus() >= MarketplaceStatusCodes::MARKET_PLACE_MERCHANT) && mRootFolderId.notNull()) { if (!mPanelListingsSet) { setPanels(); } - LLFolderView* root_folder = mPanelListings->getRootFolder(); - handled = root_folder->handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + if (mPanelListings->allowDropOnRoot()) + { + LLFolderView* root_folder = mPanelListings->getRootFolder(); + handled = root_folder->handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } } } diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index 8a9731dafc..a691872aaa 100755 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -54,6 +54,7 @@ public: BOOL postBuild(); void draw(); LLFolderView* getRootFolder() { return mRootFolder; } + bool allowDropOnRoot(); void buildAllPanels(); diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 4aca88cba1..af274c18f2 100755 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -66,8 +66,8 @@ namespace MarketplaceStatusCodes MARKET_PLACE_NOT_INITIALIZED = 0, MARKET_PLACE_INITIALIZING = 1, MARKET_PLACE_CONNECTION_FAILURE = 2, - MARKET_PLACE_MERCHANT = 3, - MARKET_PLACE_NOT_MERCHANT = 4, + MARKET_PLACE_NOT_MERCHANT = 3, + MARKET_PLACE_MERCHANT = 4, MARKET_PLACE_NOT_MIGRATED_MERCHANT = 5, MARKET_PLACE_MIGRATED_MERCHANT = 6 }; 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 index 567e5e2724..8d5fa265e2 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml @@ -11,7 +11,7 @@ left="0" start_folder.name="Marketplace listings" show_empty_message="true" - show_root_folder="true" + show_root_folder="false" use_marketplace_folders="true" start_folder.type="merchant" tool_tip="Drag and drop items here to list them" diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml index 668be27bdc..44f507ad84 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml @@ -10,7 +10,7 @@ left_delta="0" start_folder.name="Marketplace listings" show_empty_message="true" - show_root_folder="true" + show_root_folder="false" use_marketplace_folders="true" allow_drop_on_root="false" start_folder.type="merchant" diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml index 0015c85aa2..871e8773c4 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml @@ -10,7 +10,7 @@ left_delta="0" start_folder.name="Marketplace listings" show_empty_message="true" - show_root_folder="true" + show_root_folder="false" use_marketplace_folders="true" start_folder.type="merchant" bg_opaque_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml index ec9c176811..98bef04aa7 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml @@ -10,7 +10,7 @@ left_delta="0" start_folder.name="Marketplace listings" show_empty_message="true" - show_root_folder="true" + show_root_folder="false" use_marketplace_folders="true" allow_drop_on_root="false" start_folder.type="merchant" |