diff options
author | Merov Linden <merov@lindenlab.com> | 2010-10-20 20:50:20 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2010-10-20 20:50:20 -0700 |
commit | f38d21fe60945d71f8740f6aba58b40d4a722d58 (patch) | |
tree | 5622ef17bb53f05027881914622463ac1426eb14 /indra/newview/llpanelmaininventory.cpp | |
parent | 9652de51ce5a64136b66c04461b12005568bd5f1 (diff) | |
parent | c12c60df4a28b3cb91870ae0666eb6b3422ff96b (diff) |
STORM-263 : merge to viewer-development
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 5b07e4863b..cc69dbd9d4 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -39,6 +39,7 @@ #include "llinventorypanel.h" #include "llfiltereditor.h" #include "llfloaterreg.h" +#include "llmenubutton.h" #include "lloutfitobserver.h" #include "llpreviewtexture.h" #include "llresmgr.h" @@ -192,6 +193,8 @@ BOOL LLPanelMainInventory::postBuild() mFilterEditor->setCommitCallback(boost::bind(&LLPanelMainInventory::onFilterEdit, this, _2)); } + mGearMenuButton = getChild<LLMenuButton>("options_gear_btn"); + initListCommandsHandlers(); // *TODO:Get the cost info from the server @@ -900,7 +903,6 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data) void LLPanelMainInventory::initListCommandsHandlers() { - childSetAction("options_gear_btn", boost::bind(&LLPanelMainInventory::onGearButtonClick, this)); childSetAction("trash_btn", boost::bind(&LLPanelMainInventory::onTrashButtonClick, this)); childSetAction("add_btn", boost::bind(&LLPanelMainInventory::onAddButtonClick, this)); @@ -914,6 +916,7 @@ void LLPanelMainInventory::initListCommandsHandlers() 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()); + mGearMenuButton->setMenu(mMenuGearDefault); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); // Update the trash button when selected item(s) get worn or taken off. @@ -927,11 +930,6 @@ void LLPanelMainInventory::updateListCommands() mTrashButton->setEnabled(trash_enabled); } -void LLPanelMainInventory::onGearButtonClick() -{ - showActionMenu(mMenuGearDefault,"options_gear_btn"); -} - void LLPanelMainInventory::onAddButtonClick() { setUploadCostIfNeeded(); |