diff options
-rwxr-xr-x | indra/newview/llfloatermarketplacelistings.cpp | 10 | ||||
-rwxr-xr-x | indra/newview/llfloatermarketplacelistings.h | 1 | ||||
-rwxr-xr-x | indra/newview/llinventorypanel.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 8d12c98da8..6ed7ae91b3 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -83,6 +83,7 @@ void LLPanelMarketplaceListings::buildAllPanels() panel->getFilter().markDefault(); LLTabContainer* tabs_panel = getChild<LLTabContainer>("marketplace_filter_tabs"); + tabs_panel->setCommitCallback(boost::bind(&LLPanelMarketplaceListings::onTabChange, this)); tabs_panel->selectTabPanel(mAllPanel); } @@ -120,6 +121,15 @@ void LLPanelMarketplaceListings::onSelectionChange(LLInventoryPanel *panel, cons panel->onSelectionChange(items, user_action); } +void LLPanelMarketplaceListings::onTabChange() +{ + LLTabContainer* tabs_panel = getChild<LLTabContainer>("marketplace_filter_tabs"); + LLInventoryPanel* panel = static_cast<LLInventoryPanel*>(tabs_panel->getCurrentPanel()); + // If the panel doesn't allow drop on root, it doesn't allow the creation of new folder on root either + LLButton* add_btn = getChild<LLButton>("add_btn"); + add_btn->setEnabled(panel->getAllowDropOnRoot()); +} + void LLPanelMarketplaceListings::onAddButtonClicked() { LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index c472bfa4c5..1c46220267 100755 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -65,6 +65,7 @@ private: void onAddButtonClicked(); void onAuditButtonClicked(); void onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, BOOL user_action); + void onTabChange(); LLInventoryPanel* mAllPanel; LLInventoryFilter::ESortOrderType mSortOrder; diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 2665ffb0bd..481289286f 100755 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -187,6 +187,7 @@ public: LLFolderView* getRootFolder() { return mFolderRoot.get(); } LLUUID getRootFolderID(); LLScrollContainer* getScrollableContainer() { return mScroller; } + bool getAllowDropOnRoot() { return mParams.allow_drop_on_root; } void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); |