summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lloutfitgallery.cpp12
-rw-r--r--indra/newview/lloutfitgallery.h1
-rw-r--r--indra/newview/lloutfitslist.cpp98
-rw-r--r--indra/newview/lloutfitslist.h29
-rw-r--r--indra/newview/llpanelappearancetab.h7
-rw-r--r--indra/newview/llpaneloutfitedit.cpp4
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp67
-rw-r--r--indra/newview/llpaneloutfitsinventory.h21
-rw-r--r--indra/newview/llpanelwearing.cpp18
-rw-r--r--indra/newview/llpanelwearing.h6
-rw-r--r--indra/newview/llsidepanelappearance.cpp9
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml35
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_sort.xml51
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_gallery.xml48
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_list.xml46
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_wearing.xml33
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_appearance.xml111
17 files changed, 412 insertions, 184 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index da2fbebc14..2401469665 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -1188,10 +1188,11 @@ void LLOutfitGalleryGearMenu::onUpdateItemsVisibility()
{
if (!mMenu) return;
bool have_selection = getSelectedOutfitID().notNull();
- mMenu->setItemVisible("expand", FALSE);
- mMenu->setItemVisible("collapse", FALSE);
mMenu->setItemVisible("thumbnail", have_selection);
- mMenu->setItemVisible("sort_order_by_image", TRUE);
+ mMenu->setItemVisible("inventory_settings", false);
+ mMenu->setItemVisible("inv_settings_separator", false);
+ mMenu->setItemVisible("sort_order_separator", true);
+ mMenu->setItemVisible("sort_order_by_image", true);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
@@ -1306,6 +1307,11 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
}
}
+LLToggleableMenu* LLOutfitGallery::getSortMenu()
+{
+ return nullptr;
+}
+
LLUUID LLOutfitGallery::getPhotoAssetId(const LLUUID& outfit_id)
{
outfit_map_t::iterator outfit_it = mOutfitMap.find(outfit_id);
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 99371b1cec..f530212d26 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -106,6 +106,7 @@ public:
bool hasDefaultImage(const LLUUID& outfit_cat_id);
void refreshOutfit(const LLUUID& category_id);
+ virtual LLToggleableMenu* getSortMenu();
protected:
/*virtual*/ void onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id);
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index ededca253b..94e242c3ef 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -107,6 +107,7 @@ LLOutfitsList::LLOutfitsList()
, mAccordion(NULL)
, mListCommands(NULL)
, mItemSelected(false)
+ , mSortMenu(nullptr)
{
LLControlVariable* ctrl = gSavedSettings.getControl("InventoryFavoritesColorText");
if (ctrl)
@@ -117,7 +118,9 @@ LLOutfitsList::LLOutfitsList()
LLOutfitsList::~LLOutfitsList()
{
+ delete mSortMenu;
mSavedSettingInvFavColor.disconnect();
+ mGearMenuConnection.disconnect();
}
BOOL LLOutfitsList::postBuild()
@@ -322,6 +325,11 @@ void LLOutfitsList::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid)
}
}
+void LLOutfitListBase::onAction(const LLSD& userdata)
+{
+ performAction(userdata.asString());
+}
+
// virtual
bool LLOutfitListBase::isActionEnabled(const LLSD& userdata)
{
@@ -763,6 +771,25 @@ void LLOutfitsList::handleInvFavColorChange()
}
}
+
+LLToggleableMenu* LLOutfitsList::getSortMenu()
+{
+ if (!mSortMenu)
+ {
+ mSortMenu = new LLOutfitListSortMenu(this);
+ }
+ return mSortMenu->getMenu();
+}
+
+void LLOutfitsList::updateMenuItemsVisibility()
+{
+ if (mSortMenu)
+ {
+ mSortMenu->updateItemsVisibility();
+ }
+ LLOutfitListBase::updateMenuItemsVisibility();
+}
+
LLOutfitListGearMenuBase* LLOutfitsList::createGearMenu()
{
return new LLOutfitListGearMenu(this);
@@ -780,10 +807,10 @@ bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y)
LLOutfitListBase::LLOutfitListBase()
: LLPanelAppearanceTab()
, mIsInitialized(false)
+ , mGearMenu(nullptr)
{
mCategoriesObserver = new LLInventoryCategoriesObserver();
mOutfitMenu = new LLOutfitContextMenu(this);
- //mGearMenu = createGearMenu();
}
LLOutfitListBase::~LLOutfitListBase()
@@ -1047,12 +1074,6 @@ void LLOutfitListBase::ChangeOutfitSelection(LLWearableItemsList* list, const LL
BOOL LLOutfitListBase::postBuild()
{
- mGearMenu = createGearMenu();
-
- LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn");
-
- menu_gear_btn->setMouseDownCallback(boost::bind(&LLOutfitListGearMenuBase::updateItemsVisibility, mGearMenu));
- menu_gear_btn->setMenu(mGearMenu->getMenu());
return TRUE;
}
@@ -1066,6 +1087,20 @@ void LLOutfitListBase::expandAllFolders()
onExpandAllFolders();
}
+void LLOutfitListBase::updateMenuItemsVisibility()
+{
+ mGearMenu->updateItemsVisibility();
+}
+
+LLToggleableMenu* LLOutfitListBase::getGearMenu()
+{
+ if (!mGearMenu)
+ {
+ mGearMenu = createGearMenu();
+ }
+ return mGearMenu->getMenu();
+};
+
void LLOutfitListBase::deselectOutfit(const LLUUID& category_id)
{
// Reset selection if the outfit is selected.
@@ -1215,8 +1250,6 @@ LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist)
registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenuBase::onRename, this));
registrar.add("Gear.Delete", boost::bind(&LLOutfitListBase::removeSelected, mOutfitList));
registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenuBase::onCreate, this, _2));
- registrar.add("Gear.Collapse", boost::bind(&LLOutfitListBase::onCollapseAllFolders, mOutfitList));
- registrar.add("Gear.Expand", boost::bind(&LLOutfitListBase::onExpandAllFolders, mOutfitList));
registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenuBase::onAdd, this));
registrar.add("Gear.Save", boost::bind(&LLOutfitListGearMenuBase::onSave, this));
@@ -1403,14 +1436,55 @@ LLOutfitListGearMenu::~LLOutfitListGearMenu()
void LLOutfitListGearMenu::onUpdateItemsVisibility()
{
if (!mMenu) return;
- mMenu->setItemVisible("expand", TRUE);
- mMenu->setItemVisible("collapse", TRUE);
mMenu->setItemVisible("thumbnail", getSelectedOutfitID().notNull());
mMenu->setItemVisible("favorite", getSelectedOutfitID().notNull());
- mMenu->setItemVisible("sort_order_by_image", FALSE);
+ mMenu->setItemVisible("inventory_settings", true);
+ mMenu->setItemVisible("inv_settings_separator", true);
+ mMenu->setItemVisible("sort_order_separator", false);
+ mMenu->setItemVisible("sort_order_by_image", false);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
+//////////////////// LLOutfitListSortMenu ////////////////////
+
+LLOutfitListSortMenu::LLOutfitListSortMenu(LLOutfitListBase* parent_panel)
+ : mPanelHandle(parent_panel->getHandle())
+{
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+ LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
+
+ registrar.add("Sort.Collapse", boost::bind(&LLOutfitListBase::onCollapseAllFolders, parent_panel));
+ registrar.add("Sort.Expand", boost::bind(&LLOutfitListBase::onExpandAllFolders, parent_panel));
+ registrar.add("Sort.OnAction", boost::bind(&LLOutfitListBase::onAction, parent_panel, _2));
+ enable_registrar.add("Sort.OnEnable", boost::bind(&LLOutfitListBase::isActionEnabled, parent_panel, _2));
+
+ mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
+ "menu_outfit_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ llassert(mMenu);
+}
+
+
+LLToggleableMenu* LLOutfitListSortMenu::getMenu()
+{
+ return mMenu;
+}
+
+void LLOutfitListSortMenu::updateItemsVisibility()
+{
+ onUpdateItemsVisibility();
+}
+
+void LLOutfitListSortMenu::onUpdateItemsVisibility()
+{
+ if (!mMenu) return;
+ mMenu->setItemVisible("expand", true);
+ mMenu->setItemVisible("collapse", true);
+ mMenu->setItemVisible("sort_favorites_to_top", true);
+ mMenu->setItemVisible("show_entire_outfit_in_search", true);
+}
+
+
+//////////////////// LLOutfitAccordionCtrlTab ////////////////////
LLUIImage* LLOutfitAccordionCtrlTab::sFavoriteIcon;
LLUIColor LLOutfitAccordionCtrlTab::sFgColor;
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 1e053eccc7..94df963977 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -41,6 +41,7 @@
class LLAccordionCtrlTab;
class LLInventoryCategoriesObserver;
class LLOutfitListGearMenuBase;
+class LLOutfitListSortMenuBase;
class LLWearableItemsList;
class LLListContextMenu;
@@ -92,6 +93,7 @@ public:
boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb);
void outfitRightClickCallBack(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id);
+ void onAction(const LLSD& userdata);
virtual bool isActionEnabled(const LLSD& userdata);
virtual void performAction(std::string action);
virtual bool hasItemSelected() = 0;
@@ -109,6 +111,10 @@ public:
virtual bool getHasExpandableFolders() = 0;
+ virtual void updateMenuItemsVisibility();
+ virtual LLToggleableMenu* getGearMenu();
+ virtual bool getTrashMenuVisible() { return true; };
+
protected:
void observerCallback(const LLUUID& category_id);
virtual LLOutfitListGearMenuBase* createGearMenu() = 0;
@@ -139,6 +145,7 @@ protected:
selection_change_signal_t mSelectionChangeSignal;
LLListContextMenu* mOutfitMenu;
LLOutfitListGearMenuBase* mGearMenu;
+ boost::signals2::connection mGearMenuConnection;
};
//////////////////////////////////////////////////////////////////////////
@@ -155,7 +162,6 @@ protected:
/* virtual */ LLContextMenu* createMenu();
bool onEnable(LLSD::String param);
-
bool onVisible(LLSD::String param);
static void editOutfit();
@@ -204,6 +210,22 @@ private:
bool onVisible(LLSD::String param);
};
+class LLOutfitListSortMenu
+{
+public:
+ LLOutfitListSortMenu(LLOutfitListBase* parent_panel);
+
+ LLToggleableMenu* getMenu();
+ void updateItemsVisibility();
+
+private:
+ void onUpdateItemsVisibility();
+
+ LLToggleableMenu* mMenu;
+ LLHandle<LLPanel> mPanelHandle;
+};
+
+
class LLOutfitListGearMenu : public LLOutfitListGearMenuBase
{
public:
@@ -301,6 +323,9 @@ public:
/*virtual*/ bool getHasExpandableFolders() { return TRUE; }
+ virtual LLToggleableMenu* getSortMenu();
+ void updateMenuItemsVisibility();
+
protected:
LLOutfitListGearMenuBase* createGearMenu();
@@ -390,7 +415,7 @@ private:
// Used to monitor COF changes for updating items worn state. See EXT-8636.
uuid_vec_t mCOFLinkedItems;
- //LLOutfitListGearMenu* mGearMenu;
+ LLOutfitListSortMenu* mSortMenu;
//bool mIsInitialized;
/**
diff --git a/indra/newview/llpanelappearancetab.h b/indra/newview/llpanelappearancetab.h
index e81394dd3c..3d049b7e5c 100644
--- a/indra/newview/llpanelappearancetab.h
+++ b/indra/newview/llpanelappearancetab.h
@@ -29,6 +29,8 @@
#include "llpanel.h"
+class LLToggleableMenu;
+
class LLPanelAppearanceTab : public LLPanel
{
public:
@@ -47,6 +49,11 @@ public:
const std::string& getFilterSubString() { return mFilterSubString; }
+ virtual void updateMenuItemsVisibility() = 0;
+ virtual LLToggleableMenu* getGearMenu() = 0;
+ virtual LLToggleableMenu* getSortMenu() = 0;
+ virtual bool getTrashMenuVisible() = 0;
+
protected:
/**
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index c7ae4eb0d9..afcadd9c33 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -404,7 +404,9 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
mWearableListManager(NULL),
mPlusBtn(NULL),
mWearablesGearMenuBtn(NULL),
- mGearMenuBtn(NULL)
+ mGearMenuBtn(NULL),
+ mStatus(NULL),
+ mCurrentOutfitName(NULL)
{
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(FALSE);
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index af06de379d..3bfb9b8cf2 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -33,6 +33,7 @@
#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
+#include "llmenubutton.h"
#include "llnotificationsutil.h"
#include "lloutfitgallery.h"
#include "lloutfitobserver.h"
@@ -53,12 +54,17 @@ static const std::string SAVE_BTN("save_btn");
static LLPanelInjector<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
-LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
- mMyOutfitsPanel(NULL),
- mCurrentOutfitPanel(NULL),
- mActivePanel(NULL),
- mAppearanceTabs(NULL),
- mInitialized(false)
+LLPanelOutfitsInventory::LLPanelOutfitsInventory()
+ : mMyOutfitsPanel(nullptr)
+ , mCurrentOutfitPanel(nullptr)
+ , mActivePanel(nullptr)
+ , mAppearanceTabs(nullptr)
+ , mInitialized(false)
+ , mGearMenu(nullptr)
+ , mSortMenu(nullptr)
+ , mTrashBtn(nullptr)
+ , mSortMenuPanel(nullptr)
+ , mTrashMenuPanel(nullptr)
{
gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this));
gAgentWearables.addLoadingStartedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoading, this));
@@ -75,6 +81,9 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
{
gSavedSettings.setS32("LastAppearanceTab", mAppearanceTabs->getCurrentPanelIndex());
}
+ mGearMenuConnection.disconnect();
+ mSortMenuConnection.disconnect();
+ mTrashMenuConnection.disconnect();
}
// virtual
@@ -257,6 +266,22 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
mOutfitGalleryPanel->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
}
+void LLPanelOutfitsInventory::setMenuButtons(LLMenuButton* gear_menu, LLMenuButton* sort_menu, LLButton* trash_btn, LLPanel* sort_menu_panel, LLPanel* trash_menu_panel)
+{
+ mGearMenu = gear_menu;
+ mSortMenu = sort_menu;
+ mTrashBtn = trash_btn;
+ mSortMenuPanel = sort_menu_panel;
+ mTrashMenuPanel = trash_menu_panel;
+
+ mGearMenuConnection.disconnect();
+ mSortMenuConnection.disconnect();
+ mTrashMenuConnection.disconnect();
+ mGearMenuConnection = mGearMenu->setMouseDownCallback(boost::bind(&LLPanelOutfitsInventory::onGearMouseDown, this));
+ mSortMenuConnection = mSortMenu->setMouseDownCallback(boost::bind(&LLPanelOutfitsInventory::onGearMouseDown, this));
+ mTrashMenuConnection = mTrashBtn->setClickedCallback(boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
+}
+
void LLPanelOutfitsInventory::updateListCommands()
{
bool trash_enabled = isActionEnabled("delete");
@@ -285,6 +310,14 @@ void LLPanelOutfitsInventory::onTrashButtonClick()
}
}
+void LLPanelOutfitsInventory::onGearMouseDown()
+{
+ if (mActivePanel)
+ {
+ mActivePanel->updateMenuItemsVisibility();
+ }
+}
+
bool LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
{
return mActivePanel && mActivePanel->isActionEnabled(userdata);
@@ -321,6 +354,28 @@ void LLPanelOutfitsInventory::onTabChange()
mActivePanel->checkFilterSubString();
mActivePanel->onOpen(LLSD());
+ if (mGearMenu)
+ {
+ mGearMenu->setMenu(mActivePanel->getGearMenu(), LLMenuButton::MP_BOTTOM_LEFT);
+ }
+ if (mSortMenu && mSortMenuPanel)
+ {
+ LLToggleableMenu* menu = mActivePanel->getSortMenu();
+ if (menu)
+ {
+ mSortMenu->setMenu(menu, LLMenuButton::MP_BOTTOM_LEFT);
+ mSortMenuPanel->setVisible(true);
+ }
+ else
+ {
+ mSortMenuPanel->setVisible(false);
+ }
+ }
+ if (mTrashMenuPanel)
+ {
+ mTrashMenuPanel->setVisible(mActivePanel->getTrashMenuVisible());
+ }
+
updateVerbs();
}
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 63f9f599f1..29c498bd3a 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -30,11 +30,13 @@
#include "llpanel.h"
+class LLButton;
class LLOutfitGallery;
class LLOutfitsList;
class LLOutfitListGearMenuBase;
class LLPanelAppearanceTab;
class LLPanelWearing;
+class LLMenuButton;
class LLMenuGL;
class LLSidepanelAppearance;
class LLTabContainer;
@@ -63,6 +65,13 @@ public:
bool isCOFPanelActive() const;
+ void setMenuButtons(
+ LLMenuButton* gear_menu,
+ LLMenuButton* sort_menu,
+ LLButton* trash_btn,
+ LLPanel* sort_menu_panel,
+ LLPanel* trash_menu_panel);
+
protected:
void updateVerbs();
@@ -92,8 +101,8 @@ protected:
void initListCommandsHandlers();
void updateListCommands();
void onWearButtonClick();
- void showGearMenu();
void onTrashButtonClick();
+ void onGearMouseDown();
bool isActionEnabled(const LLSD& userdata);
void setWearablesLoading(bool val);
void onWearablesLoaded();
@@ -105,6 +114,16 @@ private:
//////////////////////////////////////////////////////////////////////////////////
bool mInitialized;
+
+ // not owned items
+ LLMenuButton* mGearMenu;
+ LLMenuButton* mSortMenu;
+ LLButton* mTrashBtn;
+ LLPanel* mSortMenuPanel;
+ LLPanel* mTrashMenuPanel;
+ boost::signals2::connection mGearMenuConnection;
+ boost::signals2::connection mSortMenuConnection;
+ boost::signals2::connection mTrashMenuConnection;
};
#endif //LL_LLPANELOUTFITSINVENTORY_H
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index bfdb0fbc88..b66c546f9b 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -232,6 +232,10 @@ LLPanelWearing::~LLPanelWearing()
{
mAttachmentsChangedConnection.disconnect();
}
+ if (mGearMenuConnection.connected())
+ {
+ mGearMenuConnection.disconnect();
+ }
}
BOOL LLPanelWearing::postBuild()
@@ -249,10 +253,6 @@ BOOL LLPanelWearing::postBuild()
mTempItemsList->setFgUnselectedColor(LLColor4::white);
mTempItemsList->setRightMouseDownCallback(boost::bind(&LLPanelWearing::onTempAttachmentsListRightClick, this, _1, _2, _3));
- LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn");
-
- menu_gear_btn->setMenu(mGearMenu->getMenu());
-
return TRUE;
}
@@ -560,6 +560,16 @@ void LLPanelWearing::onRemoveAttachment()
}
}
+LLToggleableMenu* LLPanelWearing::getGearMenu()
+{
+ return mGearMenu->getMenu();
+}
+
+LLToggleableMenu* LLPanelWearing::getSortMenu()
+{
+ return NULL;
+}
+
void LLPanelWearing::onRemoveItem()
{
if (mWearablesTab->isExpanded())
diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h
index 2f3f14956a..1131cfe46d 100644
--- a/indra/newview/llpanelwearing.h
+++ b/indra/newview/llpanelwearing.h
@@ -84,6 +84,11 @@ public:
void onEditAttachment();
void onRemoveAttachment();
+ void updateMenuItemsVisibility() {};
+ LLToggleableMenu* getGearMenu();
+ LLToggleableMenu* getSortMenu();
+ bool getTrashMenuVisible() { return false; }
+
private:
void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
void onTempAttachmentsListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
@@ -93,6 +98,7 @@ private:
LLWearableItemsList* mCOFItemsList;
LLScrollListCtrl* mTempItemsList;
LLWearingGearMenu* mGearMenu;
+ boost::signals2::connection mGearMenuConnection;
LLListContextMenu* mContextMenu;
LLListContextMenu* mAttachmentsMenu;
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 7571d361a4..8dfea43a8d 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -39,6 +39,7 @@
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
#include "llfolderviewmodel.h"
+#include "llmenubutton.h"
#include "lloutfitobserver.h"
#include "llpaneleditwearable.h"
#include "llpaneloutfitsinventory.h"
@@ -142,6 +143,14 @@ BOOL LLSidepanelAppearance::postBuild()
setWearablesLoading(gAgentWearables.isCOFChangeInProgress());
+
+ LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn");
+ LLMenuButton* menu_sort_btn = getChild<LLMenuButton>("sorting_menu_btn");
+ LLButton* menu_trash_btn = getChild<LLButton>("trash_btn");
+ LLPanel* menu_sort_btn_panel = getChild<LLPanel>("options_sort_btn_panel");
+ LLPanel* menu_trash_btn_panel = getChild<LLPanel>("trash_btn_panel");
+ mPanelOutfitsInventory->setMenuButtons(menu_gear_btn, menu_sort_btn, menu_trash_btn, menu_sort_btn_panel, menu_trash_btn_panel);
+
return TRUE;
}
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 7eb03ce6d8..bd0c49309d 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -109,10 +109,8 @@
function="Gear.OnVisible"
parameter="delete" />
</menu_item_call>
- <menu_item_separator>
- <on_visible
- function="Gear.OnVisible"/>
- </menu_item_separator>
+ <menu_item_separator
+ name="sort_order_separator"/>
<menu_item_check
label="Show outfits with images first"
layout="topleft"
@@ -123,20 +121,6 @@
function="Gear.OnEnable"
parameter="sort_by_image" />
</menu_item_check>
- <menu_item_call
- label="Expand all folders"
- layout="topleft"
- name="expand">
- <on_click
- function="Gear.Expand" />
- </menu_item_call>
- <menu_item_call
- label="Collapse all folders"
- layout="topleft"
- name="collapse">
- <on_click
- function="Gear.Collapse" />
- </menu_item_call>
<menu_item_separator/>
<!-- copied (with minor modifications) from menu_inventory_add.xml -->
<!-- *TODO: generate dynamically? -->
@@ -297,4 +281,19 @@
</menu_item_call>
</menu>
<!-- copied from menu_inventory_add.xml -->
+
+ <menu_item_separator
+ name="inv_settings_separator"/>
+
+ <menu_item_check
+ label="Inventory settings..."
+ layout="topleft"
+ name="inventory_settings">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="inventory_settings" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="inventory_settings" />
+ </menu_item_check>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_sort.xml b/indra/newview/skins/default/xui/en/menu_outfit_sort.xml
new file mode 100644
index 0000000000..eeee5689a7
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_outfit_sort.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<toggleable_menu
+ layout="topleft"
+ visible="false"
+ name="Sort Outfit">
+ <menu_item_call
+ label="Expand all folders"
+ layout="topleft"
+ name="expand">
+ <on_click
+ function="Sort.OnAction"
+ parameter="expand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Collapse all folders"
+ layout="topleft"
+ visible="true"
+ name="collapse">
+ <on_click
+ function="Sort.OnAction"
+ parameter="collapse" />
+ </menu_item_call>
+
+ <menu_item_separator/>
+
+ <menu_item_check
+ label="Sort favorites to top"
+ layout="topleft"
+ name="sort_favorites_to_top">
+ <on_click
+ function="Sort.OnAction"
+ parameter="sort_favorites" />
+ <on_check
+ function="Sort.OnEnable"
+ parameter="sort_favorites" />
+ </menu_item_check>
+
+ <menu_item_separator/>
+
+ <menu_item_check
+ label="Show entire outfit in search"
+ layout="topleft"
+ name="show_entire_outfit_in_search">
+ <on_click
+ function="Sort.OnAction"
+ parameter="show_entire_outfit" />
+ <on_check
+ function="Sort.OnEnable"
+ parameter="show_entire_outfit" />
+ </menu_item_check>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
index 6bd491f7a3..96624e7aa2 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
@@ -35,7 +35,7 @@
</text>
<scroll_container
follows="all"
- height="400"
+ height="429"
width="312"
layout="topleft"
left="4"
@@ -44,49 +44,5 @@
name="gallery_scroll_panel"
opaque="false"
top_pad="0">
- </scroll_container>
- <panel
- background_visible="true"
- follows="bottom|left|right"
- height="28"
- layout="topleft"
- left="4"
- top_pad="0"
- visible="true"
- name="bottom_panel"
- width="312">
- <menu_button
- follows="bottom|left"
- tool_tip="Show additional options"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="options_gear_btn"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Middle_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_icon"
- width="243"/>
- <button
- follows="bottom|right"
- height="25"
- image_hover_unselected="Toolbar_Right_Over"
- image_overlay="TrashItem_Off"
- image_selected="Toolbar_Right_Selected"
- image_unselected="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="trash_btn"
- tool_tip="Delete selected outfit"
- width="31"/>
- </panel>
+ </scroll_container>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
index 9281a21fbf..b38e2b2b50 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
@@ -16,7 +16,7 @@
bg_opaque_color="DkGray2"
follows="all"
- height="400"
+ height="428"
layout="topleft"
left="3"
name="outfits_accordion"
@@ -30,48 +30,4 @@
name="no_outfits_msg"
value="You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]"/>
</accordion>
- <panel
- background_visible="true"
- follows="bottom|left|right"
- height="28"
- layout="topleft"
- left="4"
- top_pad="0"
- visible="true"
- name="bottom_panel"
- width="312">
- <menu_button
- follows="bottom|left"
- tool_tip="Show additional options"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="options_gear_btn"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Middle_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_icon"
- width="243"/>
- <button
- follows="bottom|right"
- height="25"
- image_hover_unselected="Toolbar_Right_Over"
- image_overlay="TrashItem_Off"
- image_selected="Toolbar_Right_Selected"
- image_unselected="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="trash_btn"
- tool_tip="Delete selected outfit"
- width="31"/>
- </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
index a486c03ac7..ceefe9f6fb 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
@@ -16,7 +16,7 @@
<accordion
fit_parent="true"
follows="all"
- height="400"
+ height="429"
layout="topleft"
left="3"
single_expansion="true"
@@ -62,35 +62,4 @@
</scroll_list>
</accordion_tab>
</accordion>
- <panel
- background_visible="true"
- follows="bottom|left|right"
- height="28"
- layout="topleft"
- left="4"
- name="bottom_panel"
- top_pad="0"
- width="312">
- <menu_button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="options_gear_btn"
- tool_tip="Show additional options"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_icon"
- width="274" />
- </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index c898b0989e..a16b0b58da 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -64,7 +64,7 @@ width="333">
font="SansSerifSmall"
text_color="EmphasisColor"
width="300"
- height="10"
+ height="13"
follows="top|left|right"
layout="topleft"
left="35"
@@ -94,7 +94,7 @@ width="333">
image_overlay="Edit_Wrench"
label=""
layout="topleft"
- left="265"
+ right="-3"
name="edit_outfit_btn"
tool_tip="Edit this outfit"
top="3"
@@ -108,17 +108,100 @@ width="333">
top="6"
width="24" />
</panel>
- <filter_editor
- height="23"
- follows="left|top|right"
- layout="topleft"
- left="10"
- label="Filter Outfits"
- max_length_chars="300"
- name="Filter"
- search_button_visible="true"
- top_pad="10"
- width="307" />
+ <layout_stack
+ animate="false"
+ border_size="0"
+ follows="left|top|right"
+ height="27"
+ layout="topleft"
+ orientation="horizontal"
+ top_pad="6"
+ left="0"
+ name="top_menu_panel"
+ width="320">
+ <layout_panel
+ auto_resize="true"
+ layout="topleft"
+ name="filter_panel"
+ width="193">
+ <filter_editor
+ text_pad_left="10"
+ follows="left|top|right"
+ font="SansSerifSmall"
+ height="23"
+ layout="topleft"
+ left="10"
+ label="Filter Outfits"
+ max_length_chars="300"
+ name="Filter"
+ search_button_visible="true"
+ tab_group="1"
+ top="3"
+ width="181" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ height="25"
+ layout="topleft"
+ name="options_gear_btn_panel"
+ width="32">
+ <menu_button
+ follows="bottom|left"
+ tool_tip="Show additional options"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="OptionsMenu_Off"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ menu_position="bottomleft"
+ layout="topleft"
+ left="0"
+ name="options_gear_btn"
+ top="0"
+ width="31" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ height="25"
+ layout="topleft"
+ name="options_sort_btn_panel"
+ width="32">
+ <menu_button
+ follows="bottom|left"
+ tool_tip="Show sorting options"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="Conv_toolbar_sort"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ menu_position="bottomleft"
+ layout="topleft"
+ left="0"
+ name="sorting_menu_btn"
+ top="0"
+ width="31" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ height="25"
+ layout="topleft"
+ name="trash_btn_panel"
+ width="31">
+ <dnd_button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Right_Over"
+ image_overlay="TrashItem_Off"
+ image_selected="Toolbar_Right_Selected"
+ image_unselected="Toolbar_Right_Off"
+ left="0"
+ layout="topleft"
+ name="trash_btn"
+ tool_tip="Delete selected outfit"
+ top="0"
+ width="31"/>
+ </layout_panel>
+ </layout_stack>
<panel
class="panel_outfits_inventory"
filename="panel_outfits_inventory.xml"
@@ -129,7 +212,7 @@ width="333">
visible="false"
left="0"
tab_group="1"
- top_pad="6"
+ top_pad="4"
follows="all" />
<panel
class="panel_outfit_edit"