summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-09-30 00:26:44 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-09-30 00:26:44 +0300
commit9104b899961a9ceb61de73528e85f1a240f30cb5 (patch)
tree5ac855e69f7a82ef18556ffb8df823ab4adcccd7 /indra/newview
parent6614a6ee9987ac2b199aaabe7d9cd520c613c13f (diff)
SL-18235 Remove outfit buttons from unpacking dialog
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloateropenobject.cpp14
-rw-r--r--indra/newview/llfloateropenobject.h2
-rw-r--r--indra/newview/llpanelobjectinventory.cpp21
-rw-r--r--indra/newview/llpanelobjectinventory.h11
-rw-r--r--indra/newview/skins/default/xui/en/floater_openobject.xml52
5 files changed, 28 insertions, 72 deletions
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index 2a1749bd42..a682064dad 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -56,8 +56,6 @@ LLFloaterOpenObject::LLFloaterOpenObject(const LLSD& key)
mDirty(TRUE)
{
mCommitCallbackRegistrar.add("OpenObject.MoveToInventory", boost::bind(&LLFloaterOpenObject::onClickMoveToInventory, this));
- mCommitCallbackRegistrar.add("OpenObject.MoveAndWear", boost::bind(&LLFloaterOpenObject::onClickMoveAndWear, this));
- mCommitCallbackRegistrar.add("OpenObject.ReplaceOutfit", boost::bind(&LLFloaterOpenObject::onClickReplace, this));
mCommitCallbackRegistrar.add("OpenObject.Cancel", boost::bind(&LLFloaterOpenObject::onClickCancel, this));
}
@@ -243,18 +241,6 @@ void LLFloaterOpenObject::onClickMoveToInventory()
closeFloater();
}
-void LLFloaterOpenObject::onClickMoveAndWear()
-{
- moveToInventory(true, false);
- closeFloater();
-}
-
-void LLFloaterOpenObject::onClickReplace()
-{
- moveToInventory(true, true);
- closeFloater();
-}
-
void LLFloaterOpenObject::onClickCancel()
{
closeFloater();
diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h
index 2e761f99bf..745753316b 100644
--- a/indra/newview/llfloateropenobject.h
+++ b/indra/newview/llfloateropenobject.h
@@ -63,8 +63,6 @@ protected:
void moveToInventory(bool wear, bool replace = false);
void onClickMoveToInventory();
- void onClickMoveAndWear();
- void onClickReplace();
void onClickCancel();
static void callbackCreateInventoryCategory(const LLUUID& category_id, LLUUID object_id, bool wear, bool replace = false);
static void callbackMoveInventory(S32 result, void* data);
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index cfaa9456be..5ac5f0d429 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1275,7 +1275,8 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
mHaveInventory(FALSE),
mIsInventoryEmpty(TRUE),
mInventoryNeedsUpdate(FALSE),
- mInventoryViewModel(p.name)
+ mInventoryViewModel(p.name),
+ mShowRootFolder(p.show_root_folder)
{
// Setup context menu callbacks
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelObjectInventory::doToSelected, this, _2));
@@ -1526,15 +1527,23 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root
p.font_highlight_color = item_color;
LLFolderViewFolder* new_folder = LLUICtrlFactory::create<LLFolderViewFolder>(p);
- new_folder->addToFolder(mFolders);
- new_folder->toggleOpen();
+
+ if (mShowRootFolder)
+ {
+ new_folder->addToFolder(mFolders);
+ new_folder->toggleOpen();
+ }
if (!contents.empty())
{
- createViewsForCategory(&contents, inventory_root, new_folder);
+ createViewsForCategory(&contents, inventory_root, mShowRootFolder ? new_folder : mFolders);
}
- // Refresh for label to add item count
- new_folder->refresh();
+
+ if (mShowRootFolder)
+ {
+ // Refresh for label to add item count
+ new_folder->refresh();
+ }
}
}
diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h
index 7b9ecfb8f3..0e450d8ce9 100644
--- a/indra/newview/llpanelobjectinventory.h
+++ b/indra/newview/llpanelobjectinventory.h
@@ -48,8 +48,14 @@ class LLViewerObject;
class LLPanelObjectInventory : public LLPanel, public LLVOInventoryListener
{
public:
- // dummy param block for template registration purposes
- struct Params : public LLPanel::Params {};
+ struct Params : public LLInitParam::Block<Params, LLPanel::Params>
+ {
+ Optional<bool> show_root_folder;
+
+ Params()
+ : show_root_folder("show_root_folder", true)
+ {}
+ };
LLPanelObjectInventory(const Params&);
virtual ~LLPanelObjectInventory();
@@ -110,6 +116,7 @@ private:
BOOL mIsInventoryEmpty; // 'Empty' label
BOOL mInventoryNeedsUpdate; // for idle, set on changed callback
LLFolderViewModelInventory mInventoryViewModel;
+ bool mShowRootFolder;
};
#endif // LL_LLPANELOBJECTINVENTORY_H
diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml
index 912db80bcc..ec03d7d32c 100644
--- a/indra/newview/skins/default/xui/en/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/en/floater_openobject.xml
@@ -3,7 +3,7 @@
legacy_header_height="18"
can_resize="true"
default_tab_group="1"
- height="370"
+ height="350"
layout="topleft"
min_height="190"
min_width="285"
@@ -31,62 +31,18 @@
background_visible="false"
draw_border="false"
follows="all"
- height="240"
+ height="265"
layout="topleft"
+ show_root_folder="false"
left="10"
name="object_contents"
top_pad="0"
width="284" />
- <view_border
- bevel_style="none"
- follows="bottom|left"
- height="50"
- highlight_light_color="0.6 0.6 0.6"
- layout="topleft"
- left="10"
- name="border"
- top_pad="5"
- width="270"/>
- <text
- follows="bottom|left"
- height="15"
- layout="topleft"
- left="15"
- name="border_note"
- text_color="White"
- top_delta="5">
- Copy to inventory and wear
- </text>
- <button
- follows="bottom|left"
- height="23"
- label="Add to outfit"
- label_selected="Add to outfit"
- layout="topleft"
- left="15"
- name="copy_and_wear_button"
- top_pad="3"
- width="135">
- <button.commit_callback
- function="OpenObject.MoveAndWear" />
- </button>
- <button
- follows="bottom|left"
- height="23"
- label="Replace outfit"
- label_selected="Replace outfit"
- layout="topleft"
- left_pad="5"
- name="copy_and_replace_button"
- width="120">
- <button.commit_callback
- function="OpenObject.ReplaceOutfit" />
- </button>
<button
follows="bottom|left"
height="23"
label="Only copy to inventory"
- label_selected="Only copy to inventory"
+ label_selected="Copy to inventory"
layout="topleft"
left="15"
name="copy_to_inventory_button"