From 32dccaf3d89b40b711d69088a3e390119c7efc7f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 17 Nov 2009 10:36:11 -0500 Subject: Sidepanel Appearance refactoring. Work in progress. 1. Changed sidepanel names to have "sidepanel" (e.g. panel_appearance -> sidepanel_appearance) 2. Changed some "Looks" names to "Outfits" 3. Changed LLPanelLooks to LLPanelOutfitsInventory (to match other inventory panel naming) 4. Took out tab from sidepanel_appearance. --HG-- branch : avatar-pipeline --- indra/newview/llpanelmaininventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index e3b2ab77aa..6c7d434eeb 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -49,7 +49,7 @@ #include "llviewermenu.h" #include "llviewertexturelist.h" -static LLRegisterPanelClassWrapper t_inventory("panel_main_inventory"); // Seraph is this redundant with constructor? +static LLRegisterPanelClassWrapper t_inventory("panel_main_inventory"); void on_file_loaded_for_save(BOOL success, LLViewerFetchedTexture *src_vi, -- cgit v1.2.3 From 53beee9e0837865163ff700df4b8d452135da9eb Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 17 Nov 2009 13:00:26 -0500 Subject: EXT-2569 : Separate out LLPanelOutfitsInventory so it's more modular versus being coupled with LLSidepanelAppearance EXT-2561 : Add standard bottom panel (gear menu, add button, trash icon) Added gear menu and standardized the code. (someday, will create a subclass to share the functionality across panels) Make LLPanelOutfitsInventory more modular, e.g. it no longer knows about the Wear/Edit buttons. --HG-- branch : avatar-pipeline --- indra/newview/llpanelmaininventory.cpp | 46 ++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 6c7d434eeb..9f723169e1 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -197,28 +197,6 @@ BOOL LLPanelMainInventory::postBuild() return TRUE; } -void LLPanelMainInventory::initListCommandsHandlers() -{ - mListCommands = getChild("bottom_panel"); - - mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelMainInventory::onGearButtonClick, this)); - mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelMainInventory::onTrashButtonClick, this)); - mListCommands->childSetAction("add_btn", boost::bind(&LLPanelMainInventory::onAddButtonClick, this)); - - LLDragAndDropButton* trash_btn = mListCommands->getChild("trash_btn"); - trash_btn->setDragAndDropHandler(boost::bind(&LLPanelMainInventory::handleDragAndDropToTrash, this - , _4 // BOOL drop - , _5 // EDragAndDropType cargo_type - , _7 // EAcceptance* accept - )); - - mCommitCallbackRegistrar.add("Inventory.GearDefault.Custom.Action", boost::bind(&LLPanelMainInventory::onCustomAction, this, _2)); - mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2)); - mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - -} - // Destroys the object LLPanelMainInventory::~LLPanelMainInventory( void ) { @@ -863,9 +841,30 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data) self->childSetValue("check_snapshot", FALSE); } +////////////////////////////////////////////////////////////////////////////////// +// List Commands // +void LLPanelMainInventory::initListCommandsHandlers() +{ + mListCommands = getChild("bottom_panel"); + mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelMainInventory::onGearButtonClick, this)); + mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelMainInventory::onTrashButtonClick, this)); + mListCommands->childSetAction("add_btn", boost::bind(&LLPanelMainInventory::onAddButtonClick, this)); + LLDragAndDropButton* trash_btn = mListCommands->getChild("trash_btn"); + trash_btn->setDragAndDropHandler(boost::bind(&LLPanelMainInventory::handleDragAndDropToTrash, this + , _4 // BOOL drop + , _5 // EDragAndDropType cargo_type + , _7 // EAcceptance* accept + )); + + mCommitCallbackRegistrar.add("Inventory.GearDefault.Custom.Action", boost::bind(&LLPanelMainInventory::onCustomAction, this, _2)); + mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2)); + mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + +} void LLPanelMainInventory::updateListCommands() { @@ -1018,3 +1017,6 @@ bool LLPanelMainInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType } return true; } + +// List Commands // +//////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3