From 46596485982768844c9d373c2ddca3d678a24e2c Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 14 Oct 2010 12:34:28 +0300 Subject: STORM-381 FIXED Restored ability to join/create group from People tab > My Groups. Backing out changeset fe6c8e0a4a23 (which was made to fix STORM-263). We'll examine and fix the faulty changes. --- indra/newview/llpanelmaininventory.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 59d58321a9..27e054af34 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -192,8 +192,6 @@ BOOL LLPanelMainInventory::postBuild() mFilterEditor->setCommitCallback(boost::bind(&LLPanelMainInventory::onFilterEdit, this, _2)); } - mGearMenuButton = getChild("options_gear_btn"); - initListCommandsHandlers(); // *TODO:Get the cost info from the server @@ -902,14 +900,10 @@ 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)); - // LLMenuButton::handleMouseDownCallback calls signal LLUICtrl::mouse_signal_t, not LLButton::commit_signal_t. - // That's why to set signal LLUICtrl::mouse_signal_t we need to upcast to LLUICtrl. Using static_cast instead - // of getChild(...) for performance. - static_cast(mGearMenuButton)->setMouseDownCallback(boost::bind(&LLPanelMainInventory::onGearButtonClick, this)); - mTrashButton = getChild("trash_btn"); mTrashButton->setDragAndDropHandler(boost::bind(&LLPanelMainInventory::handleDragAndDropToTrash, this , _4 // BOOL drop @@ -920,7 +914,6 @@ 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("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mGearMenuButton->setMenu(mMenuGearDefault); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); // Update the trash button when selected item(s) get worn or taken off. @@ -936,9 +929,7 @@ void LLPanelMainInventory::updateListCommands() void LLPanelMainInventory::onGearButtonClick() { - mMenuGearDefault->buildDrawLabels(); - mMenuGearDefault->updateParent(LLMenuGL::sMenuContainer); - mGearMenuButton->setMenuPosition(LLMenuButton::ON_TOP_LEFT); + showActionMenu(mMenuGearDefault,"options_gear_btn"); } void LLPanelMainInventory::onAddButtonClick() -- cgit v1.2.3