diff options
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_inventory.xml | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 2 |
5 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 0e7e762d81..065a3cb9ae 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4115,7 +4115,11 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("New Settings")); items.push_back(std::string("upload_def")); - if (!LLFolderType::lookupIsProtectedType(getPreferredType()) && !isParentSystemFolder(model, mUUID)) + if (model->findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE) == mUUID) + { + items.push_back(std::string("Reset Favorites folder")); + } + else if (!LLFolderType::lookupIsProtectedType(getPreferredType()) && !isParentSystemFolder(model, mUUID)) { items.push_back(std::string("Set Favorites folder")); } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index bca3cc0cf7..cda39c716b 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -182,6 +182,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2)); mCommitCallbackRegistrar.add("Inventory.SetFavoritesFolder", boost::bind(&LLInventoryPanel::setFavoritesFolder, this, _2)); + mCommitCallbackRegistrar.add("Inventory.ResetFavoritesFolder", boost::bind(&LLInventoryPanel::resetFavoritesFolder, this, _2)); } LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id ) @@ -1477,6 +1478,11 @@ void LLInventoryPanel::setFavoritesFolder(const LLSD& userdata) gSavedPerAccountSettings.setString("FavoritesFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); } +void LLInventoryPanel::resetFavoritesFolder(const LLSD& userdata) +{ + gSavedPerAccountSettings.setString("FavoritesFolder", ""); +} + void LLInventoryPanel::purgeSelectedItems() { if (!mFolderRoot.get()) return; diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 9d6d56dd69..e6d23eb649 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -221,6 +221,7 @@ public: bool beginIMSession(); void fileUploadLocation(const LLSD& userdata); void setFavoritesFolder(const LLSD& userdata); + void resetFavoritesFolder(const LLSD& userdata); void purgeSelectedItems(); bool attachObject(const LLSD& userdata); static void idle(void* user_data); diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index e7782a4ca0..b5cde602bd 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -400,6 +400,13 @@ <menu_item_call.on_click function="Inventory.SetFavoritesFolder"/> </menu_item_call> + <menu_item_call + label="Reset Favorites folder" + layout="topleft" + name="Reset Favorites folder"> + <menu_item_call.on_click + function="Inventory.ResetFavoritesFolder"/> + </menu_item_call> <menu label="Change Type" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c2b5286fc3..20ef10f172 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2297,7 +2297,7 @@ For AI Character: Get the closest navigable point to the point provided. <!-- inventory --> <string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string> <string name="InventoryNoMatchingRecentItems">Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters].</string> - <string name="InventoryFavoritItemsNotSelected">Click "Use as Favorites folder" on a folder of your choice. You can choose a different folder at any time. System folders cannot be used for Favorites.</string> + <string name="InventoryFavoritItemsNotSelected">Click "Use as Favorites folder" on a folder of your choice. You can choose a different folder at any time. System folders and folders inside them cannot be used for Favorites.</string> <string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string> <string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string> <string name="MarketplaceNoMatchingItems">No items found. Check the spelling of your search string and try again.</string> |