From 85c24a489dd0550db253f442fc5e22a6494b7cd7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 6 Feb 2017 13:04:22 +0200 Subject: [PATCH 001/116] MAINT-7104 Add Grid status floater and toolbar button --- indra/newview/CMakeLists.txt | 2 + indra/newview/app_settings/commands.xml | 10 +++ indra/newview/app_settings/settings.xml | 16 ++++ indra/newview/llfloatergridstatus.cpp | 84 +++++++++++++++++++ indra/newview/llfloatergridstatus.h | 56 +++++++++++++ indra/newview/llviewerfloaterreg.cpp | 2 + .../skins/default/textures/textures.xml | 1 + .../default/xui/en/floater_grid_status.xml | 18 ++++ .../newview/skins/default/xui/en/strings.xml | 2 + 9 files changed, 191 insertions(+) create mode 100644 indra/newview/llfloatergridstatus.cpp create mode 100644 indra/newview/llfloatergridstatus.h create mode 100644 indra/newview/skins/default/xui/en/floater_grid_status.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9ac1c3520d..dbec4b5d65 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -236,6 +236,7 @@ set(viewer_SOURCE_FILES llfloatergesture.cpp llfloatergodtools.cpp llfloatergotoline.cpp + llfloatergridstatus.cpp llfloatergroupbulkban.cpp llfloatergroupinvite.cpp llfloatergroups.cpp @@ -852,6 +853,7 @@ set(viewer_HEADER_FILES llfloatergesture.h llfloatergodtools.h llfloatergotoline.h + llfloatergridstatus.h llfloatergroupbulkban.h llfloatergroupinvite.h llfloatergroups.h diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 9bc0a7c701..64cd11a53a 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -292,4 +292,14 @@ is_running_function="Floater.IsOpen" is_running_parameters="reporter" /> + diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 717deba8c7..e96401b511 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15125,6 +15125,22 @@ 0 + GridStatusFloaterRect + + Comment + Web profile floater dimensions + Persist + 1 + Type + Rect + Value + + 0 + 520 + 625 + 0 + + HelpFloaterOpen Comment diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp new file mode 100644 index 0000000000..a12f717a25 --- /dev/null +++ b/indra/newview/llfloatergridstatus.cpp @@ -0,0 +1,84 @@ +/** + * @file llfloatergridstatus.cpp + * @brief Grid status floater - uses an embedded web browser to show Grid status info + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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 "llfloatergridstatus.h" + +#include "llhttpconstants.h" +#include "llmediactrl.h" +#include "llviewercontrol.h" + + +LLFloaterGridStatus::LLFloaterGridStatus(const Params& key) : + LLFloaterWebContent(key) +{ +} + +BOOL LLFloaterGridStatus::postBuild() +{ + LLFloaterWebContent::postBuild(); + mWebBrowser->addObserver(this); + + return TRUE; +} + +void LLFloaterGridStatus::onOpen(const LLSD& key) +{ + Params p(key); + p.trusted_content = true; + p.allow_address_entry = false; + + LLFloaterWebContent::onOpen(p); + applyPreferredRect(); + if (mWebBrowser) + { + std::string url = "http://secondlife-status.statuspage.io/"; + mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + } +} +// virtual +void LLFloaterGridStatus::handleReshape(const LLRect& new_rect, bool by_user) +{ + if (by_user && !isMinimized()) + { + gSavedSettings.setRect("GridStatusFloaterRect", new_rect); + } + + LLFloaterWebContent::handleReshape(new_rect, by_user); +} + +void LLFloaterGridStatus::applyPreferredRect() +{ + const LLRect preferred_rect = gSavedSettings.getRect("GridStatusFloaterRect"); + + // Don't override position that may have been set by floater stacking code. + LLRect new_rect = getRect(); + new_rect.setLeftTopAndSize( + new_rect.mLeft, new_rect.mTop, + preferred_rect.getWidth(), preferred_rect.getHeight()); + setShape(new_rect); +} diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h new file mode 100644 index 0000000000..045c647f4a --- /dev/null +++ b/indra/newview/llfloatergridstatus.h @@ -0,0 +1,56 @@ +/** + * @file llfloatergridstatus.h + * @brief Grid status floater - uses an embedded web browser to show Grid status info + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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_LLFLOATERGRIDSTATUS_H +#define LL_LLFLOATERGRIDSTATUS_H + +#include "llfloaterwebcontent.h" +#include "llviewermediaobserver.h" + +#include + +class LLMediaCtrl; + + +class LLFloaterGridStatus : + public LLFloaterWebContent +{ +public: + typedef LLSDParamAdapter<_Params> Params; + + LLFloaterGridStatus(const Params& key); + + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); + +private: + /*virtual*/ BOOL postBuild(); + + void applyPreferredRect(); +}; + +#endif // LL_LLFLOATERGRIDSTATUS_H + diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index ec7a81584a..46525e8455 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -70,6 +70,7 @@ #include "llfloaterfonttest.h" #include "llfloatergesture.h" #include "llfloatergodtools.h" +#include "llfloatergridstatus.h" #include "llfloatergroups.h" #include "llfloaterhelpbrowser.h" #include "llfloaterhoverheight.h" @@ -231,6 +232,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("gestures", "floater_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("god_tools", "floater_god_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("grid_status", "floater_grid_status.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("group_picker", "floater_choose_group.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 760c294f90..bd8c0d5a96 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -136,6 +136,7 @@ with the same filename but different name + diff --git a/indra/newview/skins/default/xui/en/floater_grid_status.xml b/indra/newview/skins/default/xui/en/floater_grid_status.xml new file mode 100644 index 0000000000..b97bd8056d --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_grid_status.xml @@ -0,0 +1,18 @@ + + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index b75f631799..6f00f1731e 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4070,6 +4070,7 @@ Try enclosing path to the editor with double quotes. Facebook Flickr Gestures + Grid status How to Inventory Map @@ -4102,6 +4103,7 @@ Try enclosing path to the editor with double quotes. Post to Facebook Upload to Flickr Gestures for your avatar + Show current Grid status How to do common tasks View and use your belongings Map of the world From 85d05c71306489d92212cd5f3e166eff540d8da1 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 13 Feb 2017 11:04:42 +0200 Subject: [PATCH 002/116] MAINT-5556 Active listing folder stays listed, with empty Version folder --- indra/newview/llinventorybridge.cpp | 44 +++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b7f5424f25..6cb7ce622f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -275,8 +275,10 @@ BOOL LLInvFVBridge::cutToClipboard() if (cut_from_marketplacelistings && (LLMarketplaceData::instance().isInActiveFolder(mUUID) || LLMarketplaceData::instance().isListedAndActive(mUUID))) { - // Prompt the user if cutting from a marketplace active listing - LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLInvFVBridge::callback_cutToClipboard, this, _1, _2)); + LLUUID parent_uuid = obj->getParentUUID(); + BOOL result = perform_cutToClipboard(); + gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, parent_uuid); + return result; } else { @@ -303,11 +305,7 @@ BOOL LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) // YES { - const LLInventoryObject* obj = gInventory.getObject(mUUID); - LLUUID parent_uuid = obj->getParentUUID(); - BOOL result = perform_cutToClipboard(); - gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, parent_uuid); - return result; + return perform_cutToClipboard(); } return FALSE; } @@ -3471,7 +3469,24 @@ void LLFolderBridge::pasteFromClipboard() const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); const BOOL paste_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - if (paste_into_marketplacelistings && !LLMarketplaceData::instance().isListed(mUUID) && LLMarketplaceData::instance().isInActiveFolder(mUUID)) + BOOL cut_from_marketplacelistings = FALSE; + if (LLClipboard::instance().isCutMode()) + { + //Items are not removed from folder on "cut", so we need update listing folder on "paste" operation + std::vector objects; + LLClipboard::instance().pasteFromClipboard(objects); + for (std::vector::const_iterator iter = objects.begin(); iter != objects.end(); ++iter) + { + const LLUUID& item_id = (*iter); + if(gInventory.isObjectDescendentOf(item_id, marketplacelistings_id) && (LLMarketplaceData::instance().isInActiveFolder(item_id) || + LLMarketplaceData::instance().isListedAndActive(item_id))) + { + cut_from_marketplacelistings = TRUE; + break; + } + } + } + if (cut_from_marketplacelistings || (paste_into_marketplacelistings && !LLMarketplaceData::instance().isListed(mUUID) && LLMarketplaceData::instance().isInActiveFolder(mUUID))) { // Prompt the user if pasting in a marketplace active version listing (note that pasting right under the listing folder root doesn't need a prompt) LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_pasteFromClipboard, this, _1, _2)); @@ -3490,7 +3505,20 @@ void LLFolderBridge::callback_pasteFromClipboard(const LLSD& notification, const S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) // YES { + std::vector objects; + std::set parent_folders; + LLClipboard::instance().pasteFromClipboard(objects); + for (std::vector::const_iterator iter = objects.begin(); iter != objects.end(); ++iter) + { + const LLInventoryObject* obj = gInventory.getObject(*iter); + parent_folders.insert(obj->getParentUUID()); + } perform_pasteFromClipboard(); + for (std::set::const_iterator iter = parent_folders.begin(); iter != parent_folders.end(); ++iter) + { + gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, *iter); + } + } } From 1c0a2f87790ca0df8af11f4e5d592723d22d14ea Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 13 Feb 2017 15:50:46 +0200 Subject: [PATCH 003/116] MAINT-299 Fixed Inventory not mentioning additional inventory shortcut --- .../newview/skins/default/xui/en/menu_inventory_gear_default.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml index 61cc9dfe77..d95541df80 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml @@ -9,6 +9,7 @@ Date: Mon, 13 Feb 2017 20:15:26 +0200 Subject: [PATCH 004/116] MAINT-397 Teleport offers are not received after disabling "do not disturb" mode --- indra/newview/llviewermessage.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d81cb804e4..579eacc315 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3038,16 +3038,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { return; } - else if (is_do_not_disturb) - { - send_do_not_disturb_message(msg, from_id); - } else if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL)) { return; } else { + if (is_do_not_disturb) + { + send_do_not_disturb_message(msg, from_id); + } + LLVector3 pos, look_at; U64 region_handle(0); U8 region_access(SIM_ACCESS_MIN); From 67edb011b5b803c21652c9735e03a387f26a77d5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 14 Feb 2017 13:37:45 +0200 Subject: [PATCH 005/116] MAINT-7104 Flash toolbar when grid status page is updated --- indra/newview/app_settings/commands.xml | 1 + indra/newview/app_settings/settings.xml | 33 ++++ indra/newview/llfloatergridstatus.cpp | 152 +++++++++++++++--- indra/newview/llfloatergridstatus.h | 15 ++ indra/newview/llstartup.cpp | 3 + .../skins/default/textures/textures.xml | 2 +- .../textures/toolbar_icons/grid_status.png | Bin 0 -> 483 bytes 7 files changed, 179 insertions(+), 27 deletions(-) create mode 100644 indra/newview/skins/default/textures/toolbar_icons/grid_status.png diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 64cd11a53a..412d3a53b3 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -294,6 +294,7 @@ /> Value http://wiki.secondlife.com/wiki/[LSL_STRING] + GridStatusRSS + + Comment + URL that points to SL Grid Status RSS + Persist + 1 + Type + String + Value + https://secondlife-status.statuspage.io/history.atom + + GridStatusUpdateDelay + + Comment + Timer delay for updating Grid Status RSS. + Persist + 1 + Type + F32 + Value + 60.0 + + TestGridStatusRSSFromFile + + Comment + For testing only: Don't update rss xml file from server. + Persist + 1 + Type + Boolean + Value + 0 + LagMeterShrunk Comment diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index a12f717a25..3429203afe 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -28,57 +28,157 @@ #include "llfloatergridstatus.h" +#include "llcallbacklist.h" +#include "llcorehttputil.h" +#include "llfloaterreg.h" #include "llhttpconstants.h" #include "llmediactrl.h" +#include "llsdserialize.h" +#include "lltoolbarview.h" #include "llviewercontrol.h" +#include "llxmltree.h" +std::map LLFloaterGridStatus::sItemsMap; +const std::string DEFAULT_GRID_STATUS_URL = "http://secondlife-status.statuspage.io/"; LLFloaterGridStatus::LLFloaterGridStatus(const Params& key) : - LLFloaterWebContent(key) + LLFloaterWebContent(key), + mIsFirstUpdate(TRUE) { } BOOL LLFloaterGridStatus::postBuild() { - LLFloaterWebContent::postBuild(); - mWebBrowser->addObserver(this); + LLFloaterWebContent::postBuild(); + mWebBrowser->addObserver(this); - return TRUE; + return TRUE; } void LLFloaterGridStatus::onOpen(const LLSD& key) { - Params p(key); - p.trusted_content = true; - p.allow_address_entry = false; + Params p(key); + p.trusted_content = true; + p.allow_address_entry = false; - LLFloaterWebContent::onOpen(p); - applyPreferredRect(); - if (mWebBrowser) - { - std::string url = "http://secondlife-status.statuspage.io/"; - mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); - } + LLFloaterWebContent::onOpen(p); + applyPreferredRect(); + if (mWebBrowser) + { + mWebBrowser->navigateTo(DEFAULT_GRID_STATUS_URL, HTTP_CONTENT_TEXT_HTML); + } } + +void LLFloaterGridStatus::startGridStatusTimer() +{ + checkGridStatusRSS(); + doPeriodically(boost::bind(&LLFloaterGridStatus::checkGridStatusRSS), gSavedSettings.getF32("GridStatusUpdateDelay")); +} + +bool LLFloaterGridStatus::checkGridStatusRSS() +{ + if(gToolBarView->hasCommand(LLCommandId("gridstatus"))) + { + LLCoros::instance().launch("LLFloaterGridStatus::getGridStatusRSSCoro", + boost::bind(&LLFloaterGridStatus::getGridStatusRSSCoro)); + } + return false; +} + +void LLFloaterGridStatus::getGridStatusRSSCoro() +{ + + LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t + httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getGridStatusRSSCoro", httpPolicy)); + LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + + httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); + std::string url = gSavedSettings.getString("GridStatusRSS"); + + LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts, httpHeaders); + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + if (!status) + { + return; + } + + const LLSD::Binary &rawBody = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary(); + std::string body(rawBody.begin(), rawBody.end()); + + std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"grid_status_rss.xml"); + if(!gSavedSettings.getBOOL("TestGridStatusRSSFromFile")) + { + llofstream custom_file_out(fullpath.c_str(), std::ios::trunc); + if (custom_file_out.is_open()) + { + custom_file_out << body; + custom_file_out.close(); + } + } + LLXmlTree grid_status_xml; + if (!grid_status_xml.parseFile(fullpath)) + { + return ; + } + bool new_entries = false; + LLXmlTreeNode* rootp = grid_status_xml.getRoot(); + for (LLXmlTreeNode* item = rootp->getChildByName( "entry" ); item; item = rootp->getNextNamedChild()) + { + LLXmlTreeNode* id_node = item->getChildByName("id"); + LLXmlTreeNode* updated_node = item->getChildByName("updated"); + if (!id_node || !updated_node) + { + continue; + } + std::string guid = id_node->getContents(); + std::string date = updated_node->getContents(); + if(sItemsMap.find( guid ) == sItemsMap.end()) + { + new_entries = true; + } + else + { + if(sItemsMap[guid] != date) + { + new_entries = true; + } + } + sItemsMap[guid] = date; + } + if(new_entries && !getInstance()->isFirstUpdate()) + { + gToolBarView->flashCommand(LLCommandId("gridstatus"), true); + } + getInstance()->setFirstUpdate(FALSE); +} + // virtual void LLFloaterGridStatus::handleReshape(const LLRect& new_rect, bool by_user) { - if (by_user && !isMinimized()) - { - gSavedSettings.setRect("GridStatusFloaterRect", new_rect); - } + if (by_user && !isMinimized()) + { + gSavedSettings.setRect("GridStatusFloaterRect", new_rect); + } - LLFloaterWebContent::handleReshape(new_rect, by_user); + LLFloaterWebContent::handleReshape(new_rect, by_user); } void LLFloaterGridStatus::applyPreferredRect() { - const LLRect preferred_rect = gSavedSettings.getRect("GridStatusFloaterRect"); + const LLRect preferred_rect = gSavedSettings.getRect("GridStatusFloaterRect"); - // Don't override position that may have been set by floater stacking code. - LLRect new_rect = getRect(); - new_rect.setLeftTopAndSize( - new_rect.mLeft, new_rect.mTop, - preferred_rect.getWidth(), preferred_rect.getHeight()); - setShape(new_rect); + LLRect new_rect = getRect(); + new_rect.setLeftTopAndSize( + new_rect.mLeft, new_rect.mTop, + preferred_rect.getWidth(), preferred_rect.getHeight()); + setShape(new_rect); +} + +LLFloaterGridStatus* LLFloaterGridStatus::getInstance() +{ + return LLFloaterReg::getTypedInstance("grid_status"); } diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h index 045c647f4a..1608515003 100644 --- a/indra/newview/llfloatergridstatus.h +++ b/indra/newview/llfloatergridstatus.h @@ -46,10 +46,25 @@ public: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); + static bool checkGridStatusRSS(); + static void getGridStatusRSSCoro(); + + void startGridStatusTimer(); + BOOL isFirstUpdate() { return mIsFirstUpdate; } + void setFirstUpdate(BOOL first_update) { mIsFirstUpdate = first_update; } + + static LLFloaterGridStatus* getInstance(); + + private: /*virtual*/ BOOL postBuild(); void applyPreferredRect(); + + static std::map sItemsMap; + + LLFrameTimer mGridStatusTimer; + BOOL mIsFirstUpdate; }; #endif // LL_LLFLOATERGRIDSTATUS_H diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index b762b2ae1c..347409fcab 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -56,6 +56,7 @@ #include "llerrorcontrol.h" #include "llfloaterreg.h" #include "llfocusmgr.h" +#include "llfloatergridstatus.h" #include "llfloaterimsession.h" #include "lllocationhistory.h" #include "llimageworker.h" @@ -1875,6 +1876,8 @@ bool idle_startup() LLFloaterReg::showInitialVisibleInstances(); + LLFloaterGridStatus::getInstance()->startGridStatusTimer(); + display_startup(); display_startup(); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index bd8c0d5a96..d757e39366 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -136,7 +136,7 @@ with the same filename but different name - + diff --git a/indra/newview/skins/default/textures/toolbar_icons/grid_status.png b/indra/newview/skins/default/textures/toolbar_icons/grid_status.png new file mode 100644 index 0000000000000000000000000000000000000000..b92b93cfb443f47237149ed001bc6386ad851865 GIT binary patch literal 483 zcmV<90UZ8`P)+0(2=;-L?=H}()<>ch#U3P#KgnH!@Cc-rKOn3`II=VQWBF#zo&!M3bKUoV)H*>K-I=IVD9>fY zu~9IUK9rGR!~^c66HTSLqQXVjQnQhwCSU($s3-Er9G5*FW`;`F`?+A3jVL_&r;q~@ z)+zBS=6LBKXeOoy7VEjh^oqg+>vp!6mmM1v-a^`>K7p{*P5(yKroN2&XI|ez(5u^a Zz#p;*Cr*Y Date: Tue, 14 Feb 2017 15:46:27 +0200 Subject: [PATCH 006/116] MAINT-7104 whitespace clean-up --- indra/newview/llfloatergridstatus.cpp | 2 +- indra/newview/llfloatergridstatus.h | 30 +++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index 3429203afe..c47ff1c1d9 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2017, 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 diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h index 1608515003..0c3deb7d4c 100644 --- a/indra/newview/llfloatergridstatus.h +++ b/indra/newview/llfloatergridstatus.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2017, 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 @@ -36,32 +36,32 @@ class LLMediaCtrl; class LLFloaterGridStatus : - public LLFloaterWebContent + public LLFloaterWebContent { public: - typedef LLSDParamAdapter<_Params> Params; + typedef LLSDParamAdapter<_Params> Params; - LLFloaterGridStatus(const Params& key); + LLFloaterGridStatus(const Params& key); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); - static bool checkGridStatusRSS(); - static void getGridStatusRSSCoro(); + static bool checkGridStatusRSS(); + static void getGridStatusRSSCoro(); - void startGridStatusTimer(); - BOOL isFirstUpdate() { return mIsFirstUpdate; } - void setFirstUpdate(BOOL first_update) { mIsFirstUpdate = first_update; } + void startGridStatusTimer(); + BOOL isFirstUpdate() { return mIsFirstUpdate; } + void setFirstUpdate(BOOL first_update) { mIsFirstUpdate = first_update; } - static LLFloaterGridStatus* getInstance(); + static LLFloaterGridStatus* getInstance(); private: - /*virtual*/ BOOL postBuild(); + /*virtual*/ BOOL postBuild(); - void applyPreferredRect(); + void applyPreferredRect(); - static std::map sItemsMap; + static std::map sItemsMap; LLFrameTimer mGridStatusTimer; BOOL mIsFirstUpdate; From 3c249e5d5fca71714d7686c19d093962fbec313e Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 15 Feb 2017 14:52:33 +0200 Subject: [PATCH 007/116] MAINT-7051 Release Notes url shouldn't include the EDU parameter --- indra/newview/llappviewer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5eb82a2d0b..62e32c0bdc 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3312,7 +3312,12 @@ LLSD LLAppViewer::getViewerInfo() const std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL"); if (! LLStringUtil::endsWith(url, "/")) url += "/"; - url += LLURI::escape(LLVersionInfo::getChannel()) + "/"; + std::string channel = LLVersionInfo::getChannel(); + if (LLStringUtil::endsWith(boost::to_lower_copy(channel), " edu")) // Release Notes url shouldn't include the EDU parameter + { + boost::erase_tail(channel, 4); + } + url += LLURI::escape(channel) + "/"; url += LLURI::escape(LLVersionInfo::getVersion()); info["VIEWER_RELEASE_NOTES_URL"] = url; From 515a2f9c39506e22595aacee3c397daca58c9c15 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 16 Feb 2017 14:46:10 +0200 Subject: [PATCH 008/116] MAINT-7132 snapshot window should re-open in last selected mode --- indra/newview/llfloatersnapshot.cpp | 4 ---- indra/newview/llpanelsnapshotlocal.cpp | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index c0980719bb..ba3106913c 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -653,10 +653,6 @@ void LLFloaterSnapshot::Impl::setFinished(bool finished, bool ok, const std::str LLUICtrl* finished_lbl = mFloater->getChild(ok ? "succeeded_lbl" : "failed_lbl"); std::string result_text = mFloater->getString(msg + "_" + (ok ? "succeeded_str" : "failed_str")); finished_lbl->setValue(result_text); - - LLSideTrayPanelContainer* panel_container = mFloater->getChild("panel_container"); - panel_container->openPreviousPanel(); - panel_container->getCurrentPanel()->onOpen(LLSD()); } } diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index 3652c10586..51ec964ace 100644 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -168,12 +168,11 @@ void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl) if (saved) { mSnapshotFloater->postSave(); - goBack(); floater->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local"))); } else { - cancel(); + floater->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "local"))); } } From 58cb66135257487ccbca693215f8c1d72576deeb Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 17 Feb 2017 15:19:57 +0200 Subject: [PATCH 009/116] MAINT-397 Fixing confusing behavior --- indra/newview/skins/default/xui/en/notifications.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index c4190a4940..a509adfcbc 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4326,7 +4326,6 @@ Cannot offer friendship at this time. Please try again in a moment. Do Not Disturb is on. You will not be notified of incoming communications. - Other residents will receive your Do Not Disturb response (set in Preferences > General). -- Teleportation offers will be declined. - Voice calls will be rejected. Date: Mon, 20 Feb 2017 11:20:03 +0200 Subject: [PATCH 010/116] MAINT-7142 Use '/completename' in teleport offer and eject messages --- indra/newview/llpanelgrouproles.cpp | 2 +- indra/newview/llviewermessage.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 00c204e702..6ac439177a 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1231,7 +1231,7 @@ void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, c for (uuid_vec_t::const_iterator i = selected_members.begin(); i != selected_members.end(); ++i) { LLSD args; - args["AVATAR_NAME"] = LLSLURL("agent", *i, "displayname").getSLURLString(); + args["AVATAR_NAME"] = LLSLURL("agent", *i, "completename").getSLURLString(); args["GROUP_NAME"] = group_data->mName; LLNotifications::instance().add(LLNotification::Params("EjectAvatarFromGroup").substitutions(args)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 579eacc315..8076c6b1df 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7034,7 +7034,7 @@ void send_lures(const LLSD& notification, const LLSD& response) std::string target_name; gCacheName->getFullName(target_id, target_name); // for im log filenames LLSD args; - args["TO_NAME"] = LLSLURL("agent", target_id, "displayname").getSLURLString();; + args["TO_NAME"] = LLSLURL("agent", target_id, "completename").getSLURLString();; LLSD payload; From da3fde24aa6fe06077dafeff6c7cafacaa50674a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 20 Feb 2017 11:24:30 +0200 Subject: [PATCH 011/116] MAINT-7133 add object name to inventory offer chat message --- indra/newview/llgiveinventory.cpp | 23 +++++++++++-------- indra/newview/llgiveinventory.h | 4 +++- .../newview/skins/default/xui/en/strings.xml | 5 +++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index a9bf8a9a50..b2271cf4ff 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -306,21 +306,23 @@ bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, ////////////////////////////////////////////////////////////////////////// //static -void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im_session_id) +void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im_session_id, const std::string& item_name, bool is_folder) { // compute id of possible IM session with agent that has "to_agent" id LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, to_agent); // If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat. LLSD args; args["user_id"] = to_agent; + args["ITEM_NAME"] = item_name; + std::string message_name = is_folder ? "inventory_folder_offered" : "inventory_item_offered"; if (im_session_id.notNull()) { - gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args); + gIMMgr->addSystemMessage(im_session_id, message_name, args); } // If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat. else if (LLIMModel::getInstance()->findIMSession(session_id)) { - gIMMgr->addSystemMessage(session_id, "inventory_item_offered", args); + gIMMgr->addSystemMessage(session_id, message_name, args); } // If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history. else @@ -331,7 +333,9 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im // Build a new format username or firstname_lastname for legacy names // to use it for a history log filename. full_name = LLCacheName::buildUsername(full_name); - LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im")); + LLUIString message = LLTrans::getString(message_name + "-im"); + message.setArgs(args); + LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, message.getString()); } } } @@ -385,6 +389,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, { if (!item) return; std::string name; + std::string item_name = item->getName(); LLAgentUI::buildFullname(name); LLUUID transaction_id; transaction_id.generate(); @@ -399,7 +404,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, gAgentSessionID, to_agent, name, - item->getName(), + item_name, IM_ONLINE, IM_INVENTORY_OFFERED, transaction_id, @@ -421,7 +426,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY); - logInventoryOffer(to_agent, im_session_id); + logInventoryOffer(to_agent, im_session_id, item_name); // add buddy to recent people list LLRecentPeople::instance().add(to_agent); @@ -501,7 +506,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, items, LLInventoryModel::EXCLUDE_TRASH, giveable); - + std::string cat_name = cat->getName(); bool give_successful = true; // MAX ITEMS is based on (sizeof(uuid)+2) * count must be < // MTUBYTES or 18 * count < 1200 => count < 1200/18 => @@ -556,7 +561,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, gAgent.getSessionID(), to_agent, name, - cat->getName(), + cat_name, IM_ONLINE, IM_INVENTORY_OFFERED, transaction_id, @@ -579,7 +584,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY); - logInventoryOffer(to_agent, im_session_id); + logInventoryOffer(to_agent, im_session_id, cat_name, true); } return give_successful; diff --git a/indra/newview/llgiveinventory.h b/indra/newview/llgiveinventory.h index 85bc1ed49c..20e6df76e5 100644 --- a/indra/newview/llgiveinventory.h +++ b/indra/newview/llgiveinventory.h @@ -78,7 +78,9 @@ private: * logs "Inventory item offered" to IM */ static void logInventoryOffer(const LLUUID& to_agent, - const LLUUID &im_session_id = LLUUID::null); + const LLUUID &im_session_id = LLUUID::null, + const std::string& item_name = std::string(), + bool is_folder = false); static void commitGiveInventoryItem(const LLUUID& to_agent, const LLInventoryItem* item, diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 6f00f1731e..aad2c611f4 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3628,7 +3628,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Conference with [AGENT_NAME] - Inventory item offered + Inventory item '[ITEM_NAME]' offered + + + Inventory folder '[ITEM_NAME]' offered Drag items from inventory here From a6b3bb1a2d7c0bac90918f75b67a8066d95a4783 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 20 Feb 2017 14:20:43 +0200 Subject: [PATCH 012/116] MAINT-7146 No callback for 'Url.RemoveFriend' in LLScrollListCtrl --- indra/llui/llscrolllistctrl.cpp | 7 +++++++ indra/llui/llscrolllistctrl.h | 1 + 2 files changed, 8 insertions(+) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index db8fdc46b7..0afa8d43f1 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1808,6 +1808,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) registrar.add("Url.ShowProfile", boost::bind(&LLScrollListCtrl::showProfile, id, is_group)); registrar.add("Url.SendIM", boost::bind(&LLScrollListCtrl::sendIM, id)); registrar.add("Url.AddFriend", boost::bind(&LLScrollListCtrl::addFriend, id)); + registrar.add("Url.RemoveFriend", boost::bind(&LLScrollListCtrl::removeFriend, id)); registrar.add("Url.Execute", boost::bind(&LLScrollListCtrl::showNameDetails, id, is_group)); registrar.add("Url.CopyLabel", boost::bind(&LLScrollListCtrl::copyNameToClipboard, id, is_group)); registrar.add("Url.CopyUrl", boost::bind(&LLScrollListCtrl::copySLURLToClipboard, id, is_group)); @@ -1852,6 +1853,12 @@ void LLScrollListCtrl::addFriend(std::string id) LLUrlAction::addFriend(slurl); } +void LLScrollListCtrl::removeFriend(std::string id) +{ + std::string slurl = "secondlife:///app/agent/" + id + "/about"; + LLUrlAction::removeFriend(slurl); +} + void LLScrollListCtrl::showNameDetails(std::string id, bool is_group) { // open the resident's details or the group details diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 6325a79cd5..8343750a54 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -432,6 +432,7 @@ private: static void showProfile(std::string id, bool is_group); static void sendIM(std::string id); static void addFriend(std::string id); + static void removeFriend(std::string id); static void showNameDetails(std::string id, bool is_group); static void copyNameToClipboard(std::string id, bool is_group); static void copySLURLToClipboard(std::string id, bool is_group); From 3faad84a533b80e4a40e29e880d1608ffb0763ef Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 21 Feb 2017 18:01:23 +0200 Subject: [PATCH 013/116] MAINT-7036 Communicate Menu - Voice Morphing - Subscribe Now options - update --- indra/newview/llviewermenu.cpp | 9 ++++++++- indra/newview/skins/default/xui/en/menu_viewer.xml | 6 ++++++ indra/newview/skins/default/xui/en/strings.xml | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 99b7a98abc..d847661ce7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8618,7 +8618,12 @@ public: void handle_voice_morphing_subscribe() { - LLWeb::loadURLExternal(LLTrans::getString("voice_morphing_url")); + LLWeb::loadURL(LLTrans::getString("voice_morphing_url")); +} + +void handle_premium_voice_morphing_subscribe() +{ + LLWeb::loadURL(LLTrans::getString("premium_voice_morphing_url")); } class LLToggleUIHints : public view_listener_t @@ -8814,6 +8819,8 @@ void initialize_menus() // Communicate > Voice morphing > Subscribe... commit.add("Communicate.VoiceMorphing.Subscribe", boost::bind(&handle_voice_morphing_subscribe)); + // Communicate > Voice morphing > Premium perk... + commit.add("Communicate.VoiceMorphing.PremiumPerk", boost::bind(&handle_premium_voice_morphing_subscribe)); LLVivoxVoiceClient * voice_clientp = LLVivoxVoiceClient::getInstance(); enable.add("Communicate.VoiceMorphing.NoVoiceMorphing.Check" , boost::bind(&LLVivoxVoiceClient::onCheckVoiceEffect, voice_clientp, "NoVoiceMorphing")); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 332d79e1ea..c96b7ae673 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -337,6 +337,12 @@ + + + Home position set. - http://secondlife.com/landing/voicemorphing + https://secondlife.com/destination/voice-island + https://secondlife.com/destination/voice-morphing-premium [NAME] paid you L$[AMOUNT] [REASON]. From aa52236c5570a0b971b2524da655ccff6a1bff0d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 21 Feb 2017 19:30:41 +0200 Subject: [PATCH 014/116] MAINT-768 Fixed mouse hover triggers foreground and background UI --- indra/newview/llinventorylistitem.cpp | 4 ++-- indra/newview/llinventorylistitem.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index 0601796436..12bb609df8 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -182,10 +182,10 @@ void LLPanelInventoryListItemBase::setValue(const LLSD& value) mSelected = value["selected"]; } -void LLPanelInventoryListItemBase::onMouseEnter(S32 x, S32 y, MASK mask) +BOOL LLPanelInventoryListItemBase::handleHover(S32 x, S32 y, MASK mask) { mHovered = true; - LLPanel::onMouseEnter(x, y, mask); + return LLPanel::handleHover(x, y, mask); } void LLPanelInventoryListItemBase::onMouseLeave(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llinventorylistitem.h b/indra/newview/llinventorylistitem.h index b1ef6c74ee..d4dd212cc3 100644 --- a/indra/newview/llinventorylistitem.h +++ b/indra/newview/llinventorylistitem.h @@ -129,8 +129,8 @@ public: */ /*virtual*/ S32 notify(const LLSD& info); - /* Highlights item */ - /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); + /* Highlights item */ + /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); /* Removes item highlight */ /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); @@ -153,6 +153,7 @@ public: LLViewerInventoryItem* getItem() const; void setSeparatorVisible(bool visible) { mSeparatorVisible = visible; } + void resetHighlight() { mHovered = FALSE; } virtual ~LLPanelInventoryListItemBase(){} From 9c015df3fab0b5cc229ad1a0393e5da50ee29883 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 21 Feb 2017 15:50:09 +0200 Subject: [PATCH 015/116] MAINT-389 Fixed No way to wear an outfit from Library besides drag-n-drop --- indra/newview/llinventorybridge.cpp | 96 +++++++++++++++++++++-------- 1 file changed, 71 insertions(+), 25 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6cb7ce622f..555c19baac 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3941,6 +3941,37 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items mWearables=TRUE; } } + else + { + // Mark wearables and allow copy from library + LLInventoryModel* model = getInventoryModel(); + if(!model) return; + const LLInventoryCategory* category = model->getCategory(mUUID); + if (!category) return; + LLFolderType::EType type = category->getPreferredType(); + const bool is_system_folder = LLFolderType::lookupIsProtectedType(type); + + LLFindWearables is_wearable; + LLIsType is_object(LLAssetType::AT_OBJECT); + LLIsType is_gesture(LLAssetType::AT_GESTURE); + + if (checkFolderForContentsOfType(model, is_wearable) || + checkFolderForContentsOfType(model, is_object) || + checkFolderForContentsOfType(model, is_gesture)) + { + mWearables = TRUE; + } + + if (!is_system_folder) + { + items.push_back(std::string("Copy")); + if (!isItemCopyable()) + { + // For some reason there are items in library that can't be copied directly + disabled_items.push_back(std::string("Copy")); + } + } + } // Preemptively disable system folder removal if more than one item selected. if ((flags & FIRST_SELECTED_ITEM) == 0) @@ -3948,7 +3979,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("Delete System Folder")); } - if (!isMarketplaceListingsFolder()) + if (isAgentInventory() && !isMarketplaceListingsFolder()) { items.push_back(std::string("Share")); if (!canShare()) @@ -3956,6 +3987,9 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("Share")); } } + + + // Add menu items that are dependent on the contents of the folder. LLViewerInventoryCategory* category = (LLViewerInventoryCategory *) model->getCategory(mUUID); if (category && (marketplace_listings_id != mUUID)) @@ -3993,7 +4027,6 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); if (trash_id == mUUID) return; if (isItemInTrash()) return; - if (!isAgentInventory()) return; if (!isItemRemovable()) { @@ -4006,9 +4039,10 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = (type == LLFolderType::FT_NONE || LLFolderType::lookupIsEnsembleType(type)); + const bool is_agent_inventory = isAgentInventory(); // Only enable calling-card related options for non-system folders. - if (!is_system_folder) + if (!is_system_folder && is_agent_inventory) { LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD); if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard)) @@ -4020,7 +4054,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& } #ifndef LL_RELEASE_FOR_DOWNLOAD - if (LLFolderType::lookupIsProtectedType(type)) + if (LLFolderType::lookupIsProtectedType(type) && is_agent_inventory) { items.push_back(std::string("Delete System Folder")); } @@ -4037,8 +4071,6 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& checkFolderForContentsOfType(model, is_object) || checkFolderForContentsOfType(model, is_gesture) ) { - items.push_back(std::string("Folder Wearables Separator")); - // Only enable add/replace outfit for non-system folders. if (!is_system_folder) { @@ -4049,25 +4081,30 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& } items.push_back(std::string("Replace Outfit")); + + if (is_agent_inventory) + { + items.push_back(std::string("Folder Wearables Separator")); + if (is_ensemble) + { + items.push_back(std::string("Wear As Ensemble")); + } + items.push_back(std::string("Remove From Outfit")); + if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) + { + disabled_items.push_back(std::string("Remove From Outfit")); + } + } + if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) + { + disabled_items.push_back(std::string("Replace Outfit")); + } + if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID)) + { + disabled_items.push_back(std::string("Add To Outfit")); + } + items.push_back(std::string("Outfit Separator")); } - if (is_ensemble) - { - items.push_back(std::string("Wear As Ensemble")); - } - items.push_back(std::string("Remove From Outfit")); - if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) - { - disabled_items.push_back(std::string("Remove From Outfit")); - } - if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) - { - disabled_items.push_back(std::string("Replace Outfit")); - } - if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID)) - { - disabled_items.push_back(std::string("Add To Outfit")); - } - items.push_back(std::string("Outfit Separator")); } } @@ -4304,9 +4341,18 @@ void LLFolderBridge::modifyOutfit(BOOL append) return; } - LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append ); + if (isAgentInventory()) + { + LLAppearanceMgr::instance().wearInventoryCategory(cat, FALSE, append); + } + else + { + // Library, we need to copy content first + LLAppearanceMgr::instance().wearInventoryCategory(cat, TRUE, append); + } } + // +=================================================+ // | LLMarketplaceFolderBridge | // +=================================================+ From 605160d501158362ced3e62425bdcd8d28895fd5 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 15 Feb 2017 20:40:03 +0200 Subject: [PATCH 016/116] MAINT-7118 Swapping legacy people API with new cache --- indra/llmessage/llavatarnamecache.cpp | 22 ++++++ indra/llmessage/llavatarnamecache.h | 10 ++- indra/newview/llavataractions.cpp | 41 +++++----- indra/newview/llcallingcard.cpp | 12 ++- indra/newview/llchathistory.cpp | 6 +- indra/newview/llconversationmodel.cpp | 8 +- .../newview/llfloaterconversationpreview.cpp | 3 +- indra/newview/llfloaterimcontainer.cpp | 7 +- indra/newview/llfloaterimnearbychat.cpp | 2 +- indra/newview/llfloaterproperties.cpp | 11 ++- indra/newview/llfloaterscriptlimits.cpp | 27 ++++++- indra/newview/llfloaterscriptlimits.h | 3 + indra/newview/llgiveinventory.cpp | 7 +- indra/newview/llgroupmgr.cpp | 8 +- indra/newview/llimview.cpp | 20 ++--- indra/newview/llimview.h | 2 +- indra/newview/llinventorymodel.cpp | 11 +-- indra/newview/llmutelist.cpp | 27 +++---- indra/newview/llnamebox.cpp | 5 +- indra/newview/llnameeditor.cpp | 5 +- indra/newview/llnotificationhandlerutil.cpp | 28 +++++-- indra/newview/llpanelgrouproles.cpp | 12 +-- indra/newview/llpanelpicks.cpp | 6 +- indra/newview/llselectmgr.cpp | 7 +- indra/newview/llspeakers.cpp | 7 +- indra/newview/llspeakers.h | 3 +- indra/newview/lltooldraganddrop.cpp | 12 +-- indra/newview/lltoolpie.cpp | 23 +++--- indra/newview/llviewerinventory.cpp | 10 +-- indra/newview/llviewerinventory.h | 3 +- indra/newview/llviewermenu.cpp | 6 +- indra/newview/llviewermessage.cpp | 74 ++++++++++++++----- 32 files changed, 280 insertions(+), 148 deletions(-) diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 004db546b7..5a112b5432 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -755,6 +755,28 @@ void LLAvatarNameCache::insert(const LLUUID& agent_id, const LLAvatarName& av_na sCache[agent_id] = av_name; } +LLUUID LLAvatarNameCache::findIdByName(const std::string& name) +{ + std::map::iterator it; + std::map::iterator end = sCache.end(); + for (it = sCache.begin(); it != end; ++it) + { + if (it->second.getUserName() == name) + { + return it->first; + } + } + + // Legacy method + LLUUID id; + if (gCacheName->getUUID(name, id)) + { + return id; + } + + return LLUUID::null; +} + #if 0 F64 LLAvatarNameCache::nameExpirationFromHeaders(LLCore::HttpHeaders *headers) { diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index bd2715e956..63e067c939 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -84,7 +84,15 @@ namespace LLAvatarNameCache void insert(const LLUUID& agent_id, const LLAvatarName& av_name); void erase(const LLUUID& agent_id); - /// Provide some fallback for agents that return errors. + // A way to find agent id by UUID, very slow, also unreliable + // since it doesn't request names, just serch exsisting ones + // that are likely not in cache. + // + // Todo: Find a way to remove this. + // Curently this method is used for chat history and in some cases notices. + LLUUID findIdByName(const std::string& name); + + /// Provide some fallback for agents that return errors. void handleAgentError(const LLUUID& agent_id); // Compute name expiration time from HTTP Cache-Control header, diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 36e95c07f4..2045c3e297 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -478,15 +478,14 @@ void LLAvatarActions::kick(const LLUUID& id) // static void LLAvatarActions::freezeAvatar(const LLUUID& id) { - std::string fullname; - gCacheName->getFullName(id, fullname); + LLAvatarName av_name; LLSD payload; payload["avatar_id"] = id; - if (!fullname.empty()) + if (LLAvatarNameCache::get(id, &av_name)) { LLSD args; - args["AVATAR_NAME"] = fullname; + args["AVATAR_NAME"] = av_name.getUserName(); LLNotificationsUtil::add("FreezeAvatarFullname", args, payload, handleFreezeAvatar); } else @@ -498,15 +497,15 @@ void LLAvatarActions::freezeAvatar(const LLUUID& id) // static void LLAvatarActions::ejectAvatar(const LLUUID& id, bool ban_enabled) { - std::string fullname; - gCacheName->getFullName(id, fullname); + LLAvatarName av_name; LLSD payload; payload["avatar_id"] = id; payload["ban_enabled"] = ban_enabled; LLSD args; - if (!fullname.empty()) + bool has_name = LLAvatarNameCache::get(id, &av_name); + if (has_name) { - args["AVATAR_NAME"] = fullname; + args["AVATAR_NAME"] = av_name.getUserName(); } if (ban_enabled) @@ -515,7 +514,7 @@ void LLAvatarActions::ejectAvatar(const LLUUID& id, bool ban_enabled) } else { - if (!fullname.empty()) + if (has_name) { LLNotificationsUtil::add("EjectAvatarFullnameNoBan", args, payload, handleEjectAvatar); } @@ -991,10 +990,10 @@ bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NUL // static void LLAvatarActions::toggleBlock(const LLUUID& id) { - std::string name; + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); - gCacheName->getFullName(id, name); // needed for mute - LLMute mute(id, name, LLMute::AGENT); + LLMute mute(id, av_name.getUserName(), LLMute::AGENT); if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName)) { @@ -1009,13 +1008,13 @@ void LLAvatarActions::toggleBlock(const LLUUID& id) // static void LLAvatarActions::toggleMuteVoice(const LLUUID& id) { - std::string name; - gCacheName->getFullName(id, name); // needed for mute + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); LLMuteList* mute_list = LLMuteList::getInstance(); bool is_muted = mute_list->isMuted(id, LLMute::flagVoiceChat); - LLMute mute(id, name, LLMute::AGENT); + LLMute mute(id, av_name.getUserName(), LLMute::AGENT); if (!is_muted) { mute_list->add(mute, LLMute::flagVoiceChat); @@ -1329,9 +1328,9 @@ bool LLAvatarActions::isFriend(const LLUUID& id) // static bool LLAvatarActions::isBlocked(const LLUUID& id) { - std::string name; - gCacheName->getFullName(id, name); // needed for mute - return LLMuteList::getInstance()->isMuted(id, name); + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); + return LLMuteList::getInstance()->isMuted(id, av_name.getUserName()); } // static @@ -1343,8 +1342,10 @@ bool LLAvatarActions::isVoiceMuted(const LLUUID& id) // static bool LLAvatarActions::canBlock(const LLUUID& id) { - std::string full_name; - gCacheName->getFullName(id, full_name); // needed for mute + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); + + std::string full_name = av_name.getUserName(); bool is_linden = (full_name.find("Linden") != std::string::npos); bool is_self = id == gAgentID; return !is_self && !is_linden; diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index f79d1aa609..6d20b23e9f 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -243,7 +243,6 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds) using namespace std; U32 new_buddy_count = 0; - std::string full_name; LLUUID agent_id; for(buddy_map_t::const_iterator itr = buds.begin(); itr != buds.end(); ++itr) { @@ -253,8 +252,11 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds) { ++new_buddy_count; mBuddyInfo[agent_id] = (*itr).second; - // IDEVO: is this necessary? name is unused? - gCacheName->getFullName(agent_id, full_name); + + // pre-request name for notifications? + LLAvatarName av_name; + LLAvatarNameCache::get(agent_id, &av_name); + addChangedMask(LLFriendObserver::ADD, agent_id); LL_DEBUGS() << "Added buddy " << agent_id << ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline") @@ -889,7 +891,9 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy) { - gCacheName->getFullName(buddy_id, mFullName); + LLAvatarName av_name; + LLAvatarNameCache::get(buddy_id, &av_name); + mFullName = av_name.getUserName(); buddy_map_t::value_type value(buddy_id, mFullName); if(buddy->isOnline()) { diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5d2997688f..9798ef3529 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -271,9 +271,9 @@ public: void mute(const LLUUID& participant_id, U32 flags) { BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags); - std::string name; - gCacheName->getFullName(participant_id, name); - LLMute mute(participant_id, name, LLMute::AGENT); + LLAvatarName av_name; + LLAvatarNameCache::get(participant_id, &av_name); + LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT); if (!is_muted) { diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 328a638f2f..ebbbf23dee 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -602,12 +602,12 @@ bool LLConversationItemParticipant::isVoiceMuted() void LLConversationItemParticipant::muteVoice(bool mute_voice) { - std::string name; - gCacheName->getFullName(mUUID, name); + LLAvatarName av_name; + LLAvatarNameCache::get(mUUID, &av_name); LLMuteList * mute_listp = LLMuteList::getInstance(); - bool voice_already_muted = mute_listp->isMuted(mUUID, name); + bool voice_already_muted = mute_listp->isMuted(mUUID, av_name.getUserName()); - LLMute mute(mUUID, name, LLMute::AGENT); + LLMute mute(mUUID, av_name.getUserName(), LLMute::AGENT); if (voice_already_muted && !mute_voice) { mute_listp->remove(mute); diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index a358b7c10b..b48ecc8f31 100644 --- a/indra/newview/llfloaterconversationpreview.cpp +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -25,6 +25,7 @@ #include "llviewerprecompiledheaders.h" +#include "llavatarnamecache.h" #include "llconversationlog.h" #include "llfloaterconversationpreview.h" #include "llimview.h" @@ -220,7 +221,7 @@ void LLFloaterConversationPreview::showHistory() else { std::string legacy_name = gCacheName->buildLegacyName(from); - gCacheName->getUUID(legacy_name, from_id); + from_id = LLAvatarNameCache::findIdByName(legacy_name); } LLChat chat; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 7007c58b3c..3522932d03 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2099,9 +2099,10 @@ void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid) void LLFloaterIMContainer::toggleMute(const LLUUID& participant_id, U32 flags) { BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags); - std::string name; - gCacheName->getFullName(participant_id, name); - LLMute mute(participant_id, name, LLMute::AGENT); + + LLAvatarName av_name; + LLAvatarNameCache::get(participant_id, &av_name); + LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT); if (!is_muted) { diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 7d0ff22ed3..40ae22bb4e 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -218,7 +218,7 @@ void LLFloaterIMNearbyChat::loadHistory() else { std::string legacy_name = gCacheName->buildLegacyName(from); - gCacheName->getUUID(legacy_name, from_id); + from_id = LLAvatarNameCache::findIdByName(legacy_name); } LLChat chat; diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 6bfc780722..1310a60638 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -30,6 +30,7 @@ #include #include #include "llcachename.h" +#include "llavatarnamecache.h" #include "lldbstrings.h" #include "llfloaterreg.h" @@ -274,12 +275,12 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) if (item->getCreatorUUID().notNull()) { - std::string name; - gCacheName->getFullName(item->getCreatorUUID(), name); + LLAvatarName av_name; + LLAvatarNameCache::get(item->getCreatorUUID(), &av_name); getChildView("BtnCreator")->setEnabled(TRUE); getChildView("LabelCreatorTitle")->setEnabled(TRUE); getChildView("LabelCreatorName")->setEnabled(TRUE); - getChild("LabelCreatorName")->setValue(name); + getChild("LabelCreatorName")->setValue(av_name.getUserName()); } else { @@ -301,7 +302,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) } else { - gCacheName->getFullName(perm.getOwner(), name); + LLAvatarName av_name; + LLAvatarNameCache::get(perm.getOwner(), &av_name); + name = av_name.getUserName(); } getChildView("BtnOwner")->setEnabled(TRUE); getChildView("LabelOwnerTitle")->setEnabled(TRUE); diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index c14bb4e7ae..5f0587a286 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -390,6 +390,14 @@ void LLPanelScriptLimitsRegionMemory::setErrorStatus(S32 status, const std::stri LL_WARNS() << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<getFullName(owner_id, owner_buf); // username + LLAvatarName av_name; + name_is_cached = LLAvatarNameCache::get(owner_id, &av_name); + owner_buf = av_name.getUserName(); owner_buf = LLCacheName::buildUsername(owner_buf); } if(!name_is_cached) @@ -511,9 +521,18 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) if(std::find(names_requested.begin(), names_requested.end(), owner_id) == names_requested.end()) { names_requested.push_back(owner_id); - gCacheName->get(owner_id, is_group_owned, // username - boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, - this, _1, _2)); + if (is_group_owned) + { + gCacheName->getGroup(owner_id, + boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, + this, _1, _2)); + } + else + { + LLAvatarNameCache::get(owner_id, + boost::bind(&LLPanelScriptLimitsRegionMemory::onAvatarNameCache, + this, _1, _2)); + } } } } diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index 2ac3862b4f..16450c6527 100644 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -38,6 +38,7 @@ class LLPanelScriptLimitsInfo; class LLTabContainer; +class LLAvatarName; class LLPanelScriptLimitsRegionMemory; @@ -116,6 +117,8 @@ public: void checkButtonsEnabled(); private: + void onAvatarNameCache(const LLUUID& id, + const LLAvatarName& av_name); void onNameCache(const LLUUID& id, const std::string& name); diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index b2271cf4ff..3ab8fed2c6 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -36,6 +36,7 @@ #include "llagentdata.h" #include "llagentui.h" #include "llagentwearables.h" +#include "llavatarnamecache.h" #include "llfloatertools.h" // for gFloaterTool #include "llhudeffecttrail.h" #include "llhudmanager.h" @@ -327,12 +328,12 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im // If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history. else { - std::string full_name; - if (gCacheName->getFullName(to_agent, full_name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(to_agent, &av_name)) { // Build a new format username or firstname_lastname for legacy names // to use it for a history log filename. - full_name = LLCacheName::buildUsername(full_name); + std::string full_name = LLCacheName::buildUsername(av_name.getUserName()); LLUIString message = LLTrans::getString(message_name + "-im"); message.setArgs(args); LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, message.getString()); diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 7545112ab9..152d0eddcd 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -38,6 +38,7 @@ #include "llappviewer.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llui.h" #include "message.h" #include "roles_constants.h" @@ -54,6 +55,7 @@ #include #include "llcorehttputil.h" + #if LL_MSVC #pragma warning(push) // disable boost::lexical_cast warning @@ -819,9 +821,9 @@ void LLGroupMgrGroupData::banMemberById(const LLUUID& participant_uuid) LLGroupMgr::getInstance()->sendGroupMemberEjects(mID, ids); LLGroupMgr::getInstance()->sendGroupMembersRequest(mID); LLSD args; - std::string name; - gCacheName->getFullName(participant_uuid, name); - args["AVATAR_NAME"] = name; + LLAvatarName av_name; + LLAvatarNameCache::get(participant_uuid, &av_name); + args["AVATAR_NAME"] = av_name.getUserName(); args["GROUP_NAME"] = mName; LLNotifications::instance().add(LLNotification::Params("EjectAvatarFromGroup").substitutions(args)); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2e9332c355..ff8b8b0403 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -646,6 +646,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES std::string you_joined_call = LLTrans::getString("you_joined_call"); std::string you_started_call = LLTrans::getString("you_started_call"); std::string other_avatar_name = ""; + LLAvatarName av_name; std::string message; @@ -655,7 +656,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES // no text notifications break; case P2P_SESSION: - gCacheName->getFullName(mOtherParticipantID, other_avatar_name); // voice + LLAvatarNameCache::get(mOtherParticipantID, &av_name); + other_avatar_name = av_name.getUserName(); if(direction == LLVoiceChannel::INCOMING_CALL) { @@ -806,7 +808,7 @@ void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list& histo { // convert it to a legacy name if we have a complete name std::string legacy_name = gCacheName->buildLegacyName(from); - gCacheName->getUUID(legacy_name, from_id); + from_id = LLAvatarNameCache::findIdByName(legacy_name); } std::string timestamp = msg[LL_IM_TIME]; @@ -2765,10 +2767,10 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess else { - std::string session_name; + LLAvatarName av_name; // since we select user to share item with - his name is already in cache - gCacheName->getFullName(args["user_id"], session_name); - session_name = LLCacheName::buildUsername(session_name); + LLAvatarNameCache::get(args["user_id"], &av_name); + std::string session_name = LLCacheName::buildUsername(av_name.getUserName()); LLIMModel::instance().logToFile(session_name, SYSTEM_FROM, LLUUID::null, message.getString()); } } @@ -3075,8 +3077,8 @@ void LLIMMgr::inviteToSession( { if (caller_name.empty()) { - gCacheName->get(caller_id, false, // voice - boost::bind(&LLIMMgr::onInviteNameLookup, payload, _1, _2, _3)); + LLAvatarNameCache::get(caller_id, + boost::bind(&LLIMMgr::onInviteNameLookup, payload, _1, _2)); } else { @@ -3095,9 +3097,9 @@ void LLIMMgr::inviteToSession( } } -void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& name, bool is_group) +void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarName& av_name) { - payload["caller_name"] = name; + payload["caller_name"] = av_name.getUserName(); payload["session_name"] = payload["caller_name"].asString(); std::string notify_box_type = payload["notify_box_type"].asString(); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index da40ac8393..e3851a56e0 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -473,7 +473,7 @@ private: void processIMTypingCore(const LLIMInfo* im_info, BOOL typing); - static void onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& name, bool is_group); + static void onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarName& name); void notifyObserverSessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg); //Triggers when a session has already been added diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 287fa4c45b..855f7c750e 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -34,6 +34,7 @@ #include "llagent.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llavatarnamecache.h" #include "llclipboard.h" #include "llinventorypanel.h" #include "llinventorybridge.h" @@ -1022,19 +1023,19 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) { // Valid UUID; set the item UUID and rename it new_item->setCreator(id); - std::string avatar_name; + LLAvatarName av_name; - if (gCacheName->getFullName(id, avatar_name)) + if (LLAvatarNameCache::get(id, &av_name)) { - new_item->rename(avatar_name); + new_item->rename(av_name.getUserName()); mask |= LLInventoryObserver::LABEL; } else { // Fetch the current name - gCacheName->get(id, FALSE, + LLAvatarNameCache::get(id, boost::bind(&LLViewerInventoryItem::onCallingCardNameLookup, new_item.get(), - _1, _2, _3)); + _1, _2)); } } diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 0f70c9d13f..3af9c2f912 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -53,6 +53,7 @@ #include "llxfermanager.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llviewergenericmessage.h" // for gGenericDispatcher #include "llworld.h" //for particle system banning #include "llimview.h" @@ -456,7 +457,7 @@ void LLMuteList::updateRemove(const LLMute& mute) gAgent.sendReliableMessage(); } -void notify_automute_callback(const LLUUID& agent_id, const std::string& full_name, bool is_group, LLMuteList::EAutoReason reason) +void notify_automute_callback(const LLUUID& agent_id, const LLAvatarName& full_name, LLMuteList::EAutoReason reason) { std::string notif_name; switch (reason) @@ -474,7 +475,7 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& full_na } LLSD args; - args["NAME"] = full_name; + args["NAME"] = full_name.getUserName(); LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args, LLSD()); if (notif_ptr) @@ -499,17 +500,17 @@ BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason) removed = TRUE; remove(automute); - std::string full_name; - if (gCacheName->getFullName(agent_id, full_name)) - { - // name in cache, call callback directly - notify_automute_callback(agent_id, full_name, false, reason); - } - else - { - // not in cache, lookup name from cache - gCacheName->get(agent_id, false, - boost::bind(¬ify_automute_callback, _1, _2, _3, reason)); + LLAvatarName av_name; + if (LLAvatarNameCache::get(agent_id, &av_name)) + { + // name in cache, call callback directly + notify_automute_callback(agent_id, av_name, reason); + } + else + { + // not in cache, lookup name from cache + LLAvatarNameCache::get(agent_id, + boost::bind(¬ify_automute_callback, _1, _2, reason)); } } diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index 1099316a19..8d32fb1d5c 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -35,6 +35,7 @@ #include "lluuid.h" #include "llcachename.h" +#include "llavatarnamecache.h" // statics std::set LLNameBox::sInstances; @@ -67,7 +68,9 @@ void LLNameBox::setNameID(const LLUUID& name_id, BOOL is_group) if (!is_group) { - got_name = gCacheName->getFullName(name_id, name); + LLAvatarName av_name; + got_name = LLAvatarNameCache::get(name_id, &av_name); + name = av_name.getUserName(); } else { diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp index b3b1ff7c06..055754f270 100644 --- a/indra/newview/llnameeditor.cpp +++ b/indra/newview/llnameeditor.cpp @@ -28,6 +28,7 @@ #include "llnameeditor.h" #include "llcachename.h" +#include "llavatarnamecache.h" #include "llfontgl.h" @@ -65,7 +66,9 @@ void LLNameEditor::setNameID(const LLUUID& name_id, BOOL is_group) if (!is_group) { - gCacheName->getFullName(name_id, name); + LLAvatarName av_name; + LLAvatarNameCache::get(name_id, &av_name); + name = av_name.getUserName(); } else { diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index a078889d46..4a3923ef6e 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -114,11 +114,11 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, } } -void log_name_callback(const std::string& full_name, const std::string& from_name, +void log_name_callback(const LLAvatarName& av_name, const std::string& from_name, const std::string& message, const LLUUID& from_id) { - LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, full_name, from_name, message, + LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, av_name.getUserName(), from_name, message, from_id, LLUUID()); } @@ -141,11 +141,11 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi if(to_file_only) { - gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID())); + LLAvatarNameCache::get(from_id, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID())); } else { - gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); + LLAvatarNameCache::get(from_id, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); } } @@ -167,9 +167,18 @@ void LLHandlerUtil::logGroupNoticeToIMGroup( const std::string group_name = groupData.mName; const std::string sender_name = payload["sender_name"].asString(); - // we can't retrieve sender id from group notice system message, so try to lookup it from cache LLUUID sender_id; - gCacheName->getUUID(sender_name, sender_id); + if (payload.has("sender_id")) + { + sender_id = payload["sender_id"].asUUID(); + } + + if (sender_id.notNull()) + { + // Legacy support and fallback method + // if we can't retrieve sender id from group notice system message, try to lookup it from cache + sender_id = LLAvatarNameCache::findIdByName(sender_name); + } logToIM(IM_SESSION_GROUP_START, group_name, sender_name, payload["message"], payload["group_id"], sender_id); @@ -219,7 +228,12 @@ std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notifica { from_id = notification->getPayload()["from_id"]; } - if(!gCacheName->getFullName(from_id, res)) + LLAvatarName av_name; + if(LLAvatarNameCache::get(from_id, &av_name)) + { + res = av_name.getUserName(); + } + else { res = ""; } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 6ac439177a..8440e9ee50 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1168,9 +1168,9 @@ void LLPanelGroupMembersSubTab::confirmEjectMembers() if (selection_count == 1) { LLSD args; - std::string fullname; - gCacheName->getFullName(mMembersList->getValue(), fullname); - args["AVATAR_NAME"] = fullname; + LLAvatarName av_name; + LLAvatarNameCache::get(mMembersList->getValue(), &av_name); + args["AVATAR_NAME"] = av_name.getUserName(); LLSD payload; LLNotificationsUtil::add("EjectGroupMemberWarning", args, @@ -1862,9 +1862,9 @@ void LLPanelGroupMembersSubTab::confirmBanMembers() if (selection_count == 1) { LLSD args; - std::string fullname; - gCacheName->getFullName(mMembersList->getValue(), fullname); - args["AVATAR_NAME"] = fullname; + LLAvatarName av_name; + LLAvatarNameCache::get(mMembersList->getValue(), &av_name); + args["AVATAR_NAME"] = av_name.getUserName(); LLSD payload; LLNotificationsUtil::add("BanGroupMemberWarning", args, diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 55c09d85ea..77bc99da83 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -384,9 +384,9 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) LLAvatarPicks* avatar_picks = static_cast(data); if(avatar_picks && getAvatarId() == avatar_picks->target_id) { - std::string full_name; - gCacheName->getFullName(getAvatarId(), full_name); - getChild("pick_title")->setTextArg("[NAME]", full_name); + LLAvatarName av_name; + LLAvatarNameCache::get(getAvatarId(), &av_name); + getChild("pick_title")->setTextArg("[NAME]", av_name.getUserName()); // Save selection, to be able to edit same item after saving changes. See EXT-3023. LLUUID selected_id = mPicksList->getSelectedValue()[PICK_ID]; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index ee7c22800a..5ebf7cfe13 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -33,6 +33,7 @@ // library includes #include "llcachename.h" +#include "llavatarnamecache.h" #include "lldbstrings.h" #include "lleconomy.h" #include "llgl.h" @@ -5385,9 +5386,9 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use LLFloaterReporter *reporterp = LLFloaterReg::findTypedInstance("reporter"); if (reporterp) { - std::string fullname; - gCacheName->getFullName(owner_id, fullname); - reporterp->setPickedObjectProperties(name, fullname, owner_id); + LLAvatarName av_name; + LLAvatarNameCache::get(owner_id, &av_name); + reporterp->setPickedObjectProperties(name, av_name.getUserName(), owner_id); } } else if (request_flags & OBJECT_PAY_REQUEST) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index e7971028bf..19d1af34f9 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -29,6 +29,7 @@ #include "llspeakers.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llappviewer.h" #include "llimview.h" #include "llgroupmgr.h" @@ -75,13 +76,13 @@ void LLSpeaker::lookupName() { if (mDisplayName.empty()) { - gCacheName->get(mID, false, boost::bind(&LLSpeaker::onNameCache, this, _1, _2, _3)); + LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group??? } } -void LLSpeaker::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group) +void LLSpeaker::onNameCache(const LLUUID& id, const LLAvatarName& av_name) { - mDisplayName = full_name; + mDisplayName = av_name.getUserName(); } bool LLSpeaker::isInVoiceChannel() diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 617bae3984..d1dbf72fe9 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -34,6 +34,7 @@ #include "llcoros.h" class LLSpeakerMgr; +class LLAvatarName; // data for a given participant in a voice channel class LLSpeaker : public LLRefCount, public LLOldEvents::LLObservable, public LLHandleProvider, public boost::signals2::trackable @@ -61,7 +62,7 @@ public: ~LLSpeaker() {}; void lookupName(); - void onNameCache(const LLUUID& id, const std::string& full_name, bool is_group); + void onNameCache(const LLUUID& id, const LLAvatarName& full_name); bool isInVoiceChannel(); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 27c4c90857..49436ee406 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1584,12 +1584,12 @@ static void show_object_sharing_confirmation(const std::string name, } static void get_name_cb(const LLUUID& id, - const std::string& full_name, + const LLAvatarName& av_name, LLInventoryObject* inv_obj, const LLSD& dest, const LLUUID& dest_agent) { - show_object_sharing_confirmation(full_name, + show_object_sharing_confirmation(av_name.getUserName(), inv_obj, dest, id, @@ -1634,17 +1634,17 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ // If no IM session found get the destination agent's name by id. if (NULL == session) { - std::string fullname; + LLAvatarName av_name; // If destination agent's name is found in cash proceed to showing the confirmation dialog. // Otherwise set up a callback to show the dialog when the name arrives. - if (gCacheName->getFullName(dest_agent, fullname)) + if (LLAvatarNameCache::get(dest_agent, &av_name)) { - show_object_sharing_confirmation(fullname, inv_obj, dest, dest_agent, LLUUID::null); + show_object_sharing_confirmation(av_name.getUserName(), inv_obj, dest, dest_agent, LLUUID::null); } else { - gCacheName->get(dest_agent, false, boost::bind(&get_name_cb, _1, _2, inv_obj, dest, dest_agent)); + LLAvatarNameCache::get(dest_agent, boost::bind(&get_name_cb, _1, _2, inv_obj, dest, dest_agent)); } return true; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index e79ce55854..9acf9080bf 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -883,7 +883,7 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) } else if (hover_parcel->getIsGroupOwned()) { - if (gCacheName->getGroupName(owner, name)) + if (gCacheName->getFullName(owner, name)) //group? { line.append(name); line.append(LLTrans::getString("TooltipIsGroup")); @@ -893,14 +893,19 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) line.append(LLTrans::getString("RetrievingData")); } } - else if(gCacheName->getFullName(owner, name)) - { - line.append(name); - } - else - { - line.append(LLTrans::getString("RetrievingData")); - } + else + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(owner, &av_name)) + { + name = av_name.getUserName(); + line.append(name); + } + else + { + line.append(LLTrans::getString("RetrievingData")); + } + } } else { diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index caffeadb73..bf79a0595c 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1126,10 +1126,10 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, void create_inventory_callingcard(const LLUUID& avatar_id, const LLUUID& parent /*= LLUUID::null*/, LLPointer cb/*=NULL*/) { std::string item_desc = avatar_id.asString(); - std::string item_name; - gCacheName->getFullName(avatar_id, item_name); + LLAvatarName av_name; + LLAvatarNameCache::get(avatar_id, &av_name); create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - parent, LLTransactionID::tnull, item_name, item_desc, LLAssetType::AT_CALLINGCARD, + parent, LLTransactionID::tnull, av_name.getUserName(), item_desc, LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, cb); } @@ -2071,9 +2071,9 @@ PermissionMask LLViewerInventoryItem::getPermissionMask() const //---------- -void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& name, bool is_group) +void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const LLAvatarName& name) { - rename(name); + rename(name.getUserName()); gInventory.addChangedMask(LLInventoryObserver::LABEL, getUUID()); gInventory.notifyObservers(); } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 074d51b8b3..b3053e365b 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -39,6 +39,7 @@ class LLFolderView; class LLFolderBridge; class LLViewerInventoryCategory; class LLInventoryCallback; +class LLAvatarName; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLViewerInventoryItem @@ -158,7 +159,7 @@ public: PermissionMask getPermissionMask() const; // callback - void onCallingCardNameLookup(const LLUUID& id, const std::string& name, bool is_group); + void onCallingCardNameLookup(const LLUUID& id, const LLAvatarName& name); // If this is a broken link, try to fix it and any other identical link. BOOL regenerateLink(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d847661ce7..a92ecd2036 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6560,10 +6560,10 @@ class LLMuteParticle : public view_listener_t if (id.notNull()) { - std::string name; - gCacheName->getFullName(id, name); + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); - LLMute mute(id, name, LLMute::AGENT); + LLMute mute(id, av_name.getUserName(), LLMute::AGENT); if (LLMuteList::getInstance()->isMuted(mute.mID)) { LLMuteList::getInstance()->remove(mute); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8076c6b1df..ab76653ba6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1390,6 +1390,14 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id)); } + +void inventory_offer_mute_avatar_callback(const LLUUID& blocked_id, + const LLAvatarName& av_name) +{ + inventory_offer_mute_callback(blocked_id, av_name.getUserName(), false); +} + + std::string LLOfferInfo::mResponderType = "offer_info"; LLOfferInfo::LLOfferInfo() @@ -1538,7 +1546,14 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& { if (notification_ptr != NULL) { - gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback, _1, _2, _3)); + if (mFromGroup) + { + gCacheName->getGroup(mFromID, boost::bind(&inventory_offer_mute_callback, _1, _2, _3)); + } + else + { + LLAvatarNameCache::get(mFromID, boost::bind(&inventory_offer_mute_avatar_callback, _1, _2)); + } } } @@ -1695,7 +1710,14 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const llassert(notification_ptr != NULL); if (notification_ptr != NULL) { - gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback, _1, _2, _3)); + if (mFromGroup) + { + gCacheName->getGroup(mFromID, boost::bind(&inventory_offer_mute_callback, _1, _2, _3)); + } + else + { + LLAvatarNameCache::get(mFromID, boost::bind(&inventory_offer_mute_avatar_callback, _1, _2)); + } } } @@ -1744,12 +1766,12 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const } else { - std::string full_name; - if (gCacheName->getFullName(mFromID, full_name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(mFromID, &av_name)) { from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+ LLTrans::getString("'") + mFromName - + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + full_name; - chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + full_name; + + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + av_name.getUserName(); + chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + av_name.getUserName(); } else { @@ -2601,9 +2623,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { original_name = original_name.substr(0, index); } + std::string legacy_name = gCacheName->buildLegacyName(original_name); - LLUUID agent_id; - gCacheName->getUUID(legacy_name, agent_id); + LLUUID agent_id = LLAvatarNameCache::findIdByName(legacy_name); if (agent_id.isNull()) { @@ -2662,6 +2684,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["subject"] = subj; payload["message"] = mes; payload["sender_name"] = name; + payload["sender_id"] = agent_id; payload["group_id"] = group_id; payload["inventory_name"] = item_name; payload["received_time"] = LLDate::now(); @@ -6183,7 +6206,7 @@ void handle_show_mean_events(void *) //LLFloaterBump::showInstance(); } -void mean_name_callback(const LLUUID &id, const std::string& full_name, bool is_group) +void mean_name_callback(const LLUUID &id, const LLAvatarName& av_name) { static const U32 max_collision_list_size = 20; if (gMeanCollisionList.size() > max_collision_list_size) @@ -6200,7 +6223,7 @@ void mean_name_callback(const LLUUID &id, const std::string& full_name, bool is_ LLMeanCollisionData *mcd = *iter; if (mcd->mPerp == id) { - mcd->mFullName = full_name; + mcd->mFullName = av_name.getUserName(); } } } @@ -6254,7 +6277,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use { LLMeanCollisionData *mcd = new LLMeanCollisionData(gAgentID, perp, time, type, mag); gMeanCollisionList.push_front(mcd); - gCacheName->get(perp, false, boost::bind(&mean_name_callback, _1, _2, _3)); + LLAvatarNameCache::get(perp, boost::bind(&mean_name_callback, _1, _2)); } } LLFloaterBump* bumps_floater = LLFloaterBump::getInstance(); @@ -7031,8 +7054,8 @@ void send_lures(const LLSD& notification, const LLSD& response) // Record the offer. { - std::string target_name; - gCacheName->getFullName(target_id, target_name); // for im log filenames + LLAvatarName av_name; + LLAvatarNameCache::get(target_id, &av_name); // for im log filenames LLSD args; args["TO_NAME"] = LLSLURL("agent", target_id, "completename").getSLURLString();; @@ -7117,10 +7140,10 @@ bool teleport_request_callback(const LLSD& notification, const LLSD& response) return false; } - std::string from_name; - gCacheName->getFullName(from_id, from_name); + LLAvatarName av_name; + LLAvatarNameCache::get(from_id, &av_name); - if(LLMuteList::getInstance()->isMuted(from_id) && !LLMuteList::getInstance()->isLinden(from_name)) + if(LLMuteList::getInstance()->isMuted(from_id) && !LLMuteList::getInstance()->isLinden(av_name.getUserName())) { return false; } @@ -7395,8 +7418,7 @@ bool callback_load_url(const LLSD& notification, const LLSD& response) } static LLNotificationFunctorRegistration callback_load_url_reg("LoadWebPage", callback_load_url); - -// We've got the name of the person who owns the object hurling the url. +// We've got the name of the person or group that owns the object hurling the url. // Display confirmation dialog. void callback_load_url_name(const LLUUID& id, const std::string& full_name, bool is_group) { @@ -7438,6 +7460,12 @@ void callback_load_url_name(const LLUUID& id, const std::string& full_name, bool } } +// We've got the name of the person who owns the object hurling the url. +void callback_load_url_avatar_name(const LLUUID& id, const LLAvatarName& av_name) +{ + callback_load_url_name(id, av_name.getUserName(), false); +} + void process_load_url(LLMessageSystem* msg, void**) { LLUUID object_id; @@ -7475,8 +7503,14 @@ void process_load_url(LLMessageSystem* msg, void**) // Add to list of pending name lookups gLoadUrlList.push_back(payload); - gCacheName->get(owner_id, owner_is_group, - boost::bind(&callback_load_url_name, _1, _2, _3)); + if (owner_is_group) + { + gCacheName->getGroup(owner_id, boost::bind(&callback_load_url_name, _1, _2, _3)); + } + else + { + LLAvatarNameCache::get(owner_id, boost::bind(&callback_load_url_avatar_name, _1, _2)); + } } From 49b448b7782811949560d155c273ac8444e25fc1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 22 Feb 2017 18:31:12 +0200 Subject: [PATCH 017/116] MAINT-7118 fixed erroneous name check --- indra/newview/lltoolpie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 9acf9080bf..fc052ae3aa 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -883,7 +883,7 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) } else if (hover_parcel->getIsGroupOwned()) { - if (gCacheName->getFullName(owner, name)) //group? + if (gCacheName->getGroupName(owner, name)) { line.append(name); line.append(LLTrans::getString("TooltipIsGroup")); From 121bc7826ba437a700ceb888d087516519a6f1a4 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 23 Feb 2017 09:06:51 +0100 Subject: [PATCH 018/116] Fix toybox floater size --- indra/newview/skins/default/xui/en/floater_toybox.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 561960a694..79c2011404 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -4,7 +4,7 @@ can_dock="false" can_minimize="false" can_resize="false" - height="505" + height="525" help_topic="toybox" layout="topleft" legacy_header_height="18" @@ -13,7 +13,7 @@ save_rect="true" single_instance="true" title="Toolbar Buttons" - width="825"> + width="850"> Date: Thu, 23 Feb 2017 09:13:54 +0100 Subject: [PATCH 019/116] Update German translation --- .../newview/skins/default/xui/de/menu_viewer.xml | 1 + .../skins/default/xui/de/notifications.xml | 1 - indra/newview/skins/default/xui/de/strings.xml | 16 ++++++++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 04dc887e6f..5fb3a8225a 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -70,6 +70,7 @@ + diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 2d165e9111..03bc8e6711 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -1817,7 +1817,6 @@ Diese Gruppe verlassen? Nicht-stören-Modus ist aktiviert: Sie erhalten keine Benachrichtigung über eingehende Kommunikation. - Andere Einwohner erhalten Ihre Nicht-stören-Antwort (festgelegt in Einstellungen > Privatsphäre > Automatische Antwort). -- Teleport-Angebote werden abgelehnt. - Voice-Anrufe werden abgelehnt. diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index f91a32c75c..0607d52d52 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -4718,7 +4718,10 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ Konferenz mit [AGENT_NAME] - Inventarobjekt angeboten + Inventarobjekt „[ITEM_NAME]“ angeboten + + + Inventarordner „[ITEM_NAME]“ angeboten Objekte aus dem Inventar hier her ziehen @@ -4810,7 +4813,10 @@ Falls die Nachricht nicht innerhalb der nächsten Minuten erscheint, wurde sie v Position für Zuhause festgelegt. - http://secondlife.com/landing/voicemorphing + https://secondlife.com/destination/voice-island + + + https://secondlife.com/destination/voice-morphing-premium [NAME] hat Ihnen [REASON] [AMOUNT] L$ bezahlt. @@ -5647,6 +5653,9 @@ Setzen Sie den Editorpfad in Anführungszeichen Gesten + + Grid-Status + Infos @@ -5828,6 +5837,9 @@ Setzen Sie den Editorpfad in Anführungszeichen Gesten für Ihren Avatar (Strg+G) + + Den aktuellen Grid-Status anzeigen + Wie führe ich gängige Aufgaben aus? From 01e3226ddfba2d96d04af35c48486d6dcb7c34c5 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 23 Feb 2017 09:22:19 +0100 Subject: [PATCH 020/116] Link grid status menu item with new grid status floater --- .../newview/skins/default/xui/en/menu_viewer.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ed558636f2..e3f3f24383 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2117,16 +2117,19 @@ parameter="http://community.secondlife.com/t5/Blogs/ct-p/Blogs"/> --> - - - + + - + From 4608aeb505c5b9fb31f3f4a1f3a7c4b744fae87b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 23 Feb 2017 10:54:25 +0100 Subject: [PATCH 021/116] Transplant MAINT-7118 and fix some bad design on the way --- indra/newview/chatbar_as_cmdline.cpp | 18 ++++++----- indra/newview/daeexport.cpp | 4 +-- indra/newview/fsareasearch.cpp | 39 +++++++++++++++++++----- indra/newview/fsareasearch.h | 2 ++ indra/newview/fschathistory.cpp | 6 ++-- indra/newview/fsdata.cpp | 43 ++++++++++++++++++++++++--- indra/newview/fsdata.h | 6 ++++ indra/newview/fsfloaterexport.cpp | 5 ++-- indra/newview/fsfloaternearbychat.cpp | 4 +-- indra/newview/fsnearbychathub.cpp | 20 +++++++++++-- indra/newview/fspanelprofile.cpp | 5 ++-- indra/newview/llfloaterbump.cpp | 6 ++-- indra/newview/llinspectavatar.cpp | 6 ++-- indra/newview/llinventorybridge.cpp | 6 +++- indra/newview/llspeakers.cpp | 4 +++ 15 files changed, 135 insertions(+), 39 deletions(-) diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 3ce1c3e413..9429097a79 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -526,6 +526,16 @@ void invrepair() gInventory.collectDescendents(gInventory.getRootFolderID(), cats, items, FALSE); } +void key_to_name_callback(const LLUUID& id, const LLAvatarName& av_name) +{ + std::string name = av_name.getCompleteName(); + if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, id)) + { + name = RlvStrings::getAnonym(name); + } + report_to_nearby_chat(llformat("%s: (%s)", id.asString().c_str(), name.c_str())); +} + bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_gesture) { static LLCachedControl sFSCmdLine(gSavedSettings, "FSCmdLine"); @@ -701,13 +711,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge LLUUID target_key; if (i >> target_key) { - std::string object_name; - gCacheName->getFullName(target_key, object_name); - if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, target_key)) - { - object_name = RlvStrings::getAnonym(object_name); - } - report_to_nearby_chat(llformat("%s: (%s)", target_key.asString().c_str(), object_name.c_str())); + LLAvatarNameCache::get(target_key, boost::bind(&key_to_name_callback, _1, _2)); } return false; } diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp index c9f3a9f7f3..cdcd04b137 100644 --- a/indra/newview/daeexport.cpp +++ b/indra/newview/daeexport.cpp @@ -743,9 +743,7 @@ bool DAESaver::saveDAE(std::string filename) up_axis->setCharData("Z_UP"); // File creator - std::string author = "Unknown"; - if (gCacheName) - gCacheName->getFullName(gAgentID, author); + std::string author = gAgentUsername; daeElement* contributor = asset->add("contributor"); contributor->add("author")->setCharData(author); diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp index 4833a5d7b9..d1b0e1752e 100644 --- a/indra/newview/fsareasearch.cpp +++ b/indra/newview/fsareasearch.cpp @@ -29,6 +29,7 @@ #include "fsareasearch.h" +#include "llavatarnamecache.h" #include "llscrolllistctrl.h" #include "lllineeditor.h" #include "lltextbox.h" @@ -1076,17 +1077,41 @@ void FSAreaSearch::updateObjectCosts(const LLUUID& object_id, F32 object_cost, F void FSAreaSearch::getNameFromUUID(LLUUID& id, std::string& name, BOOL group, bool& name_requested) { - BOOL is_group; - - if(!gCacheName->getIfThere(id, name, is_group)) + if (group) { - if(std::find(mNamesRequested.begin(), mNamesRequested.end(), id) == mNamesRequested.end()) + BOOL is_group; + if(!gCacheName->getIfThere(id, name, is_group)) { - mNamesRequested.push_back(id); - gCacheName->get(id, group, boost::bind(&FSAreaSearch::callbackLoadFullName, this, _1, _2)); + if(std::find(mNamesRequested.begin(), mNamesRequested.end(), id) == mNamesRequested.end()) + { + mNamesRequested.push_back(id); + gCacheName->get(id, group, boost::bind(&FSAreaSearch::callbackLoadFullName, this, _1, _2)); + } + name_requested = true; } - name_requested = true; } + else + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(id, &av_name)) + { + name = av_name.getUserName(); + } + else + { + if(std::find(mNamesRequested.begin(), mNamesRequested.end(), id) == mNamesRequested.end()) + { + mNamesRequested.push_back(id); + LLAvatarNameCache::get(id, boost::bind(&FSAreaSearch::avatarNameCacheCallback, this, _1, _2)); + } + name_requested = true; + } + } +} + +void FSAreaSearch::avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& av_name) +{ + callbackLoadFullName(id, av_name.getUserName()); } void FSAreaSearch::callbackLoadFullName(const LLUUID& id, const std::string& full_name) diff --git a/indra/newview/fsareasearch.h b/indra/newview/fsareasearch.h index d308f26ab6..98fe81808e 100644 --- a/indra/newview/fsareasearch.h +++ b/indra/newview/fsareasearch.h @@ -37,6 +37,7 @@ #include #include "llscrolllistcolumn.h" +class LLAvatarName; class LLTextBox; class LLViewerRegion; class LLCheckBoxCtrl; @@ -112,6 +113,7 @@ public: virtual void draw(); virtual void onOpen(const LLSD& key); + void avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& av_name); void callbackLoadFullName(const LLUUID& id, const std::string& full_name); void processObjectProperties(LLMessageSystem* msg); void updateObjectCosts(const LLUUID& object_id, F32 object_cost, F32 link_cost, F32 physics_cost, F32 link_physics_cost); diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index 1e832201b3..c74c2371d7 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -306,9 +306,9 @@ public: void mute(const LLUUID& participant_id, U32 flags) { BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags); - std::string name; - gCacheName->getFullName(participant_id, name); - LLMute mute(participant_id, name, LLMute::AGENT); + LLAvatarName av_name; + LLAvatarNameCache::get(participant_id, &av_name); + LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT); if (!is_muted) { diff --git a/indra/newview/fsdata.cpp b/indra/newview/fsdata.cpp index 1359a794ec..0468d08681 100644 --- a/indra/newview/fsdata.cpp +++ b/indra/newview/fsdata.cpp @@ -86,6 +86,18 @@ FSData::FSData() : mFSDataURL = mBaseURL + "/" + "data.xml"; } +FSData::~FSData() +{ + for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + } + mAvatarNameCacheConnections.clear(); +} + void FSData::processResponder(const LLSD& content, const std::string& url, bool save_to_file, const LLDate& last_modified) { if (url == mFSDataURL) @@ -783,6 +795,21 @@ bool FSData::isAgentFlag(const LLUUID& agent_id, flags_t flag) return (iter->second & flag); } +void FSData::onNameCache(const LLUUID& av_id, const LLAvatarName& av_name) +{ + avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id); + if (it != mAvatarNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); + } + LLMute mute(av_id, av_name.getUserName(), LLMute::EXTERNAL); + LLMuteList::getInstance()->add(mute); +} + // this is called in two different places due to can recieved .xml before gCacheName is created and vice versa. void FSData::addAgents() { @@ -796,10 +823,18 @@ void FSData::addAgents() if (iter->second & NO_SPAM) { LLUUID id = iter->first; - std::string name; - gCacheName->getFullName(id, name); - LLMute mute(id, name, LLMute::EXTERNAL); - LLMuteList::getInstance()->add(mute); + avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(id); + if (it != mAvatarNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); + } + + LLAvatarNameCache::callback_connection_t cb = LLAvatarNameCache::get(id, boost::bind(&FSData::onNameCache, this, _1, _2)); + mAvatarNameCacheConnections.insert(std::make_pair(id, cb)); } } } diff --git a/indra/newview/fsdata.h b/indra/newview/fsdata.h index 16bb3dbf32..45c13ebca1 100644 --- a/indra/newview/fsdata.h +++ b/indra/newview/fsdata.h @@ -30,12 +30,14 @@ #include "llinstantmessage.h" #include "llsingleton.h" +#include "llavatarnamecache.h" class FSData : public LLSingleton { LOG_CLASS(FSData); LLSINGLETON(FSData); + virtual ~FSData(); public: @@ -90,6 +92,7 @@ private: void processData(const LLSD& fs_data); void processClientTags(const LLSD& tags); void updateClientTagsLocal(); + void onNameCache(const LLUUID& av_id, const LLAvatarName& av_name); std::map mSupportAgents; std::map mBlockedVersions; @@ -114,6 +117,9 @@ private: bool mLegacySearch; bool mFSDataDone; bool mAgentsDone; + + typedef std::map avatar_name_cache_connection_map_t; + avatar_name_cache_connection_map_t mAvatarNameCacheConnections; }; #endif // FS_DATA_H diff --git a/indra/newview/fsfloaterexport.cpp b/indra/newview/fsfloaterexport.cpp index 7ba7f6c62e..d5bca1e9a5 100644 --- a/indra/newview/fsfloaterexport.cpp +++ b/indra/newview/fsfloaterexport.cpp @@ -299,9 +299,8 @@ bool FSFloaterObjectExport::exportSelection() mAssetRequests.clear(); mTextureChecked.clear(); - std::string author = "Unknown"; - if (gCacheName) - gCacheName->getFullName(gAgentID, author); + std::string author = gAgentUsername; + time_t rawtime; time(&rawtime); struct tm* utc_time = gmtime(&rawtime); diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp index b8572105c3..3d49ae820c 100644 --- a/indra/newview/fsfloaternearbychat.cpp +++ b/indra/newview/fsfloaternearbychat.cpp @@ -564,8 +564,8 @@ void FSFloaterNearbyChat::loadHistory() } std::string legacy_name = gCacheName->buildLegacyName(from); - gCacheName->getUUID(legacy_name, from_id); - } + from_id = LLAvatarNameCache::findIdByName(legacy_name); + } LLChat chat; chat.mFromName = from; diff --git a/indra/newview/fsnearbychathub.cpp b/indra/newview/fsnearbychathub.cpp index eeb1177ffb..6bfbc2c722 100644 --- a/indra/newview/fsnearbychathub.cpp +++ b/indra/newview/fsnearbychathub.cpp @@ -35,6 +35,7 @@ #include "fsnearbychatcontrol.h" #include "llagent.h" // gAgent #include "llanimationstates.h" // ANIM_AGENT_WHISPER, ANIM_AGENT_TALK, ANIM_AGENT_SHOUT +#include "llavatarnamecache.h" #include "llchatentry.h" #include "llcommandhandler.h" #include "llgesturemgr.h" @@ -752,8 +753,10 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 * // Look for a match while (iter != avatar_ids.end() && !found) { - if (gCacheName->getFullName(*iter++, name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(*iter++, &av_name)) { + name = av_name.getUserName(); if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) { name = RlvStrings::getAnonym(name); @@ -778,8 +781,10 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 * // Look for a match while (iter != avatar_ids.end() && !found) { - if (gCacheName->getFullName(*iter++, name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(*iter++, &av_name)) { + name = av_name.getUserName(); if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) { name = RlvStrings::getAnonym(name); @@ -794,7 +799,16 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 * if (found) { std::string first_name, last_name; - gCacheName->getFirstLastName(*(iter - 1), first_name, last_name); + LLAvatarName av_name; + LLAvatarNameCache::get(*(iter - 1), &av_name); + std::string username = av_name.getLegacyName(); + size_t delim_pos = username.find(' '); + first_name = username.substr(0, delim_pos); + if (delim_pos + 1 < username.length()) + { + last_name = username.substr(delim_pos + 1, std::string::npos); + } + std::string rest_of_match; std::string replaced_text; if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) diff --git a/indra/newview/fspanelprofile.cpp b/indra/newview/fspanelprofile.cpp index f388ed32a4..cda2b4e05d 100644 --- a/indra/newview/fspanelprofile.cpp +++ b/indra/newview/fspanelprofile.cpp @@ -589,8 +589,9 @@ void FSPanelProfileSecondLife::unfreeze() void FSPanelProfileSecondLife::csr() { - std::string name; - gCacheName->getFullName(getAvatarId(), name); + LLAvatarName av_name; + LLAvatarNameCache::get(getAvatarId(), &av_name); + std::string name = av_name.getUserName(); LLAvatarActions::csr(getAvatarId(), name); } diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 066651bf09..abd025ddbf 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -43,6 +43,7 @@ #include "llviewermenu.h" #include "llviewerobjectlist.h" +#include "llavatarnamecache.h" #include "fsradar.h" #include "fsscrolllistctrl.h" #include "llclipboard.h" @@ -417,8 +418,9 @@ bool FSBumpListMenu::onContextMenuItemEnable(const LLSD& userdata) { if (!gMeanCollisionList.empty() && mUUIDs.size() == 1) { - std::string name; - gCacheName->getFullName(mUUIDs.front(), name); + LLAvatarName av_name; + LLAvatarNameCache::get(mUUIDs.front(), &av_name); + std::string name = av_name.getUserName(); return LLMuteList::getInstance()->isMuted(mUUIDs.front(), name); } else diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 22e8bbf828..c8a32f83c3 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -50,6 +50,7 @@ // Undo CHUI-90 and make avatar inspector useful again #include "llagentdata.h" +#include "llavatarnamecache.h" #include "llcallingcard.h" #include "llfloaterreporter.h" #include "llfloaterworldmap.h" @@ -798,8 +799,9 @@ void LLInspectAvatar::onClickKick() void LLInspectAvatar::onClickCSR() { - std::string name; - gCacheName->getFullName(mAvatarID, name); + LLAvatarName av_name; + LLAvatarNameCache::get(mAvatarID, &av_name); + std::string name = av_name.getUserName(); LLAvatarActions::csr(mAvatarID, name); closeFloater(); } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index f59c52817f..94c6e2b063 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7997,8 +7997,12 @@ std::string LLInvFVBridge::getSearchableCreator( void ) const std::string strCreator; if(pItem) { - if( gCacheName->getFullName( pItem->getCreatorUUID(), strCreator ) ) + LLAvatarName av_name; + if (LLAvatarNameCache::get(pItem->getCreatorUUID(), &av_name)) + { + strCreator = av_name.getUserName(); LLStringUtil::toUpper( strCreator ); + } } return strCreator; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index b3f6f86220..965592252c 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -78,6 +78,10 @@ void LLSpeaker::lookupName() { if (mDisplayName.empty()) { + // Crash fix on login + if(!gCacheName) + return; + // LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group??? } } From 2b9a8d72557f87e964cf98d2490bfea12cb72978 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 23 Feb 2017 11:07:11 +0100 Subject: [PATCH 022/116] Fix line endings --- indra/newview/llspeakers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 965592252c..ca773d8c1a 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -78,10 +78,10 @@ void LLSpeaker::lookupName() { if (mDisplayName.empty()) { - // Crash fix on login - if(!gCacheName) - return; - // + // Crash fix on login + if(!gCacheName) + return; + // LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group??? } } From 687da1144c95c67d1d2f32b7895ffc8319d7acdf Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 23 Feb 2017 11:15:33 +0100 Subject: [PATCH 023/116] Just in case gAgentUsername is empty... --- indra/newview/daeexport.cpp | 4 +++- indra/newview/fsfloaterexport.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp index cdcd04b137..9c061107f9 100644 --- a/indra/newview/daeexport.cpp +++ b/indra/newview/daeexport.cpp @@ -743,7 +743,9 @@ bool DAESaver::saveDAE(std::string filename) up_axis->setCharData("Z_UP"); // File creator - std::string author = gAgentUsername; + std::string author = "Unknown"; + if (!gAgentUsername.empty()) + author = gAgentUsername; daeElement* contributor = asset->add("contributor"); contributor->add("author")->setCharData(author); diff --git a/indra/newview/fsfloaterexport.cpp b/indra/newview/fsfloaterexport.cpp index d5bca1e9a5..40baea6dd9 100644 --- a/indra/newview/fsfloaterexport.cpp +++ b/indra/newview/fsfloaterexport.cpp @@ -299,7 +299,9 @@ bool FSFloaterObjectExport::exportSelection() mAssetRequests.clear(); mTextureChecked.clear(); - std::string author = gAgentUsername; + std::string author = "Unknown"; + if (!gAgentUsername.empty()) + author = gAgentUsername; time_t rawtime; time(&rawtime); From f88881884fe3fd72eb0cada7cb23095ae53f8658 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 23 Feb 2017 12:17:59 +0200 Subject: [PATCH 024/116] MAINT-7138 Fix Agent Limit field and spinner cap in Region/Estate floater --- indra/llmessage/message_prehash.cpp | 1 + indra/llmessage/message_prehash.h | 1 + indra/newview/llfloaterregioninfo.cpp | 4 ++++ indra/newview/llregioninfomodel.cpp | 4 ++++ indra/newview/llregioninfomodel.h | 2 ++ 5 files changed, 12 insertions(+) diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp index 5c6b3d5fab..6675e12649 100644 --- a/indra/llmessage/message_prehash.cpp +++ b/indra/llmessage/message_prehash.cpp @@ -618,6 +618,7 @@ char const* const _PREHASH_GroupAccountSummaryRequest = LLMessageStringTable::ge char const* const _PREHASH_GroupVoteHistoryRequest = LLMessageStringTable::getInstance()->getString("GroupVoteHistoryRequest"); char const* const _PREHASH_ParamValue = LLMessageStringTable::getInstance()->getString("ParamValue"); char const* const _PREHASH_MaxAgents = LLMessageStringTable::getInstance()->getString("MaxAgents"); +char const* const _PREHASH_HardMaxAgents = LLMessageStringTable::getInstance()->getString("HardMaxAgents"); char const* const _PREHASH_CreateNewOutfitAttachments = LLMessageStringTable::getInstance()->getString("CreateNewOutfitAttachments"); char const* const _PREHASH_RegionHandle = LLMessageStringTable::getInstance()->getString("RegionHandle"); char const* const _PREHASH_TeleportProgress = LLMessageStringTable::getInstance()->getString("TeleportProgress"); diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h index e696c3b0ca..a510b4498f 100644 --- a/indra/llmessage/message_prehash.h +++ b/indra/llmessage/message_prehash.h @@ -618,6 +618,7 @@ extern char const* const _PREHASH_GroupAccountSummaryRequest; extern char const* const _PREHASH_GroupVoteHistoryRequest; extern char const* const _PREHASH_ParamValue; extern char const* const _PREHASH_MaxAgents; +extern char const* const _PREHASH_HardMaxAgents; extern char const* const _PREHASH_CreateNewOutfitAttachments; extern char const* const _PREHASH_RegionHandle; extern char const* const _PREHASH_TeleportProgress; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 843dbbf25e..75d7d787b1 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -357,6 +357,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) std::string sim_type = LLTrans::getString("land_type_unknown"); U64 region_flags; U8 agent_limit; + S32 hard_agent_limit; F32 object_bonus_factor; U8 sim_access; F32 water_height; @@ -366,6 +367,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) F32 sun_hour; msg->getString("RegionInfo", "SimName", sim_name); msg->getU8("RegionInfo", "MaxAgents", agent_limit); + msg->getS32("RegionInfo2", "HardMaxAgents", hard_agent_limit); msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor); msg->getU8("RegionInfo", "SimAccess", sim_access); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height); @@ -412,6 +414,8 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->getChild("object_bonus_spin")->setValue(LLSD(object_bonus_factor) ); panel->getChild("access_combo")->setValue(LLSD(sim_access) ); + panel->getChild("agent_limit_spin")->setMaxValue(hard_agent_limit); + LLPanelRegionGeneralInfo* panel_general = LLFloaterRegionInfo::getPanelGeneral(); if (panel) { diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp index 25c576468b..25d7be831f 100644 --- a/indra/newview/llregioninfomodel.cpp +++ b/indra/newview/llregioninfomodel.cpp @@ -40,6 +40,7 @@ void LLRegionInfoModel::reset() { mSimAccess = 0; mAgentLimit = 0; + mHardAgentLimit = 100; mRegionFlags = 0; mEstateID = 0; @@ -143,6 +144,7 @@ void LLRegionInfoModel::update(LLMessageSystem* msg) msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, mParentEstateID); msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_SimAccess, mSimAccess); msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_MaxAgents, mAgentLimit); + msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_ObjectBonusFactor, mObjectBonusFactor); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_BillableFactor, mBillableFactor); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, mWaterHeight); @@ -158,6 +160,8 @@ void LLRegionInfoModel::update(LLMessageSystem* msg) msg->getF32(_PREHASH_RegionInfo, _PREHASH_SunHour, mSunHour); LL_DEBUGS("Windlight Sync") << "Got region sun hour: " << mSunHour << LL_ENDL; + msg->getS32Fast(_PREHASH_RegionInfo2, _PREHASH_HardMaxAgents, mHardAgentLimit); + if (msg->has(_PREHASH_RegionInfo3)) { msg->getU64Fast(_PREHASH_RegionInfo3, _PREHASH_RegionFlagsExtended, mRegionFlags); diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h index ea9640efda..baeff82fef 100644 --- a/indra/newview/llregioninfomodel.h +++ b/indra/newview/llregioninfomodel.h @@ -53,6 +53,8 @@ public: U8 mSimAccess; U8 mAgentLimit; + S32 mHardAgentLimit; + U64 mRegionFlags; U32 mEstateID; U32 mParentEstateID; From 043d13d5e48b1397de1f84cb19b7d2d85a9757f1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 23 Feb 2017 19:38:12 +0200 Subject: [PATCH 025/116] MAINT-2132 Fixed Avatar hasn't animation while moving if wear and detach object in edit mode --- indra/newview/llselectmgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 5ebf7cfe13..353c61da0c 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6619,7 +6619,7 @@ void LLSelectMgr::updateSelectionCenter() { mSelectedObjects->mSelectType = getSelectTypeForObject(object); - if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid()) + if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid() && object->getParent() != NULL) { mPauseRequest = gAgentAvatarp->requestPause(); } From fd756828a762082c8ae4fa3d69516241ecb1b858 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 24 Feb 2017 17:41:39 +0200 Subject: [PATCH 026/116] MAINT-3509 Fixed Context menu orphaned when Inventory floater is closed by keyboard shortcut --- indra/llui/llmenugl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 8425774d46..022f814bbc 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3342,6 +3342,12 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask) return TRUE; } + if (result && !getHighlightedItem() && LLMenuGL::sMenuContainer->hasVisibleMenu()) + { + // close menus originating from other menu bars + LLMenuGL::sMenuContainer->hideMenus(); + } + return result; } From ba99caa574d1e346aecf2f0fe39d46d340f8afbf Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 27 Feb 2017 16:43:17 +0200 Subject: [PATCH 027/116] MAINT-1206 "Save as" only works once when making skins in the new appearance editor --- indra/newview/llsidepanelappearance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 3e95811bb8..d6bf2164a0 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -388,7 +388,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab return; } - if (mEditWearable->getVisible() == visible && (!visible || mEditWearable->getWearable() != wearable)) + if (mEditWearable->getVisible() == visible && (!visible || mEditWearable->getWearable() == wearable)) { // visibility isn't changing and panel doesn't need an update, hence nothing to do return; From 6c80f7369aaf2cddea55e288b5c402fba54f5d98 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Mon, 27 Feb 2017 19:27:18 +0200 Subject: [PATCH 028/116] MAINT-3235 Stand button not centered when left toolbar is empty --- indra/newview/llmoveview.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index c3dd08c327..4999318973 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -730,9 +730,16 @@ void LLPanelStandStopFlying::updatePosition() panel_ssf_container->setOrigin(0, y_pos); } - S32 x_pos = bottom_tb_center-getRect().getWidth()/2 - left_tb_width; - - setOrigin( x_pos, 0); + if (gToolBarView != NULL && gToolBarView->getToolbar(LLToolBarEnums::TOOLBAR_LEFT)->hasButtons()) + { + S32 x_pos = bottom_tb_center - getRect().getWidth() / 2 - left_tb_width; + setOrigin( x_pos, 0); + } + else + { + S32 x_pos = bottom_tb_center - getRect().getWidth() / 2; + setOrigin( x_pos, 0); + } } // EOF From 9bd3a99f20ff6e73f5ea2245a21a94c5882ca673 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 28 Feb 2017 18:34:18 +0200 Subject: [PATCH 029/116] MAINT-908 Build Tool has wrong screen priority and can stay behind other floaters when called --- indra/newview/llviewermenu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a92ecd2036..605d1a04e6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8402,6 +8402,15 @@ class LLToolsSelectTool : public view_listener_t { LLToolMgr::getInstance()->getCurrentToolset()->selectToolByIndex(5); } + + // Note: if floater is not visible LLViewerWindow::updateLayout() will + // attempt to open it, but it won't bring it to front or de-minimize. + if (gFloaterTools && (gFloaterTools->isMinimized() || !gFloaterTools->isShown() || !gFloaterTools->isFrontmost())) + { + gFloaterTools->setMinimized(FALSE); + gFloaterTools->openFloater(); + gFloaterTools->setVisibleAndFrontmost(TRUE); + } return true; } }; From b4c4a951c161e43bf66141248f0c94b97848ae98 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 1 Mar 2017 17:53:26 +0200 Subject: [PATCH 030/116] MAINT-3604 Extend llTextBox message lines according to it's length --- indra/newview/lltoastscripttextbox.cpp | 57 ++++++++------ indra/newview/lltoastscripttextbox.h | 3 + .../default/xui/en/panel_notify_textbox.xml | 78 ++++++++++--------- 3 files changed, 79 insertions(+), 59 deletions(-) diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp index 78d9e92b5c..776ae2ece9 100644 --- a/indra/newview/lltoastscripttextbox.cpp +++ b/indra/newview/lltoastscripttextbox.cpp @@ -28,31 +28,21 @@ #include "lltoastscripttextbox.h" -#include "llfocusmgr.h" - -#include "llbutton.h" +#include "lllslconstants.h" #include "llnotifications.h" +#include "llstyle.h" +#include "lluiconstants.h" #include "llviewertexteditor.h" -#include "llavatarnamecache.h" -#include "lluiconstants.h" -#include "llui.h" -#include "llviewercontrol.h" -#include "lltrans.h" -#include "llstyle.h" - -#include "llglheaders.h" -#include "llagent.h" - -const S32 LLToastScriptTextbox::DEFAULT_MESSAGE_MAX_LINE_COUNT= 7; +const S32 LLToastScriptTextbox::DEFAULT_MESSAGE_MAX_LINE_COUNT= 14; LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification) : LLToastPanel(notification) { buildFromFile( "panel_notify_textbox.xml"); - LLTextEditor* text_editorp = getChild("text_editor_box"); - text_editorp->setValue(notification->getMessage()); + mInfoText = getChild("text_editor_box"); + mInfoText->setValue(notification->getMessage()); getChild("ignore_btn")->setClickedCallback(boost::bind(&LLToastScriptTextbox::onClickIgnore, this)); @@ -73,13 +63,7 @@ LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification pSubmitBtn->setClickedCallback((boost::bind(&LLToastScriptTextbox::onClickSubmit, this))); setDefaultBtn(pSubmitBtn); - S32 maxLinesCount; - std::istringstream ss( getString("message_max_lines_count") ); - if (!(ss >> maxLinesCount)) - { - maxLinesCount = DEFAULT_MESSAGE_MAX_LINE_COUNT; - } - //snapToMessageHeight(pMessageText, maxLinesCount); + snapToMessageHeight(); } // virtual @@ -92,7 +76,6 @@ void LLToastScriptTextbox::close() die(); } -#include "lllslconstants.h" void LLToastScriptTextbox::onClickSubmit() { LLViewerTextEditor* pMessageText = getChild("message"); @@ -119,3 +102,29 @@ void LLToastScriptTextbox::onClickIgnore() mNotification->respond(response); close(); } + +void LLToastScriptTextbox::snapToMessageHeight() +{ + LLPanel* info_pan = getChild("info_panel"); + if (!info_pan) + { + return; + } + + S32 maxLinesCount; + std::istringstream ss( getString("message_max_lines_count") ); + if (!(ss >> maxLinesCount)) + { + maxLinesCount = DEFAULT_MESSAGE_MAX_LINE_COUNT; + } + + + S32 maxTextHeight = (mInfoText->getFont()->getLineHeight() * maxLinesCount); + S32 oldTextHeight = mInfoText->getRect().getHeight(); + S32 newTextHeight = llmin(mInfoText->getTextBoundingRect().getHeight(), maxTextHeight); + + S32 heightDelta = newTextHeight - oldTextHeight; + + reshape( getRect().getWidth(), llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT)); + info_pan->reshape(info_pan->getRect().getWidth(),newTextHeight); +} diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h index 7d33446248..7aee02dd00 100644 --- a/indra/newview/lltoastscripttextbox.h +++ b/indra/newview/lltoastscripttextbox.h @@ -48,9 +48,12 @@ public: private: + LLTextBox* mInfoText; + void onClickSubmit(); void onClickIgnore(); + void snapToMessageHeight(); static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; }; diff --git a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml index d5b6057233..a679ca7f8c 100644 --- a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml +++ b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml @@ -1,7 +1,7 @@ + value="14" /> - + - + - + left="0" + name="textbox_panel" + top_pad="5" + width="305"> + + + top_pad="5"> From 26d81d3d6cc56f8f8df9f33ff27229671fb8a2db Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 15 Mar 2017 16:01:39 +0200 Subject: [PATCH 059/116] MAINT-7199 Field "From" on the tab "Send via E-mail" should be initialized to the agent full name --- indra/newview/llpanelsnapshotpostcard.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index ebf9153da9..3d18e837af 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -106,6 +106,14 @@ BOOL LLPanelSnapshotPostcard::postBuild() // virtual void LLPanelSnapshotPostcard::onOpen(const LLSD& key) { + LLUICtrl* name_form = getChild("name_form"); + if (name_form && name_form->getValue().asString().empty()) + { + std::string name_string; + LLAgentUI::buildFullname(name_string); + getChild("name_form")->setValue(LLSD(name_string)); + } + LLPanelSnapshot::onOpen(key); } From e1535102faf8e8f3d4b640a565da4acb8bf2b2e2 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 15 Mar 2017 20:12:09 +0100 Subject: [PATCH 060/116] Wire up "AlwaysRenderFriends" debug setting in "World" main menu --- indra/newview/llfloaterpreference.cpp | 6 ++---- indra/newview/skins/default/xui/en/menu_viewer.xml | 11 +++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 0daaf8e3e1..06c5685112 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1238,9 +1238,9 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Fix resetting graphics preset on cancel saveGraphicsPreset(gSavedSettings.getString("PresetGraphicActive")); - bool started = (LLStartUp::getStartupState() == STATE_STARTED); - // FIRE-19810: Make presets global since PresetGraphicActive setting is global as well + //bool started = (LLStartUp::getStartupState() == STATE_STARTED); + //LLButton* load_btn = findChild("PrefLoadButton"); //LLButton* save_btn = findChild("PrefSaveButton"); //LLButton* delete_btn = findChild("PrefDeleteButton"); @@ -1250,8 +1250,6 @@ void LLFloaterPreference::onOpen(const LLSD& key) //save_btn->setEnabled(started); //delete_btn->setEnabled(started); //exceptions_btn->setEnabled(started); - LLButton* exceptions_btn = findChild("RenderExceptionsButton"); - exceptions_btn->setEnabled(started); // // Hook up and init for filtering diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index e3f3f24383..70c6ae4d92 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1216,6 +1216,7 @@ function="Floater.Toggle" parameter="fs_asset_blacklist" /> + @@ -1223,6 +1224,16 @@ function="Floater.Toggle" parameter="fs_avatar_render_settings" /> + + + + From 486e5b068cc2f44efea0a2b70b8dacfce848d5b0 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 15 Mar 2017 20:14:09 +0100 Subject: [PATCH 061/116] Performance improvement --- indra/newview/llvoavatar.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c5e5e03494..212f1254c6 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7864,7 +7864,11 @@ BOOL LLVOAvatar::isFullyLoaded() const bool LLVOAvatar::isTooComplex() const { bool too_complex; - bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && gSavedSettings.getBOOL("AlwaysRenderFriends")); + // Performance improvement + //bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && gSavedSettings.getBOOL("AlwaysRenderFriends")); + static LLCachedControl alwaysRenderFriends(gSavedSettings, "AlwaysRenderFriends"); + bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && alwaysRenderFriends); + // if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER) { From cf5ecd69d39c25283bc4ff83d8747dd6363b9693 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 15 Mar 2017 20:16:54 +0100 Subject: [PATCH 062/116] Update German translation --- indra/newview/skins/default/xui/de/menu_viewer.xml | 1 + indra/newview/skins/default/xui/de/notifications.xml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 5fb3a8225a..ec30fb16f3 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -138,6 +138,7 @@ + diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 03bc8e6711..e2907d4fea 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -777,6 +777,9 @@ Stellen Sie sicher, dass kein Objekt gesperrt ist und alle Objekte Ihnen gehöre Objekte können nicht über Regionsgrenzen hinweg verknüpft werden. + + Objekte können nicht über Regionsgrenzen hinweg verknüpft werden. + Verknüpfung nicht möglich, da nicht alle Objekte denselben Eigentümer haben. From 00d085c575bae7bee0bf56e80a78ed648e6643af Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 15 Mar 2017 23:08:43 +0100 Subject: [PATCH 063/116] Fix copy & paste bug --- indra/llrender/llrender2dutils.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 7377f822be..8c5e43b88e 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -1304,7 +1304,6 @@ void gl_rect_2d_simple( S32 width, S32 height ) gGL.vertex2i(width, height); gGL.vertex2i(0, 0); gGL.vertex2i(width, 0); - gGL.vertex2i( width, height ); } gGL.end(); // From 40bb92c99fd2f8b1135c8a69ea959dd115516ea7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 15 Mar 2017 23:32:21 +0100 Subject: [PATCH 064/116] Make sure to definitely stop typing after 5 secs, even if we don't receive the timeout via process_chat_from_simulator --- indra/newview/llvoavatarself.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4bc91f635b..b84ed40e40 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1008,6 +1008,13 @@ void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time) { LLVOAvatar::idleUpdate(agent, time); idleUpdateTractorBeam(); + + // Make sure to definitely stop typing + if ((gAgent.getTypingTime() > LLAgent::TYPING_TIMEOUT_SECS) && (gAgent.getRenderState() & AGENT_STATE_TYPING)) + { + gAgent.stopTyping(); + } + // } } From 7db48d03bc54b47739a7cfa0a69779b15ed16067 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 15 Mar 2017 23:44:39 +0100 Subject: [PATCH 065/116] Remove upgrade code reference from Win64 build readme --- README_BUILD_FIRESTORM_WIN64.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README_BUILD_FIRESTORM_WIN64.txt b/README_BUILD_FIRESTORM_WIN64.txt index aa44b24907..923a869cb2 100755 --- a/README_BUILD_FIRESTORM_WIN64.txt +++ b/README_BUILD_FIRESTORM_WIN64.txt @@ -11,11 +11,7 @@ Make sure you're not building from a Visual Studio command prompt, or parts of t chain might accidentally pick up a 32 bit compiler, resulting in x86<>x64 mismatch. Configure/build is nearly the same as building a 32 bit version. -autobuild -m64 configure -c ReleaseFS -- --chan --package -DFS_UPGRADECODES=',' +autobuild -m64 configure -c ReleaseFS -- --chan --package autobuild -m64 build -c ReleaseFS --no-configure The resulting installer/exe gets created in build-vc120_x64/newview/Release - -GUIDs for the installer can be generated by either GuidGen, or a service like https://www.guidgenerator.com/ -make sure MSI_UPGRADE_CODE and EXE_UPGRADE_CODE are different. - From bc268526b742068027da960c53815b7891bf45c7 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 16 Mar 2017 17:34:47 +0200 Subject: [PATCH 066/116] MAINT-7208 Some messages had links that were not highlighted --- indra/newview/skins/default/xui/en/floater_tos.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_tos.xml b/indra/newview/skins/default/xui/en/floater_tos.xml index 590d9d1844..612c894b59 100644 --- a/indra/newview/skins/default/xui/en/floater_tos.xml +++ b/indra/newview/skins/default/xui/en/floater_tos.xml @@ -70,7 +70,7 @@ top="32" word_wrap="true" width="552"> - You will need to go to my.secondlife.com and log in to accept the Terms of Service before you can proceed. Thank you! + You will need to go to https://my.secondlife.com and log in to accept the Terms of Service before you can proceed. Thank you! Despite our best efforts, something unexpected has gone wrong. -Please check status.secondlifegrid.net to see if there is a known problem with the service. +Please check http://status.secondlifegrid.net to see if there is a known problem with the service. If you continue to experience problems, please check your network and firewall setup. From 3c637e49452229e8df3cce833a275daaef650d9c Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 17 Mar 2017 10:18:31 +0200 Subject: [PATCH 067/116] MAINT-7215 Add "+" button next to filter editor in Avatar rendering settings floater --- .../newview/llfloateravatarrendersettings.cpp | 61 +++++++++++++++++-- indra/newview/llfloateravatarrendersettings.h | 4 ++ .../xui/en/floater_avatar_render_settings.xml | 21 +++++-- .../en/menu_avatar_rendering_settings_add.xml | 18 ++++++ .../xui/en/panel_preferences_graphics1.xml | 2 - 5 files changed, 94 insertions(+), 12 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/menu_avatar_rendering_settings_add.xml diff --git a/indra/newview/llfloateravatarrendersettings.cpp b/indra/newview/llfloateravatarrendersettings.cpp index 530b3bd481..e7ac3f2737 100644 --- a/indra/newview/llfloateravatarrendersettings.cpp +++ b/indra/newview/llfloateravatarrendersettings.cpp @@ -28,6 +28,7 @@ #include "llfloateravatarrendersettings.h" #include "llavatarnamecache.h" +#include "llfloateravatarpicker.h" #include "llfiltereditor.h" #include "llfloaterreg.h" #include "llnamelistctrl.h" @@ -71,6 +72,7 @@ LLFloaterAvatarRenderSettings::LLFloaterAvatarRenderSettings(const LLSD& key) { mContextMenu = new LLSettingsContextMenu(this); LLRenderMuteList::getInstance()->addObserver(&sAvatarRenderMuteListObserver); + mCommitCallbackRegistrar.add("Settings.AddNewEntry", boost::bind(&LLFloaterAvatarRenderSettings::onClickAdd, this, _2)); } LLFloaterAvatarRenderSettings::~LLFloaterAvatarRenderSettings() @@ -84,12 +86,20 @@ BOOL LLFloaterAvatarRenderSettings::postBuild() LLFloater::postBuild(); mAvatarSettingsList = getChild("render_settings_list"); mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3)); - + this->setVisibleCallback(boost::bind(&LLFloaterAvatarRenderSettings::removePicker, this)); getChild("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterAvatarRenderSettings::onFilterEdit, this, _2)); return TRUE; } +void LLFloaterAvatarRenderSettings::removePicker() +{ + if(mPicker.get()) + { + mPicker.get()->closeFloater(); + } +} + void LLFloaterAvatarRenderSettings::draw() { if(mNeedsUpdate) @@ -185,15 +195,15 @@ void LLFloaterAvatarRenderSettings::onCustomAction (const LLSD& userdata, const if ("default" == command_name) { new_setting = S32(LLVOAvatar::AV_RENDER_NORMALLY); - } + } else if ("never" == command_name) - { + { new_setting = S32(LLVOAvatar::AV_DO_NOT_RENDER); } else if ("always" == command_name) - { + { new_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER); - } + } LLVOAvatar *avatarp = find_avatar(av_id); if (avatarp) @@ -233,3 +243,44 @@ void LLFloaterAvatarRenderSettings::setNeedsUpdate() if(!instance) return; instance->mNeedsUpdate = true; } + +void LLFloaterAvatarRenderSettings::onClickAdd(const LLSD& userdata) +{ + const std::string command_name = userdata.asString(); + S32 visual_setting = 0; + if ("never" == command_name) + { + visual_setting = S32(LLVOAvatar::AV_DO_NOT_RENDER); + } + else if ("always" == command_name) + { + visual_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER); + } + + LLView * button = findChild("plus_btn", TRUE); + LLFloater* root_floater = gFloaterView->getParentFloater(this); + LLFloaterAvatarPicker * picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterAvatarRenderSettings::callbackAvatarPicked, this, _1, visual_setting), + FALSE, TRUE, FALSE, root_floater->getName(), button); + + if (root_floater) + { + root_floater->addDependentFloater(picker); + } + + mPicker = picker->getHandle(); +} + +void LLFloaterAvatarRenderSettings::callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting) +{ + if (ids.empty()) return; + + LLVOAvatar *avatarp = find_avatar(ids[0]); + if (avatarp) + { + avatarp->setVisualMuteSettings(LLVOAvatar::VisualMuteSettings(visual_setting)); + } + else + { + LLRenderMuteList::getInstance()->saveVisualMuteSetting(ids[0], visual_setting); + } +} diff --git a/indra/newview/llfloateravatarrendersettings.h b/indra/newview/llfloateravatarrendersettings.h index 367b0620ac..fe727bcf32 100644 --- a/indra/newview/llfloateravatarrendersettings.h +++ b/indra/newview/llfloateravatarrendersettings.h @@ -50,15 +50,19 @@ public: void onFilterEdit(const std::string& search_string); void onCustomAction (const LLSD& userdata, const LLUUID& av_id); bool isActionChecked(const LLSD& userdata, const LLUUID& av_id); + void onClickAdd(const LLSD& userdata); static void setNeedsUpdate(); private: bool isHiddenRow(const std::string& av_name); + void callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting); + void removePicker(); bool mNeedsUpdate; LLListContextMenu* mContextMenu; LLNameListCtrl* mAvatarSettingsList; + LLHandle mPicker; std::string mNameFilter; }; diff --git a/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml b/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml index dd37e329e5..03e812d36d 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml @@ -23,22 +23,33 @@ height="23" layout="topleft" left="8" - right="-8" + right="-47" label="Filter People" max_length_chars="300" name="people_filter_input" text_color="Black" text_pad_left="10" top="4" /> + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 652b7fd029..4692a226d9 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -303,8 +303,6 @@ name="AlwaysRenderFriends" top_delta="24" width="256"> - Date: Sat, 25 Mar 2017 14:31:49 +0100 Subject: [PATCH 083/116] With all the meshes with high res textures flying around nowadays this seems to be a good idea... --- indra/newview/featuretable.txt | 6 +++--- indra/newview/featuretable_linux.txt | 6 +++--- indra/newview/featuretable_mac.txt | 6 +++--- indra/newview/llfeaturemanager.cpp | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index be86cf5803..79613daf1a 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -62,7 +62,7 @@ WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 -RenderCompressTextures 1 0 +RenderCompressTextures 1 1 RenderShaderLightingMaxLevel 1 3 RenderDeferred 1 1 RenderDeferredSSAO 1 1 @@ -360,8 +360,8 @@ RenderVBOEnable 1 1 // // VRAM > 512MB // -//list VRAMGT512 -//RenderCompressTextures 1 0 +list VRAMGT512 +RenderCompressTextures 1 0 // // No Pixel Shaders available diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 2efcad49c8..8d1a61da79 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -62,7 +62,7 @@ WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 -RenderCompressTextures 1 0 +RenderCompressTextures 1 1 RenderShaderLightingMaxLevel 1 3 RenderDeferred 1 1 RenderDeferredSSAO 1 1 @@ -359,8 +359,8 @@ RenderVBOEnable 1 1 // // VRAM > 512MB // -//list VRAMGT512 -//RenderCompressTextures 1 0 +list VRAMGT512 +RenderCompressTextures 1 0 // // No Pixel Shaders available diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index c3fd72d9d2..53f8bfe7f3 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -62,7 +62,7 @@ WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 -RenderCompressTextures 1 0 +RenderCompressTextures 1 1 RenderShaderLightingMaxLevel 1 3 RenderDeferred 1 1 RenderDeferredSSAO 1 1 @@ -386,8 +386,8 @@ RenderShadowDetail 0 0 // // VRAM > 512MB // -//list VRAMGT512 -//RenderCompressTextures 1 0 +list VRAMGT512 +RenderCompressTextures 1 0 // // "Default" setups for safe, low, medium, high diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 639a516397..7cf1b04ebe 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -766,10 +766,10 @@ void LLFeatureManager::applyBaseMasks() { maskFeatures("MapBufferRange"); } - //if (gGLManager.mVRAM > 512) - //{ - // maskFeatures("VRAMGT512"); - //} + if (gGLManager.mVRAM > 512) + { + maskFeatures("VRAMGT512"); + } #if LL_DARWIN const LLOSInfo& osInfo = LLAppViewer::instance()->getOSInfo(); From 5a73e8fc102fbf94ec6660e3be1220d68855ebd3 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 27 Mar 2017 15:20:24 +0300 Subject: [PATCH 084/116] MAINT-7238 Change InventoryMarketplaceError text --- indra/newview/llfloatermarketplacelistings.cpp | 1 + indra/newview/skins/default/xui/en/strings.xml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 18f0bc4498..889d017389 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -603,6 +603,7 @@ void LLFloaterMarketplaceListings::updateView() text = LLTrans::getString("InventoryMarketplaceError", subs); title = LLTrans::getString("InventoryOutboxErrorTitle"); tooltip = LLTrans::getString("InventoryOutboxErrorTooltip"); + LL_WARNS() << "Marketplace status code: " << mkt_status << LL_ENDL; } mInventoryText->setValue(text); diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 5f686a87be..d6c06b0ecc 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2312,7 +2312,8 @@ We are accessing your account on the [[MARKETPLACE_CREATE_STORE_URL] Marketplace The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors. -This feature is currently in Beta. Please add your name to this [http://goo.gl/forms/FCQ7UXkakz Google form] if you would like to participate. +An error occurred while opening Marketplace Listings. +If you continue to receive this message, please contact Second Life support for assistance at http://support.secondlife.com Your Marketplace Listings folder is empty. From f1e00870dfef809b2c2842051140cc720650649a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 28 Mar 2017 11:42:17 +0300 Subject: [PATCH 085/116] MAINT-6980 FIXED Ctrl + Alt + Shift + B does not force a crash on mac --- indra/newview/llappviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 62e32c0bdc..f53ba01d37 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5592,6 +5592,8 @@ void LLAppViewer::forceErrorBreakpoint() LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL; #ifdef LL_WINDOWS DebugBreak(); +#else + asm ("int $3"); #endif return; } From 7603eb51c58db135cf5c49eb10247c8e9ea46bd8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 28 Mar 2017 12:30:20 +0300 Subject: [PATCH 086/116] Backed out changeset: 50e72280019f --- indra/newview/llagentcamera.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 7723dbf978..e335eabd1a 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1537,11 +1537,6 @@ LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal() } else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR) { - LLVector3 focus_target = isAgentAvatarValid() - ? gAgentAvatarp->mHeadp->getWorldPosition() - : gAgent.getPositionAgent(); - LLVector3d focus_target_global = gAgent.getPosGlobalFromAgent(focus_target); - mFocusTargetGlobal = focus_target_global; return mFocusTargetGlobal; } else if (!mFocusOnAvatar) From 45dd355d46dc8ea5a0a6934722ffc76f9d955a9f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 28 Mar 2017 13:56:01 +0300 Subject: [PATCH 087/116] MAINT-1858 Fixed camera not looking at avatar if "Editing Appearance" while moving --- indra/newview/llagentcamera.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index e335eabd1a..5b9f1b9d4f 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1537,6 +1537,14 @@ LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal() } else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR) { + if (mFocusOnAvatar) + { + LLVector3 focus_target = isAgentAvatarValid() + ? gAgentAvatarp->mHeadp->getWorldPosition() + : gAgent.getPositionAgent(); + LLVector3d focus_target_global = gAgent.getPosGlobalFromAgent(focus_target); + mFocusTargetGlobal = focus_target_global; + } return mFocusTargetGlobal; } else if (!mFocusOnAvatar) From 084f7cf44a3259242d28264f0bb191004282dd9c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 28 Mar 2017 16:24:50 +0300 Subject: [PATCH 088/116] MAINT-7257 Added null check for volume manager --- indra/llprimitive/llprimitive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 186716609c..bfa65666b5 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -172,7 +172,7 @@ LLPrimitive::~LLPrimitive() { clearTextureList(); // Cleanup handled by volume manager - if (mVolumep) + if (mVolumep && sVolumeManager) { sVolumeManager->unrefVolume(mVolumep); } From f53e142e7dc0d613f6d3d9b3d276cdc8843cb143 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 30 Mar 2017 00:22:36 +0300 Subject: [PATCH 089/116] MAINT-7128 Crash in LLDrawable::cleanupReferences - more informative logging --- indra/newview/lldrawpoolavatar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 499cf76bff..b221221f16 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -2063,7 +2063,9 @@ void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep) } else { - LL_ERRS() << "Face reference data corrupt for rigged type " << i << LL_ENDL; + LL_ERRS() << "Face reference data corrupt for rigged type " << i + << ((mRiggedFace[i].size() <= index) ? "; wrong index (out of bounds)" : (mRiggedFace[i][index] != facep) ? "; wrong face pointer" : "") + << LL_ENDL; } } } From 5e926ece20407e5f0742a355d890e2f208ddca19 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 30 Mar 2017 16:30:01 +0300 Subject: [PATCH 090/116] MAINT-7245 Use Experience Box in LSL Editor will not show as checked if containing object is in another region --- indra/llmessage/llexperiencecache.cpp | 26 +++++++++++++++++++++----- indra/llmessage/llexperiencecache.h | 3 ++- indra/newview/llpreviewscript.cpp | 10 ++++++++-- indra/newview/llsidepaneliteminfo.cpp | 11 ++++++++--- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 779d1d9d99..aa7b3c1260 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -540,18 +540,34 @@ void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const } LLCoprocedureManager::instance().enqueueCoprocedure("ExpCache", "Fetch Associated", - boost::bind(&LLExperienceCache::fetchAssociatedExperienceCoro, this, _1, objectId, itemId, fn)); + boost::bind(&LLExperienceCache::fetchAssociatedExperienceCoro, this, _1, objectId, itemId, std::string(), fn)); } -void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID objectId, LLUUID itemId, ExperienceGetFn_t fn) +void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, std::string url, ExperienceGetFn_t fn) +{ + if (mCapability.empty()) + { + LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; + return; + } + + LLCoprocedureManager::instance().enqueueCoprocedure("ExpCache", "Fetch Associated", + boost::bind(&LLExperienceCache::fetchAssociatedExperienceCoro, this, _1, objectId, itemId, url, fn)); +} + +void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID objectId, LLUUID itemId, std::string url, ExperienceGetFn_t fn) { LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); - std::string url = mCapability("GetMetadata"); if (url.empty()) { - LL_WARNS("ExperienceCache") << "No Metadata capability." << LL_ENDL; - return; + url = mCapability("GetMetadata"); + + if (url.empty()) + { + LL_WARNS("ExperienceCache") << "No Metadata capability." << LL_ENDL; + return; + } } LLSD fields; diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h index 8ee7080d38..f9ff69c2b6 100644 --- a/indra/llmessage/llexperiencecache.h +++ b/indra/llmessage/llexperiencecache.h @@ -64,6 +64,7 @@ public: //------------------------------------------- void fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, ExperienceGetFn_t fn); + void fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, std::string url, ExperienceGetFn_t fn); void findExperienceByName(const std::string text, int page, ExperienceGetFn_t fn); void getGroupExperiences(const LLUUID &groupId, ExperienceGetFn_t fn); @@ -148,7 +149,7 @@ private: void requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, RequestQueue_t); void requestExperiences(); - void fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID, LLUUID, ExperienceGetFn_t); + void fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID, LLUUID, std::string, ExperienceGetFn_t); void findExperienceByNameCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, int, ExperienceGetFn_t); void getGroupExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID , ExperienceGetFn_t); void regionExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, CapabilityQuery_t regioncaps, bool update, LLSD experiences, ExperienceGetFn_t fn); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index f28ffce602..5cdc5dfd38 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1870,8 +1870,14 @@ void LLLiveLSLEditor::loadAsset() if(item) { - LLExperienceCache::instance().fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), - boost::bind(&LLLiveLSLEditor::setAssociatedExperience, getDerivedHandle(), _1)); + LLViewerRegion* region = object->getRegion(); + std::string url = std::string(); + if(region) + { + url = region->getCapability("GetMetadata"); + } + LLExperienceCache::instance().fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), url, + boost::bind(&LLLiveLSLEditor::setAssociatedExperience, getDerivedHandle(), _1)); bool isGodlike = gAgent.isGodlike(); bool copyManipulate = gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index af2173dd17..3c58dd7194 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -46,6 +46,7 @@ #include "llviewerobjectlist.h" #include "llexperiencecache.h" #include "lltrans.h" +#include "llviewerregion.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -327,9 +328,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) LLTextBox* tb = getChild("LabelItemExperience"); tb->setText(getString("loading_experience")); tb->setVisible(TRUE); - - LLExperienceCache::instance().fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), - boost::bind(&LLSidepanelItemInfo::setAssociatedExperience, getDerivedHandle(), _1)); + std::string url = std::string(); + if(object && object->getRegion()) + { + url = object->getRegion()->getCapability("GetMetadata"); + } + LLExperienceCache::instance().fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), url, + boost::bind(&LLSidepanelItemInfo::setAssociatedExperience, getDerivedHandle(), _1)); } ////////////////////// From 7e13f981d2858a5946954c57066aab7fa50cabd1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 30 Mar 2017 21:35:01 +0300 Subject: [PATCH 091/116] Add multiline support for MAINT-6959 --- .../xui/en/panel_preferences_uploads.xml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml index 487da54fdf..343c2db2f1 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml @@ -38,13 +38,14 @@ type="string" use_ellipses="true" follows="left|top" - height="23" + height="27" layout="topleft" font.style="BOLD" left="37" name="upload_textures" top_pad="5" - width="350" /> + width="370" + word_wrap="true"/> + width="370" + word_wrap="true"/> + width="370" + word_wrap="true"/> + width="370" + word_wrap="true"/> Date: Mon, 3 Apr 2017 20:25:51 +0300 Subject: [PATCH 092/116] MAINT-7162 Forced sit on a physical object triggers a bogus "Cancelled Sit" message --- indra/newview/llagent.cpp | 2 +- indra/newview/skins/default/xui/en/notifications.xml | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7d0d39e22a..8dd0b06ed2 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1644,7 +1644,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) if (user_cancel && !mAutoPilotBehaviorName.empty()) { if (mAutoPilotBehaviorName == "Sit") - LLNotificationsUtil::add("CancelledSit"); + LL_INFOS("Agent") << "Autopilot-Sit was canceled by user action" << LL_ENDL; else if (mAutoPilotBehaviorName == "Attach") LLNotificationsUtil::add("CancelledAttach"); else diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 3fcd91f89b..4f5f0ac02c 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6390,13 +6390,6 @@ The string [STRING_NAME] is missing from strings.xml Cancelled - -Cancelled Sit - - Date: Fri, 7 Apr 2017 13:22:39 +0300 Subject: [PATCH 093/116] MAINT-3221 "Repeats per meter" didn't allow direct input of negative values --- indra/newview/skins/default/xui/en/panel_tools_texture.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml index d5f60d6730..168457925d 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -616,7 +616,7 @@ label_width="195" left="10" max_val="100" - min_val="0.1" + min_val="-100" name="rptctrl" width="265" /> Date: Fri, 14 Apr 2017 12:46:07 +0200 Subject: [PATCH 094/116] Update German translation --- indra/newview/skins/default/xui/de/floater_flickr.xml | 2 +- indra/newview/skins/default/xui/de/menu_edit.xml | 1 - indra/newview/skins/default/xui/de/notifications.xml | 3 --- indra/newview/skins/default/xui/de/panel_flickr_photo.xml | 2 +- indra/newview/skins/default/xui/de/strings.xml | 3 ++- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/indra/newview/skins/default/xui/de/floater_flickr.xml b/indra/newview/skins/default/xui/de/floater_flickr.xml index 1e74e2e5ed..9c7092030a 100644 --- a/indra/newview/skins/default/xui/de/floater_flickr.xml +++ b/indra/newview/skins/default/xui/de/floater_flickr.xml @@ -1,5 +1,5 @@ - + diff --git a/indra/newview/skins/default/xui/de/menu_edit.xml b/indra/newview/skins/default/xui/de/menu_edit.xml index 37f68d68d5..23d5edc3ba 100644 --- a/indra/newview/skins/default/xui/de/menu_edit.xml +++ b/indra/newview/skins/default/xui/de/menu_edit.xml @@ -6,7 +6,6 @@ - diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 6faa284ffd..7598e80e1f 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -2669,9 +2669,6 @@ Von einer Webseite zu diesem Formular linken, um anderen leichten Zugang zu dies Abgebrochen - - Sitzen beendet - Anhängen abgebrochen diff --git a/indra/newview/skins/default/xui/de/panel_flickr_photo.xml b/indra/newview/skins/default/xui/de/panel_flickr_photo.xml index 4c6705ac19..fb1d9c2cc8 100644 --- a/indra/newview/skins/default/xui/de/panel_flickr_photo.xml +++ b/indra/newview/skins/default/xui/de/panel_flickr_photo.xml @@ -28,6 +28,6 @@ -