diff options
author | Merov Linden <merov@lindenlab.com> | 2014-03-20 16:39:30 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-03-20 16:39:30 -0700 |
commit | d11a15b6dd0a6bb74b4f8f3f6ce23a05123c7e99 (patch) | |
tree | 05cf4c7c648f3952ade7d8b50472e82dc3bb3fe7 /indra | |
parent | 74c4f3d0e6ab0d5c7dc6b7480ef63b2898e7a6f2 (diff) |
DD-16 : WIP : Update sort / show menu, not actionable yet though
Diffstat (limited to 'indra')
4 files changed, 89 insertions, 1 deletions
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index d6da0ad971..0b02cb8f64 100755 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -667,6 +667,8 @@ LLFloaterMarketplaceListings::LLFloaterMarketplaceListings(const LLSD& key) , mInventoryText(NULL) , mInventoryTitle(NULL) { + mCommitCallbackRegistrar.add("Marketplace.ViewSort.Action", boost::bind(&LLFloaterMarketplaceListings::onViewSortMenuItemClicked, this, _2)); + mEnableCallbackRegistrar.add("Marketplace.ViewSort.CheckItem", boost::bind(&LLFloaterMarketplaceListings::onViewSortMenuItemCheck, this, _2)); } LLFloaterMarketplaceListings::~LLFloaterMarketplaceListings() @@ -772,6 +774,40 @@ void LLFloaterMarketplaceListings::onFocusReceived() fetchContents(); } + +void LLFloaterMarketplaceListings::onViewSortMenuItemClicked(const LLSD& userdata) +{ + /* + std::string chosen_item = userdata.asString(); + + if (chosen_item == "sort_by_stock_amount") + { + setSortOrder(mNearbyList, E_SORT_BY_RECENT_SPEAKERS); + } + else if (chosen_item == "show_low_stock") + { + mNearbyList->toggleIcons(); + } + */ +} + +bool LLFloaterMarketplaceListings::onViewSortMenuItemCheck(const LLSD& userdata) +{ + /* + std::string item = userdata.asString(); + U32 sort_order = gSavedSettings.getU32("NearbyPeopleSortOrder"); + + if (item == "sort_by_recent_speakers") + return sort_order == E_SORT_BY_RECENT_SPEAKERS; + if (item == "sort_name") + return sort_order == E_SORT_BY_NAME; + if (item == "sort_distance") + return sort_order == E_SORT_BY_DISTANCE; + */ + return false; +} + + void LLFloaterMarketplaceListings::fetchContents() { if (mRootFolderId.notNull()) diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index eba3e4217b..3da7c6c985 100755 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -160,6 +160,9 @@ protected: private: S32 getFolderCount(); + // UI callbacks + void onViewSortMenuItemClicked(const LLSD& userdata); + bool onViewSortMenuItemCheck(const LLSD& userdata); LLInventoryCategoriesObserver * mCategoriesObserver; LLInventoryCategoryAddedObserver * mCategoryAddedObserver; diff --git a/indra/newview/skins/default/xui/en/menu_marketplace_view.xml b/indra/newview/skins/default/xui/en/menu_marketplace_view.xml new file mode 100755 index 0000000000..6d31ff4960 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_marketplace_view.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_group_plus" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_check + label="Sort by stock amount (low to high)" + name="sort_by_stock_amount"> + <menu_item_check.on_click + function="Marketplace.ViewSort.Action" + parameter="sort_by_stock_amount"/> + <menu_item_check.on_check + function="Marketplace.ViewSort.CheckItem" + parameter="sort_by_stock_amount"/> + </menu_item_check> + <menu_item_separator layout="topleft" /> + <menu_item_check name="show_low_stock" label="Show Low Stock Listings Only"> + <menu_item_check.on_click + function="Marketplace.ViewSort.Action" + parameter="show_low_stock" /> + <menu_item_check.on_check + function="Marketplace.ViewSort.CheckItem" + parameter="show_low_stock" /> + </menu_item_check> + <menu_item_check name="show_associated_listings" label="Show Associated Listings Only"> + <menu_item_check.on_click + function="Marketplace.ViewSort.Action" + parameter="show_associated_listings" /> + <menu_item_check.on_check + function="Marketplace.ViewSort.CheckItem" + parameter="show_associated_listings" /> + </menu_item_check> + <menu_item_check name="show_non_associated_listings" label="Show Non Associated Listings Only"> + <menu_item_check.on_click + function="Marketplace.ViewSort.Action" + parameter="show_non_associated_listings" /> + <menu_item_check.on_check + function="Marketplace.ViewSort.CheckItem" + parameter="show_non_associated_listings" /> + </menu_item_check> + <menu_item_check name="show_active" label="Show Active Listings and Folders Only"> + <menu_item_check.on_click + function="Marketplace.ViewSort.Action" + parameter="show_active" /> + <menu_item_check.on_check + function="Marketplace.ViewSort.CheckItem" + parameter="show_active" /> + </menu_item_check> +</toggleable_menu> 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 3c184ba54b..54fc3a0c0f 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 @@ -23,7 +23,7 @@ width="31" height="25" left="2" - menu_filename="menu_people_nearby_view.xml" + menu_filename="menu_marketplace_view.xml" image_hover_unselected="Toolbar_Middle_Over" image_overlay="Conv_toolbar_sort" image_selected="Toolbar_Middle_Selected" |