From 74a1d2582c457aff738bf73c21e137015acfe6cb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 17 Aug 2023 19:49:37 +0300 Subject: SL-20162 Better cof version logging And fixed some typos --- indra/newview/llaisapi.cpp | 4 ++-- indra/newview/llinventorymodelbackgroundfetch.cpp | 8 ++++---- indra/newview/llpanellandmarkinfo.cpp | 4 ++-- indra/newview/llpanellandmarkinfo.h | 2 +- indra/newview/llvoavatar.cpp | 9 ++++++++- 5 files changed, 17 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 4546574955..d8d30037c8 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -1646,7 +1646,7 @@ void AISUpdate::doUpdate() gInventory.updateCategory(new_category, LLInventoryObserver::CREATE); LL_DEBUGS("Inventory") << "created category " << category_id << LL_ENDL; - // fetching can receive massive amount of items and fodlers + // fetching can receive massive amount of items and folders if (gInventory.getChangedIDs().size() > MAX_UPDATE_BACKLOG) { gInventory.notifyObservers(); @@ -1707,7 +1707,7 @@ void AISUpdate::doUpdate() LL_DEBUGS("Inventory") << "created item " << item_id << LL_ENDL; gInventory.updateItem(new_item, LLInventoryObserver::CREATE); - // fetching can receive massive amount of items and fodlers + // fetching can receive massive amount of items and folders if (gInventory.getChangedIDs().size() > MAX_UPDATE_BACKLOG) { gInventory.notifyObservers(); diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 03205cfbda..44eccd955e 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -657,7 +657,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() || mLastFetchCount != mFetchCount) // if anything was substracted { LL_DEBUGS(LOG_INV , "AIS3") << "Total active fetches: " << mLastFetchCount << "->" << last_fetch_count << "->" << mFetchCount - << ", scheduled fodler fetches: " << (S32)mFetchFolderQueue.size() + << ", scheduled folder fetches: " << (S32)mFetchFolderQueue.size() << ", scheduled item fetches: " << (S32)mFetchItemQueue.size() << LL_ENDL; mLastFetchCount = mFetchCount; @@ -1384,10 +1384,10 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http while (iter != end) { folders.append(*iter); - LLUUID fodler_id = iter->get("folder_id").asUUID(); - if (std::find(mRecursiveCatUUIDs.begin(), mRecursiveCatUUIDs.end(), fodler_id) != mRecursiveCatUUIDs.end()) + LLUUID folder_id = iter->get("folder_id").asUUID(); + if (std::find(mRecursiveCatUUIDs.begin(), mRecursiveCatUUIDs.end(), folder_id) != mRecursiveCatUUIDs.end()) { - recursive_cats.push_back(fodler_id); + recursive_cats.push_back(folder_id); } if (folders.size() == (S32)(size / 2)) { diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 834e664723..cc3c51dd83 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -111,9 +111,9 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) } // Sets CREATE_LANDMARK infotype and creates landmark at desired folder -void LLPanelLandmarkInfo::setInfoAndCreateLandmark(const LLUUID& fodler_id) +void LLPanelLandmarkInfo::setInfoAndCreateLandmark(const LLUUID& folder_id) { - setInfoType(CREATE_LANDMARK, fodler_id); + setInfoType(CREATE_LANDMARK, folder_id); } void LLPanelLandmarkInfo::setInfoType(EInfoType type, const LLUUID &folder_id) diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h index 46e2a1935b..8802ce066e 100644 --- a/indra/newview/llpanellandmarkinfo.h +++ b/indra/newview/llpanellandmarkinfo.h @@ -48,7 +48,7 @@ public: /*virtual*/ void setInfoType(EInfoType type); // Sets CREATE_LANDMARK infotype and creates landmark at desired folder - void setInfoAndCreateLandmark(const LLUUID& fodler_id); + void setInfoAndCreateLandmark(const LLUUID& folder_id); /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 305c489cc8..57a78181bd 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -9447,7 +9447,14 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) // RequestAgentUpdateAppearanceResponder::onRequestRequested() // assumes that cof version is only updated with server-bake // appearance messages. - LL_INFOS("Avatar") << "Processing appearance message version " << thisAppearanceVersion << LL_ENDL; + if (isSelf()) + { + LL_INFOS("Avatar") << "Processing appearance message version " << thisAppearanceVersion << LL_ENDL; + } + else + { + LL_INFOS("Avatar") << "Processing appearance message for " << getID() << ", version " << thisAppearanceVersion << LL_ENDL; + } // Note: // locally the COF is maintained via LLInventoryModel::accountForUpdate -- cgit v1.2.3 From 78d66efe1a60ad599ede4e459fb04bb9cb962404 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 18 Aug 2023 00:57:15 +0300 Subject: SL-20143 Alpha thumbnails should show solid color instead of checkerboard #2 --- indra/newview/llinspecttexture.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp index 82676bced8..da4e3c0949 100644 --- a/indra/newview/llinspecttexture.cpp +++ b/indra/newview/llinspecttexture.cpp @@ -140,8 +140,11 @@ void LLTexturePreviewView::draw() { LLRect rctClient = getLocalRect(); - if (4 == m_Image->getComponents()) - gl_rect_2d_checkerboard(rctClient); + if (4 == m_Image->getComponents()) + { + const LLColor4 color(.098f, .098f, .098f); + gl_rect_2d(rctClient, color, TRUE); + } gl_draw_scaled_image(rctClient.mLeft, rctClient.mBottom, rctClient.getWidth(), rctClient.getHeight(), m_Image); bool isLoading = (!m_Image->isFullyLoaded()) && (m_Image->getDiscardLevel() > 0); -- cgit v1.2.3 From 4800e3e4164640bc98f92f9c50d2ab7b882f97a1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 17 Aug 2023 21:51:05 +0300 Subject: SL-20099 Thumbnail upload scale textures to be square thumbnail copy&paste only allows square textures and wasn't allowing none square ones despite those already being used as thumbnails --- indra/newview/llfloatersimplesnapshot.cpp | 2 +- indra/newview/llviewertexturelist.cpp | 19 +++++++++++++++---- indra/newview/llviewertexturelist.h | 7 +++++-- 3 files changed, 21 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatersimplesnapshot.cpp b/indra/newview/llfloatersimplesnapshot.cpp index cf596fd82f..757ac605e3 100644 --- a/indra/newview/llfloatersimplesnapshot.cpp +++ b/indra/newview/llfloatersimplesnapshot.cpp @@ -386,7 +386,7 @@ void LLFloaterSimpleSnapshot::uploadThumbnail(const std::string &file_path, cons // generate a temp texture file for coroutine std::string temp_file = gDirUtilp->getTempFilename(); U32 codec = LLImageBase::getCodecFromExtension(gDirUtilp->getExtension(file_path)); - if (!LLViewerTextureList::createUploadFile(file_path, temp_file, codec, THUMBNAIL_SNAPSHOT_DIM_MAX, THUMBNAIL_SNAPSHOT_DIM_MIN)) + if (!LLViewerTextureList::createUploadFile(file_path, temp_file, codec, THUMBNAIL_SNAPSHOT_DIM_MAX, THUMBNAIL_SNAPSHOT_DIM_MIN, true)) { LLSD notif_args; notif_args["REASON"] = LLImage::getLastError().c_str(); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 60c7fb6b8c..d10e1ea8c9 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1290,7 +1290,8 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, const std::string& out_filename, const U8 codec, const S32 max_image_dimentions, - const S32 min_image_dimentions) + const S32 min_image_dimentions, + bool force_square) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // Load the image @@ -1329,7 +1330,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, return FALSE; } // Convert to j2c (JPEG2000) and save the file locally - LLPointer compressedImage = convertToUploadFile(raw_image, max_image_dimentions); + LLPointer compressedImage = convertToUploadFile(raw_image, max_image_dimentions, force_square); if (compressedImage.isNull()) { image->setLastError("Couldn't convert the image to jpeg2000."); @@ -1354,10 +1355,20 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, } // note: modifies the argument raw_image!!!! -LLPointer LLViewerTextureList::convertToUploadFile(LLPointer raw_image, const S32 max_image_dimentions) +LLPointer LLViewerTextureList::convertToUploadFile(LLPointer raw_image, const S32 max_image_dimentions, bool force_square) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; - raw_image->biasedScaleToPowerOfTwo(max_image_dimentions); + if (force_square) + { + S32 biggest_side = llmax(raw_image->getWidth(), raw_image->getHeight()); + S32 square_size = raw_image->biasedDimToPowerOfTwo(biggest_side, max_image_dimentions); + + raw_image->scale(square_size, square_size); + } + else + { + raw_image->biasedScaleToPowerOfTwo(max_image_dimentions); + } LLPointer compressedImage = new LLImageJ2C(); if (gSavedSettings.getBOOL("LosslessJ2CUpload") && diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index eac26ab0eb..8fc65fc9ce 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -96,8 +96,11 @@ public: const std::string& out_filename, const U8 codec, const S32 max_image_dimentions = LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT, - const S32 min_image_dimentions = 0); - static LLPointer convertToUploadFile(LLPointer raw_image, const S32 max_image_dimentions = LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT); + const S32 min_image_dimentions = 0, + bool force_square = false); + static LLPointer convertToUploadFile(LLPointer raw_image, + const S32 max_image_dimentions = LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT, + bool force_square = false); static void processImageNotInDatabase( LLMessageSystem *msg, void **user_data ); public: -- cgit v1.2.3 From d32e685d96e19be3711e09ab626203d248d3594b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 18 Aug 2023 18:51:42 +0300 Subject: SL-19929 Small rework of a 'feature' notification To make multiple parallel features possible --- indra/newview/app_settings/settings.xml | 4 +- indra/newview/llagent.cpp | 80 ++++++++++++++++++---- indra/newview/llagent.h | 5 +- indra/newview/llfloaternewfeaturenotification.cpp | 8 +++ indra/newview/llsidepanelinventory.cpp | 2 +- .../xui/en/floater_new_feature_notification.xml | 12 +++- 6 files changed, 90 insertions(+), 21 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b812219685..edb0c6b4d1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5504,9 +5504,9 @@ Persist 1 Type - S32 + LLSD Value - 0 + LastFindPanel diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8574134032..8cda46d390 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -121,6 +121,8 @@ const F32 MIN_FIDGET_TIME = 8.f; // seconds const F32 MAX_FIDGET_TIME = 20.f; // seconds const S32 UI_FEATURE_VERSION = 1; +// for version 1: 1 - inventory, 2 - gltf +const S32 UI_FEATURE_FLAGS = 1; // The agent instance. LLAgent gAgent; @@ -568,27 +570,77 @@ void LLAgent::setFirstLogin(bool b) if (mFirstLogin) { // Don't notify new users about new features - S32 feature_version = gSavedSettings.getS32("LastUIFeatureVersion"); - if (feature_version < UI_FEATURE_VERSION) + if (getFeatureVersion() <= UI_FEATURE_VERSION) { - gSavedSettings.setS32("LastUIFeatureVersion", UI_FEATURE_VERSION); + setFeatureVersion(UI_FEATURE_VERSION, UI_FEATURE_FLAGS); } } } -void LLAgent::showLatestFeatureNotification() +void LLAgent::setFeatureVersion(S32 version, S32 flags) { - // Notify user about new thumbnail support - S32 feature_version = gSavedSettings.getS32("LastUIFeatureVersion"); - if (feature_version < UI_FEATURE_VERSION) + LLSD updated_version; + updated_version["version"] = version; + updated_version["flags"] = flags; + gSavedSettings.setLLSD("LastUIFeatureVersion", updated_version); +} + +S32 LLAgent::getFeatureVersion() +{ + S32 version; + S32 flags; + getFeatureVersionAndFlags(version, flags); + return version; +} + +void LLAgent::getFeatureVersionAndFlags(S32& version, S32& flags) +{ + version = 0; + flags = 0; + LLSD feature_version = gSavedSettings.getLLSD("LastUIFeatureVersion"); + if (feature_version.isInteger()) + { + version = feature_version.asInteger(); + flags = UI_FEATURE_FLAGS; + } + else if (feature_version.isMap()) + { + version = feature_version["version"]; + flags = feature_version["flags"]; + } + else if (!feature_version.isString() && !feature_version.isUndefined()) { - // Need to open on top even if called from onOpen, - // do on idle to make sure it's on top - doOnIdleOneTime([]() - { - LLFloaterReg::showInstance("new_feature_notification"); - }); - gSavedSettings.setS32("LastUIFeatureVersion", UI_FEATURE_VERSION); + // is something newer inside? + version = UI_FEATURE_VERSION; + flags = UI_FEATURE_FLAGS; + } +} + +void LLAgent::showLatestFeatureNotification(const std::string key) +{ + S32 version; + S32 flags; // a single release can have multiple new features + getFeatureVersionAndFlags(version, flags); + if (version <= UI_FEATURE_VERSION && (flags & UI_FEATURE_FLAGS) != UI_FEATURE_FLAGS) + { + if (key == "inventory") + { + S32 flag = 1; + + // Notify user about new thumbnail support + if ((flags & flag) == 0) + { + // Need to open on top even if called from onOpen, + // do on idle to make sure it's on top + LLSD floater_key(key); + doOnIdleOneTime([floater_key]() + { + LLFloaterReg::showInstance("new_feature_notification", floater_key); + }); + + setFeatureVersion(UI_FEATURE_VERSION, flags | flag); + } + } } } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index fb9ac402e1..0ce6fda131 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -122,7 +122,10 @@ public: bool isFirstLogin() const { return mFirstLogin; } bool isInitialized() const { return mInitialized; } - void showLatestFeatureNotification(); + void setFeatureVersion(S32 version, S32 flags); + S32 getFeatureVersion(); + void getFeatureVersionAndFlags(S32 &version, S32 &flags); + void showLatestFeatureNotification(const std::string key); public: std::string mMOTD; // Message of the day private: diff --git a/indra/newview/llfloaternewfeaturenotification.cpp b/indra/newview/llfloaternewfeaturenotification.cpp index 7c3fe8cdc8..3a2035b9b9 100644 --- a/indra/newview/llfloaternewfeaturenotification.cpp +++ b/indra/newview/llfloaternewfeaturenotification.cpp @@ -42,6 +42,14 @@ BOOL LLFloaterNewFeatureNotification::postBuild() { setCanDrag(FALSE); getChild("close_btn")->setCommitCallback(boost::bind(&LLFloaterNewFeatureNotification::onCloseBtn, this)); + + const std::string title_txt = "title_txt"; + const std::string dsc_txt = "description_txt"; + std::string feature = "_" + getKey().asString(); + + getChild(title_txt)->setValue(getString(title_txt + feature)); + getChild(dsc_txt)->setValue(getString(dsc_txt + feature)); + return TRUE; } diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index dde260eb7f..e970f70e92 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -401,7 +401,7 @@ void LLSidepanelInventory::onOpen(const LLSD& key) } #endif - gAgent.showLatestFeatureNotification(); + gAgent.showLatestFeatureNotification("inventory"); } void LLSidepanelInventory::performActionOnSelection(const std::string &action) diff --git a/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml index 370a08f16a..5f0eeab71c 100644 --- a/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml +++ b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml @@ -13,6 +13,13 @@ can_drag_on_left="false" can_minimize="false" can_close="false"> + +New inventory features + + +You can now add preview images to inventory items and view a folder in its own window. +Learn more in this [https://community.secondlife.com/blogs/entry/13637-new-features-inventory-item-preview-and-single-folder-view/ blogpost] + -New inventory features +New feature -You can now add preview images to inventory items and view a folder in its own window. -Learn more in this [https://community.secondlife.com/blogs/entry/13637-new-features-inventory-item-preview-and-single-folder-view/ blogpost] +Feature description