EXP-1226 FIXED (Create and register a floater for Appearance side tab)
- Added xml for a new floater Appearance and registred it in the floaterreg - Removed side tray dependencies - Added static helper method: LLFloaterSidePanelContainer::getPanelmaster
parent
0cd1988ef7
commit
3c8b0ab537
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() );
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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>);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
Loading…
Reference in New Issue