summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-02-22 01:41:49 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-02-22 01:44:41 +0200
commit4eee501517e756b6bbb942585290b806fc46d278 (patch)
treec9107140d10f7e4b9cd6d229f4e69a7f556a5417 /indra/newview
parent682c9aa3c20db25c4fbaa8f5811ea0e44fa115a0 (diff)
SL-19108 Cleanup Outfit Galery #2
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lloutfitgallery.cpp16
-rw-r--r--indra/newview/lloutfitslist.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml21
3 files changed, 4 insertions, 44 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 4eb596e0b5..6ef8080d8c 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -36,7 +36,6 @@
#include "llaccordionctrltab.h"
#include "llappearancemgr.h"
-#include "llagentbenefits.h"
#include "llerror.h"
#include "llfilepicker.h"
#include "llfloaterperms.h"
@@ -888,16 +887,6 @@ bool LLOutfitGalleryContextMenu::onEnable(LLSD::String param)
bool LLOutfitGalleryContextMenu::onVisible(LLSD::String param)
{
- mMenuHandle.get()->getChild<LLUICtrl>("upload_photo")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
- if ("remove_photo" == param)
- {
- LLOutfitGallery* gallery = dynamic_cast<LLOutfitGallery*>(mOutfitList);
- LLUUID selected_id = mUUIDs.front();
- if (gallery && selected_id.notNull())
- {
- return !gallery->hasDefaultImage(selected_id);
- }
- }
return LLOutfitContextMenu::onVisible(param);
}
@@ -912,10 +901,7 @@ void LLOutfitGalleryGearMenu::onUpdateItemsVisibility()
bool have_selection = getSelectedOutfitID().notNull();
mMenu->setItemVisible("expand", FALSE);
mMenu->setItemVisible("collapse", FALSE);
- mMenu->setItemVisible("upload_photo", have_selection);
- mMenu->setItemVisible("select_photo", have_selection);
- mMenu->setItemVisible("take_snapshot", have_selection);
- mMenu->setItemVisible("remove_photo", !hasDefaultImage());
+ mMenu->setItemVisible("thumbnail", have_selection);
mMenu->setItemVisible("sepatator3", TRUE);
mMenu->setItemVisible("sort_folders_by_name", TRUE);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 2f7d1c433a..fe15d21e36 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -35,7 +35,6 @@
#include "llaccordionctrltab.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
-#include "llagentbenefits.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
@@ -1230,7 +1229,6 @@ bool LLOutfitListGearMenuBase::onEnable(LLSD::String param)
bool LLOutfitListGearMenuBase::onVisible(LLSD::String param)
{
- getMenu()->getChild<LLUICtrl>("upload_photo")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
const LLUUID& selected_outfit_id = getSelectedOutfitID();
if (selected_outfit_id.isNull()) // no selection or invalid outfit selected
{
@@ -1251,8 +1249,8 @@ bool LLOutfitListGearMenuBase::onVisible(LLSD::String param)
void LLOutfitListGearMenuBase::onThumbnail()
{
- const LLUUID& selected_outfit_id = getSelectedOutfitID();
- LLSD data(selected_outfit_id);
+ const LLUUID& selected_outfit_id = getSelectedOutfitID();
+ LLSD data(selected_outfit_id);
LLFloaterReg::showInstance("change_item_thumbnail", data);
}
@@ -1273,10 +1271,7 @@ void LLOutfitListGearMenu::onUpdateItemsVisibility()
if (!mMenu) return;
mMenu->setItemVisible("expand", TRUE);
mMenu->setItemVisible("collapse", TRUE);
- mMenu->setItemVisible("upload_photo", FALSE);
- mMenu->setItemVisible("select_photo", FALSE);
- mMenu->setItemVisible("take_snapshot", FALSE);
- mMenu->setItemVisible("remove_photo", FALSE);
+ mMenu->setItemVisible("thumbnail", FALSE); // Never visible?
mMenu->setItemVisible("sepatator3", FALSE);
mMenu->setItemVisible("sort_folders_by_name", FALSE);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
index 0f7a7e8d56..e216962d12 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -46,27 +46,6 @@
<on_click
function="Gear.Thumbnail" />
</menu_item_call>
- <menu_item_call
- label="Select Photo"
- layout="topleft"
- name="select_photo">
- <on_click
- function="Gear.SelectPhoto" />
- </menu_item_call>
- <menu_item_call
- label="Take a Snapshot"
- layout="topleft"
- name="take_snapshot">
- <on_click
- function="Gear.TakeSnapshot" />
- </menu_item_call>
- <menu_item_call
- label="Remove Photo"
- layout="topleft"
- name="remove_photo">
- <on_click
- function="Gear.RemovePhoto" />
- </menu_item_call>
<menu_item_separator name="sepatator1" />
<!-- copied (with minor modifications) from menu_inventory_add.xml -->
<!-- *TODO: generate dynamically? -->