summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelwearing.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2010-10-22 17:39:03 -0700
committerMerov Linden <merov@lindenlab.com>2010-10-22 17:39:03 -0700
commita0714f01804a2a2220bd72c3adf06f097ad21b73 (patch)
treedb304a8eca349020b48ae927fd8a534264a6ed83 /indra/newview/llpanelwearing.cpp
parente3ecffc180ae50a0e8b726a061ec39cbe591326e (diff)
parentde6f7e19c44d267d3224c56941c2ab27677c406f (diff)
Merge with viewer-development
Diffstat (limited to 'indra/newview/llpanelwearing.cpp')
-rw-r--r--indra/newview/llpanelwearing.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 860470cd73..3b3d0cdce5 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -32,6 +32,7 @@
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
+#include "llmenubutton.h"
#include "llsidetray.h"
#include "llviewermenu.h"
#include "llwearableitemslist.h"
@@ -63,16 +64,7 @@ public:
llassert(mMenu);
}
- void show(LLView* spawning_view)
- {
- if (!mMenu) return;
-
- 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);
- }
+ LLMenuGL* getMenu() { return mMenu; }
private:
@@ -189,6 +181,10 @@ BOOL LLPanelWearing::postBuild()
mCOFItemsList = getChild<LLWearableItemsList>("cof_items_list");
mCOFItemsList->setRightMouseDownCallback(boost::bind(&LLPanelWearing::onWearableItemsListRightClick, this, _1, _2, _3));
+ LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn");
+
+ menu_gear_btn->setMenu(mGearMenu->getMenu());
+
return TRUE;
}
@@ -253,13 +249,6 @@ bool LLPanelWearing::isActionEnabled(const LLSD& userdata)
return false;
}
-// virtual
-void LLPanelWearing::showGearMenu(LLView* spawning_view)
-{
- if (!mGearMenu) return;
- mGearMenu->show(spawning_view);
-}
-
boost::signals2::connection LLPanelWearing::setSelectionChangeCallback(commit_callback_t cb)
{
if (!mCOFItemsList) return boost::signals2::connection();