diff options
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 4 | ||||
| -rw-r--r-- | indra/newview/llagent.cpp | 88 | ||||
| -rw-r--r-- | indra/newview/llagent.h | 5 | ||||
| -rw-r--r-- | indra/newview/llaisapi.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llfloaternewfeaturenotification.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llfloatersimplesnapshot.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llinspecttexture.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llinventorymodelbackgroundfetch.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llpanellandmarkinfo.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llpanellandmarkinfo.h | 2 | ||||
| -rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llviewertexturelist.cpp | 19 | ||||
| -rw-r--r-- | indra/newview/llviewertexturelist.h | 7 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_new_feature_notification.xml | 12 | 
15 files changed, 141 insertions, 40 deletions
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 @@          <key>Persist</key>          <integer>1</integer>          <key>Type</key> -        <string>S32</string> +        <string>LLSD</string>          <key>Value</key> -        <integer>0</integer> +        <string></string>      </map>      <key>LastFindPanel</key>      <map> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8574134032..bca2ce4b99 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -121,6 +121,9 @@ 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 +// Will need to change to 3 once either inventory or gltf releases and cause a conflict +const S32 UI_FEATURE_FLAGS = 1;  // The agent instance.  LLAgent gAgent; @@ -568,27 +571,84 @@ 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 = 1; // inventory flag +    } +    else if (feature_version.isMap()) +    { +        version = feature_version["version"]; +        flags = feature_version["flags"]; +    } +    else if (!feature_version.isString() && !feature_version.isUndefined()) +    { +        // 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)      { -        // 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); +        S32 flag = 0; + +        if (key == "inventory") +        { +            // Notify user about new thumbnail support +            flag = 1; +        } + +        if (key == "gltf") +        { +            flag = 2; +        } + +        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/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/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<LLButton>("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<LLUICtrl>(title_txt)->setValue(getString(title_txt + feature)); +    getChild<LLUICtrl>(dsc_txt)->setValue(getString(dsc_txt + feature)); +      return TRUE;  } 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/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); 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/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/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<LLImageJ2C> compressedImage = convertToUploadFile(raw_image, max_image_dimentions); +	LLPointer<LLImageJ2C> 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<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImageRaw> raw_image, const S32 max_image_dimentions) +LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImageRaw> 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<LLImageJ2C> 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<LLImageJ2C> convertToUploadFile(LLPointer<LLImageRaw> raw_image, const S32 max_image_dimentions = LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT); +                                 const S32 min_image_dimentions = 0, +                                 bool force_square = false); +	static LLPointer<LLImageJ2C> convertToUploadFile(LLPointer<LLImageRaw> 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: 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 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"> +    <floater.string name="title_txt_inventory"> +New inventory features +    </floater.string> +    <floater.string name="description_txt_inventory"> +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] +    </floater.string>    <text     type="string"     length="1" @@ -25,7 +32,7 @@     top="10"     right="-10"     name="title_txt"> -New inventory features +New feature    </text>    <text     type="string" @@ -39,8 +46,7 @@ New inventory features     right="-10"     word_wrap="true"     name="description_txt"> -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    </text>    <button     follows="bottom|left|right"  | 
