diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-06-26 14:48:02 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-06-26 14:48:02 +0300 | 
| commit | 6ee6d19f600bb7fee99f96e8476e2c57088dad17 (patch) | |
| tree | 68b85e3d30e12cfe26cf515048f9f0a8f28eeb5c | |
| parent | 7ae63daff1e1834cc863856df4f731773cc2ad23 (diff) | |
viewer#1005 Review fixes
| -rw-r--r-- | indra/newview/llappearancemgr.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llappearancemgr.h | 2 | ||||
| -rw-r--r-- | indra/newview/llfloaterinventorysettings.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llinventoryfunctions.h | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_gallery_inventory.xml | 16 | 
6 files changed, 14 insertions, 28 deletions
| diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 5971799ca5..fe567f8d1a 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2042,7 +2042,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)  }  // Moved from LLWearableList::ContextMenu for wider utility. -bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids, bool warn_on_type_mismarch) const +bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids, bool warn_on_type_mismatch) const  {      // TODO: investigate wearables may not be loaded at this point EXT-8231 @@ -2072,7 +2072,7 @@ bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids, bool warn_on_t          }          else          { -            if (warn_on_type_mismarch) +            if (warn_on_type_mismatch)              {                  LL_WARNS() << "Unexpected wearable type" << LL_ENDL;              } diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index c2affc766f..51ac6522fa 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -102,7 +102,7 @@ public:      bool getCanReplaceCOF(const LLUUID& outfit_cat_id);      // Can we add all referenced items to the avatar? -    bool canAddWearables(const uuid_vec_t& item_ids, bool warn_on_type_mismarch = true) const; +    bool canAddWearables(const uuid_vec_t& item_ids, bool warn_on_type_mismatch = true) const;      // Copy all items in a category.      void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id, diff --git a/indra/newview/llfloaterinventorysettings.cpp b/indra/newview/llfloaterinventorysettings.cpp index 612953b6df..62f76207a3 100644 --- a/indra/newview/llfloaterinventorysettings.cpp +++ b/indra/newview/llfloaterinventorysettings.cpp @@ -29,6 +29,7 @@  #include "llfloaterinventorysettings.h"  #include "llcolorswatch.h" +#include "llviewercontrol.h"  LLFloaterInventorySettings::LLFloaterInventorySettings(const LLSD& key)    : LLFloater(key) @@ -43,13 +44,17 @@ LLFloaterInventorySettings::~LLFloaterInventorySettings()  BOOL LLFloaterInventorySettings::postBuild()  {      getChild<LLUICtrl>("favorites_color")->setCommitCallback(boost::bind(&LLFloaterInventorySettings::updateColorSwatch, this)); + +    bool enable_color = gSavedSettings.getBOOL("InventoryFavoritesColorText"); +    getChild<LLUICtrl>("favorites_swatch")->setEnabled(enable_color); +      return TRUE;  }  void LLFloaterInventorySettings::updateColorSwatch()  { -    bool val = getChild<LLUICtrl>("favorites_color")->getEnabled(); -    getChild<LLUICtrl>("favorites_color")->setEnabled(val); +    bool val = getChild<LLUICtrl>("favorites_color")->getValue(); +    getChild<LLUICtrl>("favorites_swatch")->setEnabled(val);  }  void LLFloaterInventorySettings::applyUIColor(LLUICtrl* ctrl, const LLSD& param) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 4fbd8856b9..28d79b7665 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2514,12 +2514,12 @@ void set_favorite(const LLUUID& obj_id, bool favorite)      if (obj && obj->getIsLinkType())      { -        obj = gInventory.getObject(obj_id); +        obj = gInventory.getObject(obj->getLinkedUUID());      }      if (obj && obj->getIsFavorite() != favorite)      { -        favorite_send(obj, obj_id, favorite); +        favorite_send(obj, obj->getUUID(), favorite);      }  } @@ -2528,12 +2528,12 @@ void toggle_favorite(const LLUUID& obj_id)      LLInventoryObject* obj = gInventory.getObject(obj_id);      if (obj && obj->getIsLinkType())      { -        obj = gInventory.getObject(obj_id); +        obj = gInventory.getObject(obj->getLinkedUUID());      }      if (obj)      { -        favorite_send(obj, obj_id, !obj->getIsFavorite()); +        favorite_send(obj, obj->getUUID(), !obj->getIsFavorite());      }  } diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 2df9a11290..0eabf696ae 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -331,9 +331,6 @@ protected:  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  // Class LLFavoritesCollector -// -// Simple class that collects calling cards that are not null, and not -// the agent. Duplicates are possible.  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  class LLFavoritesCollector : public LLInventoryCollectFunctor  { diff --git a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml index 11c9988dd6..929c626947 100644 --- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml @@ -126,22 +126,6 @@           parameter="thumbnail" />      </menu_item_call>      <menu_item_call -     label="Add to favorites" -     layout="topleft" -     name="favorites_add"> -        <menu_item_call.on_click -         function="Inventory.DoToSelected" -         parameter="favorite" /> -    </menu_item_call> -  <menu_item_call -   label="Remove from favorites" -   layout="topleft" -   name="favorites_remove"> -    <menu_item_call.on_click -     function="Inventory.DoToSelected" -     parameter="favorite" /> -  </menu_item_call> -    <menu_item_call       label="Copy Asset UUID"       layout="topleft"       name="Copy Asset UUID"> | 
