summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llagentwearables.cpp3
-rw-r--r--indra/newview/llappearancemgr.cpp9
-rwxr-xr-xindra/newview/llavataractions.cpp3
-rw-r--r--indra/newview/llcofwearables.cpp5
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp18
-rw-r--r--indra/newview/llfloatersidepanelcontainer.h5
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/lloutfitslist.cpp3
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp8
-rw-r--r--indra/newview/llpanelwearing.cpp3
-rw-r--r--indra/newview/llsidepanelappearance.cpp3
-rw-r--r--indra/newview/llviewerfloaterreg.cpp1
-rw-r--r--indra/newview/llviewerinventory.cpp3
-rw-r--r--indra/newview/llviewermenu.cpp10
-rw-r--r--indra/newview/llwearable.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_appearance.xml20
16 files changed, 76 insertions, 27 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index b9125ec8d3..404cd8e5b6 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -33,6 +33,7 @@
#include "llagentwearablesfetch.h"
#include "llappearancemgr.h"
#include "llcallbacklist.h"
+#include "llfloatersidepanelcontainer.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
@@ -2015,7 +2016,7 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
}
const BOOL disable_camera_switch = LLWearableType::getDisableCameraSwitch(wearable->getType());
- LLPanel* panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance");
+ LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");
LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch);
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 3cb9b77010..c638f881a5 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -34,6 +34,7 @@
#include "llattachmentsmgr.h"
#include "llcommandhandler.h"
#include "lleventtimer.h"
+#include "llfloatersidepanelcontainer.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
@@ -116,7 +117,7 @@ public:
return true;
}
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD());
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD());
return true;
}
};
@@ -1505,7 +1506,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
void LLAppearanceMgr::updatePanelOutfitName(const std::string& name)
{
LLSidepanelAppearance* panel_appearance =
- dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ dynamic_cast<LLSidepanelAppearance *>(LLFloaterSidePanelContainer::getPanel("appearance"));
if (panel_appearance)
{
panel_appearance->refreshCurrentOutfitName(name);
@@ -1943,7 +1944,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
if (gAgentCamera.cameraCustomizeAvatar())
{
// switching to outfit editor should automagically save any currently edited wearable
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append);
@@ -2468,7 +2469,7 @@ public:
LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key);
}
LLOutfitsList *outfits_list =
- dynamic_cast<LLOutfitsList*>(LLSideTray::getInstance()->getPanel("outfitslist_tab"));
+ dynamic_cast<LLOutfitsList*>(LLFloaterSidePanelContainer::getPanel("appearance", "outfitslist_tab"));
if (outfits_list)
{
outfits_list->setSelectedOutfitByUUID(mFolderID);
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 4cdfcea64e..db5bbf7167 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -47,6 +47,7 @@
#include "llfloatergroups.h"
#include "llfloaterreg.h"
#include "llfloaterpay.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterwebcontent.h"
#include "llfloaterworldmap.h"
#include "llfolderview.h"
@@ -462,7 +463,7 @@ namespace action_give_inventory
*/
static LLInventoryPanel* get_outfit_editor_inventory_panel()
{
- LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit"));
+ LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
if (NULL == panel_outfit_edit) return NULL;
LLInventoryPanel* inventory_panel = panel_outfit_edit->findChild<LLInventoryPanel>("folder_view");
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 254c0adef1..80e0cca780 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -33,6 +33,7 @@
#include "llagentdata.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventory.h"
#include "llinventoryfunctions.h"
#include "lllistcontextmenu.h"
@@ -165,7 +166,7 @@ protected:
// absent instance. Explicit relations between components avoids situations
// when we tries to construct instance with unsatisfied implicit input conditions.
LLPanelOutfitEdit * panel_outfit_edit =
- dynamic_cast<LLPanelOutfitEdit*> (LLSideTray::getInstance()->getPanel(
+ dynamic_cast<LLPanelOutfitEdit*> (LLFloaterSidePanelContainer::getPanel("appearance",
"panel_outfit_edit"));
if (panel_outfit_edit != NULL)
{
@@ -237,7 +238,7 @@ protected:
// *HACK* need to pass pointer to LLPanelOutfitEdit instead of LLSideTray::getInstance()->getPanel().
// LLSideTray::getInstance()->getPanel() is rather slow variant
- LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit"));
+ LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceMenuItemClicked, panel_oe, selected_id));
registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id));
registrar.add("BodyPart.Create", boost::bind(&CofBodyPartContextMenu::createNew, this, selected_id));
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index cff46e80eb..ab874e4b9f 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -33,6 +33,9 @@
#include "llsidetraypanelcontainer.h"
#include "lltransientfloatermgr.h"
+//static
+const std::string LLFloaterSidePanelContainer::sMainPanelName("main_panel");
+
LLFloaterSidePanelContainer::LLFloaterSidePanelContainer(const LLSD& key, const Params& params)
: LLFloater(key, params)
{
@@ -48,7 +51,7 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
{
- getChild<LLPanel>("main_panel")->onOpen(key);
+ getChild<LLPanel>(sMainPanelName)->onOpen(key);
}
LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
@@ -82,6 +85,17 @@ void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, con
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
if (floaterp)
{
- floaterp->openChildPanel("main_panel", panel_name);
+ floaterp->openChildPanel(sMainPanelName, panel_name);
}
}
+
+LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name, const std::string& panel_name)
+{
+ LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
+ if (floaterp)
+ {
+ return floaterp->findChild<LLPanel>(panel_name, true);
+ }
+
+ return NULL;
+}
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index 7b4e7643ae..5c05f26f45 100644
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -42,6 +42,9 @@
*/
class LLFloaterSidePanelContainer : public LLFloater
{
+private:
+ static const std::string sMainPanelName;
+
public:
LLFloaterSidePanelContainer(const LLSD& key, const Params& params = getDefaultParams());
~LLFloaterSidePanelContainer();
@@ -51,6 +54,8 @@ public:
LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
static void showPanel(const std::string& floater_name, const LLSD& panel_name);
+
+ static LLPanel* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName);
};
#endif // LL_LLFLOATERSIDEPANELCONTAINER_H
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 0b3d6d8030..b6041c7f31 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4781,7 +4781,7 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category )
if (gAgentCamera.cameraCustomizeAvatar())
{
// switching to outfit editor should automagically save any currently edited wearable
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() );
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 10887aa53a..c2739867b1 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -35,6 +35,7 @@
#include "llaccordionctrltab.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "lllistcontextmenu.h"
@@ -327,7 +328,7 @@ protected:
static void editOutfit()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
static void renameOutfit(const LLUUID& outfit_cat_id)
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index a90f864ae2..3ac0d6616b 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -31,6 +31,7 @@
#include "llnotificationsutil.h"
#include "lltabcontainer.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llagentwearables.h"
@@ -222,7 +223,7 @@ void LLPanelOutfitsInventory::onSave()
//static
LLPanelOutfitsInventory* LLPanelOutfitsInventory::findInstance()
{
- return dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
+ return dynamic_cast<LLPanelOutfitsInventory*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfits_inventory"));
}
//////////////////////////////////////////////////////////////////////////////////
@@ -319,8 +320,7 @@ void LLPanelOutfitsInventory::onWearablesLoading()
// static
LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP()
{
- static LLSidepanelAppearance* panel_appearance =
- dynamic_cast<LLSidepanelAppearance*>
- (LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ LLSidepanelAppearance* panel_appearance =
+ dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance"));
return panel_appearance;
}
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index f19b54c1d4..87e9bb7b28 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -31,6 +31,7 @@
#include "lltoggleablemenu.h"
#include "llappearancemgr.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
@@ -44,7 +45,7 @@
// Context menu and Gear menu helper.
static void edit_outfit()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
//////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 28ec11d1c7..a356013830 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -32,6 +32,7 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llinventorypanel.h"
#include "llfiltereditor.h"
@@ -456,7 +457,7 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name)
//static
void LLSidepanelAppearance::editWearable(LLWearable *wearable, LLView *data, BOOL disable_camera_switch)
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance");
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD());
LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data);
if (panel)
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index b28373c6d5..665e0a2bd6 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -161,6 +161,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterAboutUtil::registerFloater();
LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
+ LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index ad65a8846c..6b5b47d0db 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -34,6 +34,7 @@
#include "llagent.h"
#include "llagentcamera.h"
#include "llagentwearables.h"
+#include "llfloatersidepanelcontainer.h"
#include "llviewerfoldertype.h"
#include "llfolderview.h"
#include "llviewercontrol.h"
@@ -976,7 +977,7 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item)
if( gAgentCamera.cameraCustomizeAvatar() )
{
// If we're in appearance editing mode, the current tab may need to be refreshed
- LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance"));
if (panel)
{
panel->showDefaultSubpart();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 63d6e0ac30..1dd5b05818 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3758,7 +3758,7 @@ void handle_reset_view()
if (gAgentCamera.cameraCustomizeAvatar())
{
// switching to outfit selector should automagically save any currently edited wearable
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits"));
}
gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW);
@@ -5576,22 +5576,22 @@ void handle_viewer_disable_message_log(void*)
void handle_customize_avatar()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits"));
}
void handle_edit_outfit()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
void handle_edit_shape()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_shape"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_shape"));
}
void handle_edit_physics()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_physics"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_physics"));
}
void handle_report_abuse()
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index d1c0990f90..276e8f462d 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -30,6 +30,7 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "lldictionary.h"
+#include "llfloatersidepanelcontainer.h"
#include "lllocaltextureobject.h"
#include "llnotificationsutil.h"
#include "llviewertexturelist.h"
@@ -697,7 +698,7 @@ void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake
if(gAgentCamera.cameraCustomizeAvatar())
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
gAgentAvatarp->updateVisualParams();
@@ -967,7 +968,7 @@ void LLWearable::revertValues()
syncImages(mSavedTEMap, mTEMap);
- LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance"));
if( panel )
{
panel->updateScrollingPanelList();
@@ -1008,7 +1009,7 @@ void LLWearable::saveValues()
syncImages(mTEMap, mSavedTEMap);
- LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance"));
if( panel )
{
panel->updateScrollingPanelList();
diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
new file mode 100644
index 0000000000..8f97887b3f
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<floater
+ legacy_header_height="18"
+ can_resize="true"
+ height="588"
+ layout="topleft"
+ name="floater_my_appearance"
+ save_rect="true"
+ single_instance="true"
+ title="MY APPEARANCE"
+ width="333">
+ <panel
+ top="18"
+ class="sidepanel_appearance"
+ name="main_panel"
+ filename="sidepanel_appearance.xml"
+ label="Edit Appearance"
+ font="SansSerifBold"/>
+</floater>