diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-04-03 19:21:14 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-04-03 19:21:14 +0000 |
commit | b5936a4b1d8780b5b8cd425998eacd2c64ffa693 (patch) | |
tree | c1581bcf34e96a897c6e1d9a4aed95f353713baa /indra/llui/llmenugl.cpp | |
parent | 55c25229b79b1755c989e5996c8e8d118f369721 (diff) |
1.19.1 Viewer merge: QAR_367, QAR-374, QAR-408, QAR-426
QAR_367 (RC1) - merge Branch_1-19-1-Viewer -r 81609 : 81993 -> release
QAR-374 (RC2) - merge Branch_1-19-1-Viewer -r 81993 : 82589 -> release
QAR-408 (RC3) - merge Branch_1-19-1-Viewer -r 82589 : 83128 -> release
QAR-426 (rc4) - merge Branch_1-19-1-Viewer -r 83125 : 83719 -> release
(Actual merge: release@83793 Branch_1-19-1-Viewer-merge@83953 -> release)
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r-- | indra/llui/llmenugl.cpp | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index b52de24bb5..8ae44fbfd5 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -2965,8 +2965,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) class LLPieMenuBranch : public LLMenuItemGL { public: - LLPieMenuBranch(const LLString& name, const LLString& label, LLPieMenu* branch, - enabled_callback ecb, void* user_data); + LLPieMenuBranch(const LLString& name, const LLString& label, LLPieMenu* branch); // called to rebuild the draw label virtual void buildDrawLabel( void ); @@ -2978,19 +2977,13 @@ public: protected: LLPieMenu* mBranch; - enabled_callback mEnabledCallback; - void* mUserData; }; LLPieMenuBranch::LLPieMenuBranch(const LLString& name, const LLString& label, - LLPieMenu* branch, - enabled_callback ecb, - void* user_data) + LLPieMenu* branch) : LLMenuItemGL( name, label, KEY_NONE, MASK_NONE ), - mBranch( branch ), - mEnabledCallback( ecb ), - mUserData(user_data) + mBranch( branch ) { mBranch->hide(FALSE); mBranch->setParentMenuItem(this); @@ -2999,12 +2992,6 @@ LLPieMenuBranch::LLPieMenuBranch(const LLString& name, // called to rebuild the draw label void LLPieMenuBranch::buildDrawLabel( void ) { - if(mEnabledCallback) - { - setEnabled(mEnabledCallback(mUserData)); - setDrawTextDisabled(FALSE); - } - else { // default enablement is this -- if any of the subitems are // enabled, this item is enabled. JC @@ -3097,7 +3084,7 @@ void LLPieMenu::initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *fac child->getAttributeString("label", label); LLPieMenu *submenu = new LLPieMenu(name, label); - appendMenu(submenu); + appendPieMenu(submenu); submenu->initXML(child, context, factory); } else @@ -3479,17 +3466,14 @@ BOOL LLPieMenu::appendSeparator(const LLString &separator_name) } -// virtual -BOOL LLPieMenu::appendMenu(LLPieMenu *menu, - enabled_callback enabled_cb, - void* user_data) +BOOL LLPieMenu::appendPieMenu(LLPieMenu *menu) { if (menu == this) { llerrs << "Can't attach a pie menu to itself" << llendl; } LLPieMenuBranch *item; - item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu, enabled_cb, user_data); + item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu); getParent()->addChild(item->getBranch()); item->setFont( LLFontGL::sSansSerifSmall ); return append( item ); |