diff options
author | Wolfpup Lowenhar <wolfpup67@earthlink.net> | 2010-10-21 10:59:11 -0400 |
---|---|---|
committer | Wolfpup Lowenhar <wolfpup67@earthlink.net> | 2010-10-21 10:59:11 -0400 |
commit | 19836c86e98b9f95d47e5dfe4a2ce599767a4523 (patch) | |
tree | d481049fddb0f3e24aa682171e7a2bf01dd36cbc /indra/newview/lloutfitslist.cpp | |
parent | 6691bf637e71f40d1bf12065c7caaf96bd9aaf50 (diff) | |
parent | 71f56a2bc9697989cd012adb57abdc922aa8ae0a (diff) |
Merge from Viewer-development
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
-rw-r--r-- | indra/newview/lloutfitslist.cpp | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index db9d386b6b..33c968bf00 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -38,6 +38,7 @@ #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "lllistcontextmenu.h" +#include "llmenubutton.h" #include "llnotificationsutil.h" #include "lloutfitobserver.h" #include "llsidetray.h" @@ -126,18 +127,6 @@ public: llassert(mMenu); } - void show(LLView* spawning_view) - { - if (!mMenu) return; - - updateItemsVisibility(); - mMenu->buildDrawLabels(); - mMenu->updateParent(LLMenuGL::sMenuContainer); - S32 menu_x = 0; - S32 menu_y = spawning_view->getRect().getHeight() + mMenu->getRect().getHeight(); - LLMenuGL::showPopup(spawning_view, mMenu, menu_x, menu_y); - } - void updateItemsVisibility() { if (!mMenu) return; @@ -148,6 +137,8 @@ public: mMenu->arrangeAndClear(); // update menu height } + LLMenuGL* getMenu() { return mMenu; } + private: const LLUUID& getSelectedOutfitID() { @@ -386,6 +377,11 @@ BOOL LLOutfitsList::postBuild() mAccordion = getChild<LLAccordionCtrl>("outfits_accordion"); mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR); + LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn"); + + menu_gear_btn->setMouseDownCallback(boost::bind(&LLOutfitListGearMenu::updateItemsVisibility, mGearMenu)); + menu_gear_btn->setMenu(mGearMenu->getMenu()); + return TRUE; } @@ -727,13 +723,6 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata) return false; } -// virtual -void LLOutfitsList::showGearMenu(LLView* spawning_view) -{ - if (!mGearMenu) return; - mGearMenu->show(spawning_view); -} - void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const { // Collect selected items from all selected lists. |