diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-17 13:00:26 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-17 13:00:26 -0500 |
commit | 53beee9e0837865163ff700df4b8d452135da9eb (patch) | |
tree | 091ad1000bacecec6f28639bf6e1227254ac7638 /indra/newview/llpanelmaininventory.cpp | |
parent | 32dccaf3d89b40b711d69088a3e390119c7efc7f (diff) |
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
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 46 |
1 files changed, 24 insertions, 22 deletions
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<LLPanel>("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<LLDragAndDropButton>("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<LLMenuGL>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("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<LLPanel>("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<LLDragAndDropButton>("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<LLMenuGL>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("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 //
+////////////////////////////////////////////////////////////////////////////////
|