From 669dd6adbe29cdbd77d75e7d371a9733be785ea4 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Apr 2021 01:23:04 +0300 Subject: [PATCH 01/12] SL-14906 Open Guidebook floater on first login --- indra/newview/llstartup.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index ba39cf083d..b7606f7f23 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1905,9 +1905,14 @@ bool idle_startup() // on with this install. gSavedSettings.setBOOL("ShowStartLocation", TRUE); - // Open Conversation floater on first login. - LLFloaterReg::toggleInstanceOrBringToFront("im_container"); + LLFloaterWebContent::Params p; + std::string url = gSavedSettings.getString("GuidebookURL"); + p.url = LLWeb::expandURLSubstitutions(url, LLSD()); + p.show_chrome = false; + p.show_page_title = false; + p.preferred_media_size = LLRect(0, 500, 300, 0); + LLFloaterReg::toggleInstanceOrBringToFront("how_to", p); } display_startup(); From 96daac0ab458a3e1cd425ee4b580470e6b02416f Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 15 Apr 2021 17:34:21 +0300 Subject: [PATCH 02/12] SL-15118 Search link in People floater should open Search but not submit a search. --- indra/newview/skins/default/xui/en/panel_people.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 3c8a2fe4f4..50035fd0e3 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -36,7 +36,7 @@ Looking for places with more people? [secondlife:///app/floater/destinations Destination Guide] has locations chosen by Second Life staff. -[secondlife:///app/search/people Search] lets you search all of Second Life for certain keywords. +[secondlife:///app/search/ Search] lets you search all of Second Life for certain keywords. From 3780c86538ee667bb74f0a70bcf870ec554eda75 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Apr 2021 00:01:57 +0300 Subject: [PATCH 03/12] SL-15028 Move guidebook code into own flaoter To help with dispatcher and unify code --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterhowto.cpp | 66 ++++++++++++++++++++++++++++ indra/newview/llfloaterhowto.h | 51 +++++++++++++++++++++ indra/newview/llstartup.cpp | 9 +--- indra/newview/llviewerfloaterreg.cpp | 3 +- indra/newview/llviewermenu.cpp | 9 +--- 6 files changed, 123 insertions(+), 17 deletions(-) create mode 100644 indra/newview/llfloaterhowto.cpp create mode 100644 indra/newview/llfloaterhowto.h diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 456fcdf574..405b4e09ba 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -255,6 +255,7 @@ set(viewer_SOURCE_FILES llfloaterhandler.cpp llfloaterhelpbrowser.cpp llfloaterhoverheight.cpp + llfloaterhowto.cpp llfloaterhud.cpp llfloaterimagepreview.cpp llfloaterimsessiontab.cpp @@ -890,6 +891,7 @@ set(viewer_HEADER_FILES llfloaterhandler.h llfloaterhelpbrowser.h llfloaterhoverheight.h + llfloaterhowto.h llfloaterhud.h llfloaterimagepreview.h llfloaterimnearbychat.h diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp new file mode 100644 index 0000000000..d6c4ed1b20 --- /dev/null +++ b/indra/newview/llfloaterhowto.cpp @@ -0,0 +1,66 @@ +/** + * @file llfloaterhowto.cpp + * @brief A variant of web floater meant to open guidebook + * + * $LicenseInfo:firstyear=2021&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2021, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterhowto.h" + +#include "llfloaterreg.h" +#include "llviewercontrol.h" +#include "llweb.h" + + +LLFloaterHowTo::LLFloaterHowTo(const Params& key) : + LLFloaterWebContent(key) +{ + mShowPageTitle = false; +} + +BOOL LLFloaterHowTo::postBuild() +{ + LLFloaterWebContent::postBuild(); + + return TRUE; +} + +void LLFloaterHowTo::onOpen(const LLSD& key) +{ + LLFloaterWebContent::Params p(key); + if (!p.url.isProvided() || p.url.getValue().empty()) + { + std::string url = gSavedSettings.getString("GuidebookURL"); + p.url = LLWeb::expandURLSubstitutions(url, LLSD()); + p.show_chrome = false; + p.preferred_media_size = LLRect(0, 500, 300, 0); + } + + LLFloaterWebContent::onOpen(p); +} + +LLFloaterHowTo* LLFloaterHowTo::getInstance() +{ + return LLFloaterReg::getTypedInstance("how_to"); +} diff --git a/indra/newview/llfloaterhowto.h b/indra/newview/llfloaterhowto.h new file mode 100644 index 0000000000..e08d102e2a --- /dev/null +++ b/indra/newview/llfloaterhowto.h @@ -0,0 +1,51 @@ +/** + * @file llfloaterhowto.h + * @brief A variant of web floater meant to open guidebook + * + * $LicenseInfo:firstyear=2021&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2021, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERHOWTO_H +#define LL_LLFLOATERHOWTO_H + +#include "llfloaterwebcontent.h" + +class LLMediaCtrl; + + +class LLFloaterHowTo : + public LLFloaterWebContent +{ +public: + + LLFloaterHowTo(const Params& key); + + /*virtual*/ void onOpen(const LLSD& key); + + static LLFloaterHowTo* getInstance(); + +private: + /*virtual*/ BOOL postBuild(); +}; + +#endif // LL_LLFLOATERHOWTO_H + diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index b7606f7f23..486c33cb43 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1905,14 +1905,7 @@ bool idle_startup() // on with this install. gSavedSettings.setBOOL("ShowStartLocation", TRUE); - LLFloaterWebContent::Params p; - std::string url = gSavedSettings.getString("GuidebookURL"); - p.url = LLWeb::expandURLSubstitutions(url, LLSD()); - p.show_chrome = false; - p.show_page_title = false; - p.preferred_media_size = LLRect(0, 500, 300, 0); - - LLFloaterReg::toggleInstanceOrBringToFront("how_to", p); + LLFloaterReg::toggleInstanceOrBringToFront("how_to"); } display_startup(); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 46ff441719..de184392f9 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -76,6 +76,7 @@ #include "llfloatergroups.h" #include "llfloaterhelpbrowser.h" #include "llfloaterhoverheight.h" +#include "llfloaterhowto.h" #include "llfloaterhud.h" #include "llfloaterimagepreview.h" #include "llfloaterimsession.h" @@ -362,7 +363,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); - LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 78f6f23bc5..8ae245b924 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7746,14 +7746,7 @@ class LLToggleHowTo : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloaterWebContent::Params p; - std::string url = gSavedSettings.getString("GuidebookURL"); - p.url = LLWeb::expandURLSubstitutions(url, LLSD()); - p.show_chrome = false; - p.show_page_title = false; - p.preferred_media_size = LLRect(0, 500, 300, 0); - - LLFloaterReg::toggleInstanceOrBringToFront("how_to", p); + LLFloaterReg::toggleInstanceOrBringToFront("how_to"); return true; } }; From 8cd5d7c58a10a9d3c35af95048b3fbc994c72301 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Apr 2021 00:36:10 +0300 Subject: [PATCH 04/12] SL-14906 More adjustments to guidebook The Guidebook should remember it's open/closed state between sessions. The Guidebook button should show as pressed while the Guidebook is open. --- indra/newview/app_settings/commands.xml | 6 ++++-- indra/newview/llviewermenu.cpp | 8 -------- indra/newview/skins/default/xui/en/floater_how_to.xml | 1 + 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 9a4ab8b44b..91841b970d 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -88,8 +88,10 @@ icon="Command_HowTo_Icon" label_ref="Command_HowTo_Label" tooltip_ref="Command_HowTo_Tooltip" - execute_function="Help.ToggleHowTo" - is_running_function="Help.HowToVisible" + execute_function="Floater.ToggleOrBringToFront" + execute_parameters="how_to" + is_running_function="Floater.IsOpen" + is_running_parameters="how_to" /> Date: Tue, 20 Apr 2021 14:48:13 +0300 Subject: [PATCH 05/12] SL-15028 Update menu items on the login screen --- indra/newview/skins/default/xui/en/menu_login.xml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 07b3cc3bd8..96fac1c6e8 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -57,19 +57,12 @@ tear_off="true" name="Help"> - - - Date: Tue, 20 Apr 2021 20:00:42 +0300 Subject: [PATCH 06/12] SL-14906 Fix LLFloaterHowTo overriding stored position preferred_media_size was repositioning the floater --- indra/newview/llfloaterhowto.cpp | 21 ++++++++++++------- .../skins/default/xui/en/floater_how_to.xml | 6 ++---- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp index d6c4ed1b20..665955c946 100644 --- a/indra/newview/llfloaterhowto.cpp +++ b/indra/newview/llfloaterhowto.cpp @@ -33,6 +33,9 @@ #include "llweb.h" +const S32 STACK_WIDTH = 300; +const S32 STACK_HEIGHT = 505; // content will be 500 + LLFloaterHowTo::LLFloaterHowTo(const Params& key) : LLFloaterWebContent(key) { @@ -49,15 +52,19 @@ BOOL LLFloaterHowTo::postBuild() void LLFloaterHowTo::onOpen(const LLSD& key) { LLFloaterWebContent::Params p(key); - if (!p.url.isProvided() || p.url.getValue().empty()) - { - std::string url = gSavedSettings.getString("GuidebookURL"); - p.url = LLWeb::expandURLSubstitutions(url, LLSD()); - p.show_chrome = false; - p.preferred_media_size = LLRect(0, 500, 300, 0); - } + std::string url = gSavedSettings.getString("GuidebookURL"); + p.url = LLWeb::expandURLSubstitutions(url, LLSD()); + p.show_chrome = false; LLFloaterWebContent::onOpen(p); + + // Elements from LLFloaterWebContent did not pick up restored size (save_rect) of LLFloaterHowTo + // set the stack size and position (alternative to preferred_media_size) + LLLayoutStack *stack = getChild("stack1"); + LLRect stack_rect = stack->getRect(); + stack->reshape(STACK_WIDTH, STACK_HEIGHT); + stack->setOrigin(stack_rect.mLeft, stack_rect.mTop - STACK_HEIGHT); + stack->updateLayout(); } LLFloaterHowTo* LLFloaterHowTo::getInstance() diff --git a/indra/newview/skins/default/xui/en/floater_how_to.xml b/indra/newview/skins/default/xui/en/floater_how_to.xml index c06ff7be28..b4dd2e252f 100644 --- a/indra/newview/skins/default/xui/en/floater_how_to.xml +++ b/indra/newview/skins/default/xui/en/floater_how_to.xml @@ -4,14 +4,12 @@ can_resize="false" can_minimize="false" can_close="false" - height="775" + height="525" layout="topleft" - top="0" - min_width="335" name="floater_how_to" single_instance="true" save_visibility="true" save_rect="true" title="WELCOME ISLAND GUIDEBOOK" - width="780" + width="310" filename="floater_web_content.xml"/> \ No newline at end of file From bf5ae51d2e4d0e998fd2dae023d893b8213e8549 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 21 Apr 2021 01:22:06 +0300 Subject: [PATCH 07/12] SL-14842 Clear history button was in wrong menu --- .../default/xui/en/menu_teleport_history_gear.xml | 11 ----------- .../default/xui/en/menu_teleport_history_item.xml | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml index 0b75fd781a..c11d668698 100644 --- a/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml @@ -28,15 +28,4 @@ function="TeleportHistory.GearMenu.Enable" parameter="collapse_all" /> - - - - - diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml index 153e5a70a9..f60f02f040 100644 --- a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml @@ -49,4 +49,15 @@ function="TeleportHistory.GearMenu.Enable" parameter="copy_slurl" /> + + + + + From b9fa5d55b50739238ff4cfa8ce0f581b519de13f Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 21 Apr 2021 12:07:31 +0300 Subject: [PATCH 08/12] Revert "SL-14632 FIXED The viewer is crashed after deleting the new favorite folder" --- indra/newview/llviewerinventory.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 2b200c17c1..bbed741a33 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1422,11 +1422,6 @@ void remove_inventory_category( LLNotificationsUtil::add("CannotRemoveProtectedCategories"); return; } - const LLUUID fav_id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE); - if ((cat_id == fav_id) || gInventory.isObjectDescendentOf(fav_id, cat_id)) - { - gSavedPerAccountSettings.setString("FavoritesFolder", ""); - } AISAPI::completion_t cr = boost::bind(&doInventoryCb, cb, _1); AISAPI::RemoveCategory(cat_id, cr); } @@ -1466,12 +1461,6 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) LLPointer cat = gInventory.getCategory(id); if (cat.notNull()) { - const LLUUID fav_id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE); - if ((id == fav_id) || gInventory.isObjectDescendentOf(fav_id, id)) - { - gSavedPerAccountSettings.setString("FavoritesFolder", ""); - } - if (LLClipboard::instance().hasContents()) { // Remove items from clipboard or it will remain active even if there is nothing to paste/copy From b1fad32e8b50fc7bb09a45f3454c24d6efeb4b15 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 21 Apr 2021 12:08:24 +0300 Subject: [PATCH 09/12] Revert "SL-14633 FIXED The item from the favorite tab in the inventory floater can be purged" --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index a0c3608107..d6c662557f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -987,7 +987,7 @@ void LLInvFVBridge::addTrashContextMenuOptions(menuentry_vec_t &items, } } items.push_back(std::string("Purge Item")); - if (!isItemRemovable() || isPanelActive("Favorite Items")) + if (!isItemRemovable()) { disabled_items.push_back(std::string("Purge Item")); } From 2c88c74276ffd67ef511e4c3dabbf8e7c676b641 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 21 Apr 2021 12:12:04 +0300 Subject: [PATCH 10/12] Revert "SL-12475 add Inventory Favorites tab" --- indra/llui/llfolderview.h | 2 - .../app_settings/settings_per_account.xml | 11 -- indra/newview/llinventorybridge.cpp | 56 ++-------- indra/newview/llinventorymodel.cpp | 5 - indra/newview/llinventorypanel.cpp | 102 ------------------ indra/newview/llinventorypanel.h | 23 ---- indra/newview/llpanelmaininventory.cpp | 12 +-- indra/newview/llpanelmaininventory.h | 2 - .../skins/default/xui/en/menu_inventory.xml | 14 --- .../default/xui/en/panel_main_inventory.xml | 40 +++---- .../newview/skins/default/xui/en/strings.xml | 3 +- 11 files changed, 25 insertions(+), 245 deletions(-) diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index c175034d75..6bb5e6c02e 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -241,8 +241,6 @@ public: void dumpSelectionInformation(); virtual S32 notify(const LLSD& info) ; - - void setShowEmptyMessage(bool show_msg) { mShowEmptyMessage = show_msg; } bool useLabelSuffix() { return mUseLabelSuffix; } virtual void updateMenu(); diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 3d77ac43e5..537744b44c 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -403,17 +403,6 @@ Value - FavoritesFolder - - Comment - User's chosen folder which will be shown in the Favorites tab (UUID) - Persist - 1 - Type - String - Value - - SnapshotBaseDir Comment diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d6c662557f..8b61e6c61a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -138,35 +138,6 @@ bool isMarketplaceSendAction(const std::string& action) return ("send_to_marketplace" == action); } -bool isPanelActive(const std::string& panel_name) -{ - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); - return (active_panel && (active_panel->getName() == panel_name)); -} - -bool isParentSystemFolder(const LLInventoryModel* model, const LLUUID& folder_id) -{ - if (!model || folder_id.isNull()) return false; - - LLViewerInventoryCategory* cat = model->getCategory(folder_id); - if (cat) - { - if (cat->getPreferredType() == LLFolderType::FT_ROOT_INVENTORY) - { - return false; - } - if (LLFolderType::lookupIsProtectedType(cat->getPreferredType())) - { - return true; - } - else - { - return isParentSystemFolder(model, cat->getParentUUID()); - } - } - return false; -} - // Used by LLFolderBridge as callback for directory fetching recursion class LLRightClickInventoryFetchDescendentsObserver : public LLInventoryFetchDescendentsObserver { @@ -917,7 +888,8 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Properties")); } - if (!isPanelActive("All Items")) + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + if (active_panel && (active_panel->getName() != "All Items")) { items.push_back(std::string("Show in Main Panel")); } @@ -1008,7 +980,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items, items.push_back(std::string("Delete")); - if (!isItemRemovable() || isPanelActive("Favorite Items")) + if (!isItemRemovable()) { disabled_items.push_back(std::string("Delete")); } @@ -4021,7 +3993,6 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); disabled_items.push_back(std::string("upload_def")); - disabled_items.push_back(std::string("Set Favorites folder")); } if (favorites == mUUID) { @@ -4049,7 +4020,6 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); disabled_items.push_back(std::string("upload_def")); - disabled_items.push_back(std::string("Set Favorites folder")); } if (marketplace_listings_id == mUUID) { @@ -4058,14 +4028,14 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("Cut")); disabled_items.push_back(std::string("Delete")); } - - if (isPanelActive("Favorite Items")) - { - disabled_items.push_back(std::string("Delete")); - } if(trash_id == mUUID) { - bool is_recent_panel = isPanelActive("Recent Items"); + bool is_recent_panel = false; + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + if (active_panel && (active_panel->getName() == "Recent Items")) + { + is_recent_panel = true; + } // This is the trash. items.push_back(std::string("Empty Trash")); @@ -4115,14 +4085,6 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("New Settings")); items.push_back(std::string("upload_def")); - 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")); - } if (!LLEnvironment::instance().isInventoryEnabled()) { disabled_items.push_back("New Settings"); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 48187c6179..28db6a5808 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -543,11 +543,6 @@ const LLUUID LLInventoryModel::findUserDefinedCategoryUUIDForType(LLFolderType:: cat_id = LLUUID(gSavedPerAccountSettings.getString("AnimationUploadFolder")); break; } - case LLFolderType::FT_FAVORITE: - { - cat_id = LLUUID(gSavedPerAccountSettings.getString("FavoritesFolder")); - break; - } default: break; } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index cda39c716b..3608f9e23f 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -181,8 +181,6 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); 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 ) @@ -1473,16 +1471,6 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata) } } -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; @@ -1864,96 +1852,6 @@ LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params) mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER; } -static LLDefaultChildRegistry::Register t_favorites_inventory_panel("favorites_inventory_panel"); - -LLInventoryFavoriteItemsPanel::LLInventoryFavoriteItemsPanel(const Params& params) - : LLInventoryPanel(params) -{ - std::string ctrl_name = "FavoritesFolder"; - if (gSavedPerAccountSettings.controlExists(ctrl_name)) - { - LLPointer cntrl_ptr = gSavedPerAccountSettings.getControl(ctrl_name); - if (cntrl_ptr.notNull()) - { - mFolderChangedSignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&LLInventoryFavoriteItemsPanel::updateFavoritesRootFolder, this)); - } - } -} - -void LLInventoryFavoriteItemsPanel::setSelectCallback(const boost::function& items, BOOL user_action)>& cb) -{ - if (mFolderRoot.get()) - { - mFolderRoot.get()->setSelectCallback(cb); - mSelectionCallback = cb; - } -} - -void LLInventoryFavoriteItemsPanel::initFromParams(const Params& p) -{ - Params fav_params(p); - fav_params.start_folder.id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE); - LLInventoryPanel::initFromParams(fav_params); - updateFavoritesRootFolder(); -} - -void LLInventoryFavoriteItemsPanel::updateFavoritesRootFolder() -{ - const LLUUID& folder_id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE); - - bool is_favorites_set = (folder_id != gInventory.findCategoryUUIDForTypeInRoot(LLFolderType::FT_FAVORITE, true, gInventory.getRootFolderID())); - - if (!is_favorites_set || folder_id != getRootFolderID()) - { - LLUUID root_id = folder_id; - if (mFolderRoot.get()) - { - removeItemID(getRootFolderID()); - mFolderRoot.get()->destroyView(); - } - - mCommitCallbackRegistrar.pushScope(); - { - LLFolderView* folder_view = createFolderRoot(root_id); - mFolderRoot = folder_view->getHandle(); - - addItemID(root_id, mFolderRoot.get()); - - - LLRect scroller_view_rect = getRect(); - scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); - LLScrollContainer::Params scroller_params(mParams.scroll()); - scroller_params.rect(scroller_view_rect); - - if (mScroller) - { - removeChild(mScroller); - delete mScroller; - mScroller = NULL; - } - mScroller = LLUICtrlFactory::create(scroller_params); - addChild(mScroller); - mScroller->addChild(mFolderRoot.get()); - mFolderRoot.get()->setScrollContainer(mScroller); - mFolderRoot.get()->setFollowsAll(); - mFolderRoot.get()->addChild(mFolderRoot.get()->mStatusTextBox); - - if (!mSelectionCallback.empty()) - { - mFolderRoot.get()->setSelectCallback(mSelectionCallback); - } - } - mCommitCallbackRegistrar.popScope(); - mFolderRoot.get()->setCallbackRegistrar(&mCommitCallbackRegistrar); - - if (is_favorites_set) - { - buildNewViews(folder_id); - } - mFolderRoot.get()->setShowEmptyMessage(!is_favorites_set); - } -} - /************************************************************************/ /* Asset Pre-Filtered Inventory Panel related class */ /************************************************************************/ diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index e6d23eb649..a019fc2231 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -220,8 +220,6 @@ public: void doCreate(const LLSD& userdata); 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); @@ -369,27 +367,6 @@ private: EViewsInitializationState mViewsInitialized; // Whether views have been generated }; - -class LLInventoryFavoriteItemsPanel : public LLInventoryPanel -{ -public: - struct Params : public LLInitParam::Block - {}; - - void initFromParams(const Params& p); - bool isSelectionRemovable() { return false; } - void setSelectCallback(const boost::function& items, BOOL user_action)>& cb); - -protected: - LLInventoryFavoriteItemsPanel(const Params& params); - ~LLInventoryFavoriteItemsPanel() { mFolderChangedSignal.disconnect(); } - void updateFavoritesRootFolder(); - - boost::signals2::connection mFolderChangedSignal; - boost::function& items, BOOL user_action)> mSelectionCallback; - friend class LLUICtrlFactory; -}; - /************************************************************************/ /* Asset Pre-Filtered Inventory Panel related class */ /* Exchanges filter's flexibility for speed of generation and */ diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index d9138091c6..e9c9c451a2 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -190,16 +190,6 @@ BOOL LLPanelMainInventory::postBuild() worn_filter.markDefault(); mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2)); } - - mFavoriteItemsPanel = getChild("Favorite Items"); - if (mFavoriteItemsPanel) - { - LLInventoryFilter& recent_filter = mFavoriteItemsPanel->getFilter(); - recent_filter.setEmptyLookupMessage("InventoryFavoritItemsNotSelected"); - recent_filter.markDefault(); - mFavoriteItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mFavoriteItemsPanel, _1, _2)); - } - mSearchTypeCombo = getChild("search_type"); if(mSearchTypeCombo) { @@ -1449,7 +1439,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } if (command_name == "delete") { - return getActivePanel()->isSelectionRemovable() && (getActivePanel() != mFavoriteItemsPanel); + return getActivePanel()->isSelectionRemovable(); } if (command_name == "save_texture") { diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 313e478bfe..dfb8db9d12 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -37,7 +37,6 @@ class LLComboBox; class LLFolderViewItem; class LLInventoryPanel; -class LLInventoryFavoriteItemsPanel; class LLSaveFolderState; class LLFilterEditor; class LLTabContainer; @@ -138,7 +137,6 @@ private: LLHandle mFinderHandle; LLInventoryPanel* mActivePanel; LLInventoryPanel* mWornItemsPanel; - LLInventoryFavoriteItemsPanel* mFavoriteItemsPanel; bool mResortActivePanel; LLSaveFolderState* mSavedFolderState; std::string mFilterText; diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index b5cde602bd..eda9739976 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -393,20 +393,6 @@ parameter="model" /> - - - - - - - - + + Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]. - Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters]. - 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. + Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters]. To add a place to your landmarks, click the star to the right of the location name. To add a place to your favorites bar, click the star to the right of the location name. No items found. Check the spelling of your search string and try again. From 297b81b03ad1e01339735e612dbf17f131019403 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 21 Apr 2021 15:39:01 +0300 Subject: [PATCH 11/12] SL-15028 Update GuidebookURL setting --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 25627e61ae..943062c127 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4734,7 +4734,7 @@ Type String Value - https://guidebooks.secondlife.io/welcome + http://guidebooks.secondlife.io/welcome/index.html HighResSnapshot From 0ed270a0569e205f837f84773f5e72ab3b46d01b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 21 Apr 2021 01:37:28 +0300 Subject: [PATCH 12/12] SL-14842 Landmarks created by '+' menu always starting in favorites --- indra/newview/llpanellandmarks.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 4b73412e60..769b060d93 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -499,6 +499,12 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const { args["dest_folder"] = view_model->getUUID(); } + if ("add_landmark_root" == command_name + && mCurrentSelectedList == mLandmarksInventoryPanel) + { + args["dest_folder"] = mLandmarksInventoryPanel->getRootFolderID(); + } + // else will end up in favorites LLFloaterReg::showInstance("add_landmark", args); } }