From 71f6b139f8de3ea6bf2b925e095fc0f7864c0274 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 29 May 2020 20:10:04 +0300 Subject: SL-13348 Thread crashing singleton #1 --- indra/newview/llappviewer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ff921dcfdb..da1a58efd9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2116,6 +2116,7 @@ bool LLAppViewer::cleanup() LLWeb::loadURLExternal( gLaunchFileOnQuit, false ); LL_INFOS() << "File launched." << LL_ENDL; } + // make sure nothing uses applyProxySettings by this point. LL_INFOS() << "Cleaning up LLProxy." << LL_ENDL; SUBSYSTEM_CLEANUP(LLProxy); LLCore::LLHttp::cleanup(); -- cgit v1.2.3 From 372ed555ed3c895850700be463bd6775d66f6862 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 29 May 2020 20:13:23 +0300 Subject: SL-13348 Thread crashing singleton #2 Reverted LLImage to singleton conversion --- indra/newview/llappviewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index da1a58efd9..e067ab6778 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2073,6 +2073,7 @@ bool LLAppViewer::cleanup() LLUIImageList::getInstance()->cleanUp(); // This should eventually be done in LLAppViewer + SUBSYSTEM_CLEANUP(LLImage); SUBSYSTEM_CLEANUP(LLVFSThread); SUBSYSTEM_CLEANUP(LLLFSThread); @@ -2182,7 +2183,7 @@ bool LLAppViewer::initThreads() { static const bool enable_threads = true; - LLImage::initParamSingleton(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange")); + LLImage::initClass(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange")); LLVFSThread::initClass(enable_threads && false); LLLFSThread::initClass(enable_threads && false); -- cgit v1.2.3 From cf2f0eddeb066d862151154d0d35f7e9f716270b Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 1 Jun 2020 18:24:52 +0300 Subject: SL-13278 FIXED Creating default clothing not accessible through "Edit My Outfit" for any type that does not already exist --- indra/newview/llpaneloutfitedit.cpp | 1 + indra/newview/llwearableitemslist.cpp | 58 ++++++++++++++++++++-- indra/newview/llwearableitemslist.h | 7 +++ .../default/xui/en/menu_wearable_list_item.xml | 11 ++++ 4 files changed, 74 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 1d87aa6f5d..dd1130aeba 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -1282,6 +1282,7 @@ void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type //e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE applyListViewFilter(static_cast(LVIT_SHAPE + type)); + mWearableItemsList->setMenuWearableType(type); } static void update_status_widget_rect(LLView * widget, S32 right_border) diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index e7bbee5efd..3d1bc5249d 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -639,6 +639,7 @@ LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) : LLInventoryItemsList(p) { setSortOrder(E_SORT_BY_TYPE_LAYER, false); + mMenuWearableType = LLWearableType::WT_NONE; mIsStandalone = p.standalone; if (mIsStandalone) { @@ -730,10 +731,15 @@ void LLWearableItemsList::onRightClick(S32 x, S32 y) getSelectedUUIDs(selected_uuids); if (selected_uuids.empty()) { - return; + if ((mMenuWearableType != LLWearableType::WT_NONE) && (size() == 0)) + { + ContextMenu::instance().show(this, mMenuWearableType, x, y); + } + } + else + { + ContextMenu::instance().show(this, selected_uuids, x, y); } - - ContextMenu::instance().show(this, selected_uuids, x, y); } void LLWearableItemsList::setSortOrder(ESortOrder sort_order, bool sort_now) @@ -784,6 +790,46 @@ void LLWearableItemsList::ContextMenu::show(LLView* spawning_view, const uuid_ve mParent = NULL; // to avoid dereferencing an invalid pointer } +void LLWearableItemsList::ContextMenu::show(LLView* spawning_view, LLWearableType::EType w_type, S32 x, S32 y) +{ + mParent = dynamic_cast(spawning_view); + LLContextMenu* menup = mMenuHandle.get(); + if (menup) + { + //preventing parent (menu holder) from deleting already "dead" context menus on exit + LLView* parent = menup->getParent(); + if (parent) + { + parent->removeChild(menup); + } + delete menup; + mUUIDs.clear(); + } + + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + registrar.add("Wearable.CreateNew", boost::bind(createNewWearableByType, w_type)); + menup = createFromFile("menu_wearable_list_item.xml"); + if (!menup) + { + LL_WARNS() << "Context menu creation failed" << LL_ENDL; + return; + } + setMenuItemVisible(menup, "create_new", true); + setMenuItemEnabled(menup, "create_new", true); + setMenuItemVisible(menup, "wearable_attach_to", false); + setMenuItemVisible(menup, "wearable_attach_to_hud", false); + + std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type)); + LLMenuItemGL* menu_item = menup->getChild("create_new"); + menu_item->setLabel(new_label); + + mMenuHandle = menup->getHandle(); + menup->show(x, y); + LLMenuGL::showPopup(spawning_view, menup, x, y); + + mParent = NULL; // to avoid dereferencing an invalid pointer +} + // virtual LLContextMenu* LLWearableItemsList::ContextMenu::createMenu() { @@ -1004,4 +1050,10 @@ void LLWearableItemsList::ContextMenu::createNewWearable(const LLUUID& item_id) LLAgentWearables::createWearable(item->getWearableType(), true); } +// static +void LLWearableItemsList::ContextMenu::createNewWearableByType(LLWearableType::EType type) +{ + LLAgentWearables::createWearable(type, true); +} + // EOF diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index f3182ed163..ba8488b237 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -415,6 +415,8 @@ public: public: /*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y); + void show(LLView* spawning_view, LLWearableType::EType w_type, S32 x, S32 y); + protected: enum { MASK_CLOTHING = 0x01, @@ -431,6 +433,7 @@ public: static void setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val); static void updateMask(U32& mask, LLAssetType::EType at); static void createNewWearable(const LLUUID& item_id); + static void createNewWearableByType(LLWearableType::EType type); LLWearableItemsList* mParent; }; @@ -469,6 +472,8 @@ public: void setSortOrder(ESortOrder sort_order, bool sort_now = true); + void setMenuWearableType(LLWearableType::EType type) { mMenuWearableType = type; } + protected: friend class LLUICtrlFactory; LLWearableItemsList(const LLWearableItemsList::Params& p); @@ -479,6 +484,8 @@ protected: bool mWornIndicationEnabled; ESortOrder mSortOrder; + + LLWearableType::EType mMenuWearableType; }; #endif //LL_LLWEARABLEITEMSLIST_H diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml index aa56b4ba63..7370dace7f 100644 --- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml @@ -4,6 +4,7 @@ @@ -11,6 +12,7 @@ @@ -18,6 +20,7 @@ @@ -25,6 +28,7 @@ @@ -32,6 +36,7 @@ @@ -47,6 +52,7 @@ @@ -54,6 +60,7 @@ @@ -61,6 +68,7 @@ @@ -68,6 +76,7 @@ @@ -75,6 +84,7 @@ -- cgit v1.2.3 From c471392ef1c0633423ea66158c21ba4d81f2473b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 1 Jun 2020 21:34:12 +0300 Subject: SL-13346 Hi-Res snapshots save a zoomed portion on 4K+ resolutions --- indra/newview/llviewermenufile.cpp | 7 +++++-- indra/newview/llviewerwindow.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index d1d3a7fc12..7603a6b18c 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -683,7 +683,8 @@ class LLFileTakeSnapshotToDisk : public view_listener_t S32 width = gViewerWindow->getWindowWidthRaw(); S32 height = gViewerWindow->getWindowHeightRaw(); - if (gSavedSettings.getBOOL("HighResSnapshot")) + BOOL high_res = gSavedSettings.getBOOL("HighResSnapshot"); + if (high_res) { width *= 2; height *= 2; @@ -695,7 +696,9 @@ class LLFileTakeSnapshotToDisk : public view_listener_t TRUE, FALSE, gSavedSettings.getBOOL("RenderUIInSnapshot"), - FALSE)) + FALSE, + LLSnapshotModel::SNAPSHOT_TYPE_COLOR, + high_res ? S32_MAX : MAX_SNAPSHOT_IMAGE_SIZE)) //per side { LLPointer formatted; LLSnapshotModel::ESnapshotFormat fmt = (LLSnapshotModel::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat"); diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 385bbd57e5..601140d9d2 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -137,7 +137,7 @@ private: }; -static const U32 MAX_SNAPSHOT_IMAGE_SIZE = 6 * 1024; // max snapshot image size 6144 * 6144 +static const U32 MAX_SNAPSHOT_IMAGE_SIZE = 7680; // max snapshot image size 7680 * 7680 UHDTV2 class LLViewerWindow : public LLWindowCallbacks { -- cgit v1.2.3 From 47e474244f42f0e28c8a041d5d34d6656c27db85 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 2 Jun 2020 18:45:03 +0300 Subject: SL-13362 The worn wearables shouldn't be shareable --- indra/newview/llgiveinventory.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index 3ab8fed2c6..127055459d 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -129,23 +129,14 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item) switch(item->getType()) { case LLAssetType::AT_OBJECT: - if (get_is_item_worn(item->getUUID())) - { - acceptable = false; - } - break; case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: { - BOOL copyable = false; - if (item->getPermissions().allowCopyBy(gAgentID)) copyable = true; - - if (!copyable && get_is_item_worn(item->getUUID())) + if (get_is_item_worn(item->getUUID())) { - // worn no-copy items can't be transfered, - // but it is valid to transfer a copy of a worn item acceptable = false; } + break; } break; default: -- cgit v1.2.3 From 13b78a0c5a788c617866e3530c65dae616e6520f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 2 Jun 2020 10:29:15 -0400 Subject: SL-13361: Distill redundant create_console() code to set_stream(). There are separate stanzas in llappviewerwin32.cpp's create_console() function for each of STD_INPUT_HANDLE, STD_OUTPUT_HANDLE and STD_ERROR_HANDLE. SL-13361 wants to add more code to each. Factor out new local set_stream() function and make create_console() call it three times. --- indra/newview/llappviewerwin32.cpp | 59 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 30 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index d208e135bb..1f66177c37 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -501,11 +501,12 @@ void LLAppViewerWin32::disableWinErrorReporting() const S32 MAX_CONSOLE_LINES = 500; -static bool create_console() -{ - int h_con_handle; - long l_std_handle; +namespace { + +FILE* set_stream(const char* which, DWORD handle_id, const char* mode); +bool create_console() +{ CONSOLE_SCREEN_BUFFER_INFO coninfo; FILE *fp; @@ -518,50 +519,48 @@ static bool create_console() SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize); // redirect unbuffered STDOUT to the console - l_std_handle = (long)GetStdHandle(STD_OUTPUT_HANDLE); - h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); - if (h_con_handle == -1) + FILE* fp = set_stream("stdout", STD_OUTPUT_HANDLE, "w"); + if (fp) { - LL_WARNS() << "create_console() failed to open stdout handle" << LL_ENDL; - } - else - { - fp = _fdopen( h_con_handle, "w" ); *stdout = *fp; - setvbuf( stdout, NULL, _IONBF, 0 ); } // redirect unbuffered STDIN to the console - l_std_handle = (long)GetStdHandle(STD_INPUT_HANDLE); - h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); - if (h_con_handle == -1) - { - LL_WARNS() << "create_console() failed to open stdin handle" << LL_ENDL; - } - else + fp = set_stream("stdin", STD_INPUT_HANDLE, "r"); + if (fp) { - fp = _fdopen( h_con_handle, "r" ); *stdin = *fp; - setvbuf( stdin, NULL, _IONBF, 0 ); } // redirect unbuffered STDERR to the console - l_std_handle = (long)GetStdHandle(STD_ERROR_HANDLE); - h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); + fp = set_stream("stderr", STD_ERROR_HANDLE, "w"); + if (fp) + { + *stderr = *fp; + } + + return isConsoleAllocated; +} + +FILE* set_stream(const char* which, DWORD handle_id, const char* mode) +{ + long l_std_handle = (long)GetStdHandle(handle_id); + int h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); if (h_con_handle == -1) { - LL_WARNS() << "create_console() failed to open stderr handle" << LL_ENDL; + LL_WARNS() << "create_console() failed to open " << which << " handle" << LL_ENDL; + return nullptr; } else { - fp = _fdopen( h_con_handle, "w" ); - *stderr = *fp; - setvbuf( stderr, NULL, _IONBF, 0 ); + FILE* fp = _fdopen( h_con_handle, mode ); + setvbuf( fp, NULL, _IONBF, 0 ); + return fp; } - - return isConsoleAllocated; } +} // anonymous namespace + LLAppViewerWin32::LLAppViewerWin32(const char* cmd_line) : mCmdLine(cmd_line), mIsConsoleAllocated(false) -- cgit v1.2.3 From 0b61150e698537a7e42a4cdae02496da500399d9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 2 Jun 2020 16:44:22 -0400 Subject: SL-13361: Enable color processing on Windows 10 debug console. --- indra/newview/llappviewerwin32.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 1f66177c37..f0aa355342 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -500,6 +500,10 @@ void LLAppViewerWin32::disableWinErrorReporting() } const S32 MAX_CONSOLE_LINES = 500; +// Only defined in newer SDKs than we currently use +#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 4 +#endif namespace { @@ -507,13 +511,11 @@ FILE* set_stream(const char* which, DWORD handle_id, const char* mode); bool create_console() { - CONSOLE_SCREEN_BUFFER_INFO coninfo; - FILE *fp; - // allocate a console for this app const bool isConsoleAllocated = AllocConsole(); // set the screen buffer to be big enough to let us scroll text + CONSOLE_SCREEN_BUFFER_INFO coninfo; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo); coninfo.dwSize.Y = MAX_CONSOLE_LINES; SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize); @@ -542,19 +544,24 @@ bool create_console() return isConsoleAllocated; } -FILE* set_stream(const char* which, DWORD handle_id, const char* mode) +FILE* set_stream(const char* desc, DWORD handle_id, const char* mode) { - long l_std_handle = (long)GetStdHandle(handle_id); - int h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); + auto l_std_handle = GetStdHandle(handle_id); + int h_con_handle = _open_osfhandle(reinterpret_cast(l_std_handle), _O_TEXT); if (h_con_handle == -1) { - LL_WARNS() << "create_console() failed to open " << which << " handle" << LL_ENDL; + LL_WARNS() << "create_console() failed to open " << desc << " handle" << LL_ENDL; return nullptr; } else { FILE* fp = _fdopen( h_con_handle, mode ); setvbuf( fp, NULL, _IONBF, 0 ); + // Enable color processing on Windows 10 console windows. + DWORD dwMode = 0; + GetConsoleMode(l_std_handle, &dwMode); + dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; + SetConsoleMode(l_std_handle, dwMode); return fp; } } -- cgit v1.2.3 From 6fddbeb3973c3cd2135ba101afc13329a8c9fe49 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 4 Jun 2020 22:43:55 +0300 Subject: SL-12748 Blocked username displays old name after name change --- indra/newview/llmutelist.cpp | 78 +++++++++++++++++++++++++++++++++++++++++--- indra/newview/llmutelist.h | 6 +++- 2 files changed, 79 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 64df449c26..8a10a38b37 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -169,6 +169,14 @@ LLMuteList::LLMuteList() : gMessageSystem.callWhenReady(boost::bind(&LLMessageSystem::setHandlerFuncFast, _1, _PREHASH_UseCachedMuteList, processUseCachedMuteList, static_cast(NULL))); + + // make sure mute list's instance gets initialized before we start any name requests + LLAvatarNameCache::getInstance()->setAccountNameChangedCallback([this](const LLUUID& id, const LLAvatarName& av_name) + { + // it would be better to just pass LLAvatarName instead of doing unnesssesary copies + // but this way is just more convinient + onAccountNameChanged(id, av_name.getUserName()); + }); } //----------------------------------------------------------------------------- @@ -179,6 +187,11 @@ LLMuteList::~LLMuteList() } +void LLMuteList::cleanupSingleton() +{ + LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(NULL); +} + BOOL LLMuteList::isLinden(const std::string& name) const { std::string username = boost::replace_all_copy(name, ".", " "); @@ -232,8 +245,8 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) LL_WARNS() << "Trying to self; ignored" << LL_ENDL; return FALSE; } - - S32 mute_list_limit = gSavedSettings.getS32("MuteListLimit"); + + static LLCachedControl mute_list_limit(gSavedSettings, "MuteListLimit", 1000); if (getMutes().size() >= mute_list_limit) { LL_WARNS() << "Mute limit is reached; ignored" << LL_ENDL; @@ -358,6 +371,10 @@ void LLMuteList::updateAdd(const LLMute& mute) msg->addU32("MuteFlags", mute.mFlags); gAgent.sendReliableMessage(); + if (!mIsLoaded) + { + LL_WARNS() << "Added elements to non-initialized block list" << LL_ENDL; + } mIsLoaded = TRUE; // why is this here? -MG } @@ -412,7 +429,6 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags) // Must be after erase. notifyObserversDetailed(localmute); - setLoaded(); // why is this here? -MG } else { @@ -426,7 +442,6 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags) mLegacyMutes.erase(legacy_it); // Must be after erase. notifyObserversDetailed(mute); - setLoaded(); // why is this here? -MG } } @@ -584,6 +599,19 @@ BOOL LLMuteList::loadFromFile(const std::string& filename) } fclose(fp); setLoaded(); + + // server does not maintain up-to date account names (not display names!) + // in this list, so it falls to viewer. + pending_names_t::iterator iter = mPendingAgentNameUpdates.begin(); + pending_names_t::iterator end = mPendingAgentNameUpdates.end(); + while (iter != end) + { + // this will send updates to server, make sure mIsLoaded is set + onAccountNameChanged(iter->first, iter->second); + iter++; + } + mPendingAgentNameUpdates.clear(); + return TRUE; } @@ -767,6 +795,48 @@ void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_ delete local_filename_and_path; } +void LLMuteList::onAccountNameChanged(const LLUUID& id, const std::string& username) +{ + if (mIsLoaded) + { + LLMute mute(id, username, LLMute::AGENT); + mute_set_t::iterator mute_it = mMutes.find(mute); + if (mute_it != mMutes.end() + && mute_it->mName != mute.mName + && mute_it->mType == LLMute::AGENT) // just in case, it is std::set, not map + { + // existing mute, but name changed, copy data + mute.mFlags = mute_it->mFlags; + + // erase old variant + mMutes.erase(mute_it); + + // (re)add the mute entry. + { + std::pair result = mMutes.insert(mute); + if (result.second) + { + LL_INFOS() << "Muting " << mute.mName << " id " << mute.mID << " flags " << mute.mFlags << LL_ENDL; + updateAdd(mute); + // Do not notify observers here, observers do not know or need to handle name changes + // Example: block list considers notifyObserversDetailed as a selection update; + // Various chat/voice statuses care only about id and flags + // Since apropriate update time for account names is considered to be in 'hours' it is + // fine not to update UI (will be fine after restart or couple other changes) + + } + } + } + } + else + { + // Delay update until we load file + // Ex: Buddies list can arrive too early since we prerequest + // names from Buddies list before we load blocklist + mPendingAgentNameUpdates[id] = username; + } +} + void LLMuteList::addObserver(LLMuteListObserver* observer) { mObservers.insert(observer); diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h index f2fcf3dbb3..0d426fbd48 100644 --- a/indra/newview/llmutelist.h +++ b/indra/newview/llmutelist.h @@ -73,6 +73,7 @@ class LLMuteList : public LLSingleton { LLSINGLETON(LLMuteList); ~LLMuteList(); + /*virtual*/ void cleanupSingleton(); public: // reasons for auto-unmuting a resident enum EAutoReason @@ -131,6 +132,7 @@ private: static void processUseCachedMuteList(LLMessageSystem* msg, void**); static void onFileMuteList(void** user_data, S32 code, LLExtStat ext_status); + void onAccountNameChanged(const LLUUID& id, const std::string& username); private: struct compare_by_name @@ -155,7 +157,9 @@ private: }; typedef std::set mute_set_t; mute_set_t mMutes; - + typedef std::map pending_names_t; + pending_names_t mPendingAgentNameUpdates; + typedef std::set string_set_t; string_set_t mLegacyMutes; -- cgit v1.2.3 From 39cf42e6eb0460e6b752a90e4920d8869d83ed51 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 9 Jun 2020 15:24:03 +0300 Subject: SL-13405 FIXED Preview Asset Types of Content tab in one window no longer works --- indra/newview/llinventoryfunctions.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 646d92b9e1..0083ab0397 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2397,16 +2397,19 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { bool open_multi_preview = true; - for (std::set::iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter) + if ("open" == action) { - LLFolderViewItem* folder_item = *set_iter; - if (folder_item) + for (std::set::iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter) { - LLInvFVBridge* bridge = dynamic_cast(folder_item->getViewModelItem()); - if (!bridge || !bridge->isMultiPreviewAllowed()) + LLFolderViewItem* folder_item = *set_iter; + if (folder_item) { - open_multi_preview = false; - break; + LLInvFVBridge* bridge = dynamic_cast(folder_item->getViewModelItem()); + if (!bridge || !bridge->isMultiPreviewAllowed()) + { + open_multi_preview = false; + break; + } } } } -- cgit v1.2.3 From 5afedc9177893daa4c60ee2c20471241b4b38dc8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 9 Jun 2020 18:29:46 +0300 Subject: SL-3584 Alpha masked textures occasionally changing to alpha mode none --- indra/newview/llvovolume.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 2ffd462ac3..34b801a097 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2319,7 +2319,8 @@ bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture) //setup new materials for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it) { - LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second); + // These are placeholder materials, they shouldn't be sent to server + LLMaterialMgr::getInstance()->setLocalMaterial(getRegion()->getRegionID(), it->second); LLViewerObject::setTEMaterialParams(it->first, it->second); } -- cgit v1.2.3 From 161ea5b13579cb21c07cbd04062a44d09064517e Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 10 Jun 2020 14:14:38 +0300 Subject: SL-13413 FIXED Camera behaviour changed on ESC in Camera Presets viewer --- indra/newview/llviewermenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b6c7be2ed3..f5f8b87ed5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4104,7 +4104,7 @@ void handle_reset_view() // switching to outfit selector should automagically save any currently edited wearable LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits")); } - + gAgentCamera.setFocusOnAvatar(TRUE, FALSE, FALSE); reset_view_final( TRUE ); LLFloaterCamera::resetCameraMode(); } -- cgit v1.2.3 From b95d780b2ec38078100a96ed3b5760c29598a0db Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 15 Jun 2020 16:07:05 +0300 Subject: SL-13457 FIXED Crash in LLFolderViewGroupedItemBridge::canWearSelected --- indra/newview/llinventorybridge.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 657c65c68d..b1de884f06 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7655,8 +7655,7 @@ bool LLFolderViewGroupedItemBridge::canWearSelected(uuid_vec_t item_ids) for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it) { LLViewerInventoryItem* item = gInventory.getItem(*it); - LLAssetType::EType asset_type = item->getType(); - if (!item || (asset_type >= LLAssetType::AT_COUNT) || (asset_type <= LLAssetType::AT_NONE)) + if (!item || (item->getType() >= LLAssetType::AT_COUNT) || (item->getType() <= LLAssetType::AT_NONE)) { return false; } -- cgit v1.2.3 From 307534c9781b312608ccce6a9b4e12499a66170a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 16 Jun 2020 17:26:39 +0300 Subject: SL-13463 Add 'Reset scripts' button to Content tab of Build floater --- indra/newview/llpanelcontents.cpp | 11 +++ indra/newview/llpanelcontents.h | 1 + indra/newview/llviewermenu.cpp | 100 +++++++++++---------- indra/newview/llviewermenu.h | 2 + .../newview/skins/default/xui/en/floater_tools.xml | 13 ++- 5 files changed, 77 insertions(+), 50 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 3bae0cebfb..116b23e595 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -54,6 +54,7 @@ #include "lltrans.h" #include "llviewerassettype.h" #include "llviewerinventory.h" +#include "llviewermenu.h" #include "llviewerobject.h" #include "llviewerregion.h" #include "llviewerwindow.h" @@ -82,6 +83,7 @@ BOOL LLPanelContents::postBuild() childSetAction("button new script",&LLPanelContents::onClickNewScript, this); childSetAction("button permissions",&LLPanelContents::onClickPermissions, this); + childSetAction("btn_reset_scripts", &LLPanelContents::onClickResetScripts, this); mPanelInventoryObject = getChild("contents_inventory"); @@ -106,6 +108,7 @@ void LLPanelContents::getState(LLViewerObject *objectp ) if( !objectp ) { getChildView("button new script")->setEnabled(FALSE); + getChildView("btn_reset_scripts")->setEnabled(FALSE); return; } @@ -125,6 +128,8 @@ void LLPanelContents::getState(LLViewerObject *objectp ) ((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1) || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1))); + getChildView("btn_reset_scripts")->setEnabled(editable); + getChildView("button permissions")->setEnabled(!objectp->isPermanentEnforced()); mPanelInventoryObject->setEnabled(!objectp->isPermanentEnforced()); } @@ -206,3 +211,9 @@ void LLPanelContents::onClickPermissions(void *userdata) LLPanelContents* self = (LLPanelContents*)userdata; gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterReg::showInstance("bulk_perms")); } + +// static +void LLPanelContents::onClickResetScripts(void *userdata) +{ + handle_selected_script_action("reset"); +} diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h index 6ecc78afa0..5b1a57de42 100644 --- a/indra/newview/llpanelcontents.h +++ b/indra/newview/llpanelcontents.h @@ -53,6 +53,7 @@ public: static void onClickNewScript(void*); static void onClickPermissions(void*); + static void onClickResetScripts(void*); // Key suffix for "tentative" fields static const char* TENTATIVE_SUFFIX; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f5f8b87ed5..ef31f5e3bf 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7202,58 +7202,62 @@ class LLToolsSelectedScriptAction : public view_listener_t { bool handleEvent(const LLSD& userdata) { - std::string action = userdata.asString(); - bool mono = false; - std::string msg, name; - std::string title; - if (action == "compile mono") - { - name = "compile_queue"; - mono = true; - msg = "Recompile"; - title = LLTrans::getString("CompileQueueTitle"); - } - if (action == "compile lsl") - { - name = "compile_queue"; - msg = "Recompile"; - title = LLTrans::getString("CompileQueueTitle"); - } - else if (action == "reset") - { - name = "reset_queue"; - msg = "Reset"; - title = LLTrans::getString("ResetQueueTitle"); - } - else if (action == "start") - { - name = "start_queue"; - msg = "SetRunning"; - title = LLTrans::getString("RunQueueTitle"); - } - else if (action == "stop") - { - name = "stop_queue"; - msg = "SetRunningNot"; - title = LLTrans::getString("NotRunQueueTitle"); - } - LLUUID id; id.generate(); - - LLFloaterScriptQueue* queue =LLFloaterReg::getTypedInstance(name, LLSD(id)); - if (queue) - { - queue->setMono(mono); - queue_actions(queue, msg); - queue->setTitle(title); - } - else - { - LL_WARNS() << "Failed to generate LLFloaterScriptQueue with action: " << action << LL_ENDL; - } + handle_selected_script_action(userdata.asString()); return true; } }; +void handle_selected_script_action(const std::string& action) +{ + bool mono = false; + std::string msg, name; + std::string title; + if (action == "compile mono") + { + name = "compile_queue"; + mono = true; + msg = "Recompile"; + title = LLTrans::getString("CompileQueueTitle"); + } + if (action == "compile lsl") + { + name = "compile_queue"; + msg = "Recompile"; + title = LLTrans::getString("CompileQueueTitle"); + } + else if (action == "reset") + { + name = "reset_queue"; + msg = "Reset"; + title = LLTrans::getString("ResetQueueTitle"); + } + else if (action == "start") + { + name = "start_queue"; + msg = "SetRunning"; + title = LLTrans::getString("RunQueueTitle"); + } + else if (action == "stop") + { + name = "stop_queue"; + msg = "SetRunningNot"; + title = LLTrans::getString("NotRunQueueTitle"); + } + LLUUID id; id.generate(); + + LLFloaterScriptQueue* queue = LLFloaterReg::getTypedInstance(name, LLSD(id)); + if (queue) + { + queue->setMono(mono); + queue_actions(queue, msg); + queue->setTitle(title); + } + else + { + LL_WARNS() << "Failed to generate LLFloaterScriptQueue with action: " << action << LL_ENDL; + } +} + void handle_selected_texture_info(void*) { for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 6882405407..74a15af50c 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -110,6 +110,8 @@ void handle_object_return(); void handle_object_delete(); void handle_object_edit(); +void handle_selected_script_action(const std::string& action); + void handle_buy_land(); // Takes avatar UUID, or if no UUID passed, uses last selected object diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 0abee2ff80..1377bad6cf 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2575,13 +2575,22 @@ even though the user gets a free copy. border_visible="true" bevel_style="in" follows="left|top|right" - height="325" + height="300" layout="topleft" left="10" name="contents_inventory" top="50" width="275" /> - +