diff options
author | Aimee Linden <aimee@lindenlab.com> | 2010-06-21 13:45:12 +0100 |
---|---|---|
committer | Aimee Linden <aimee@lindenlab.com> | 2010-06-21 13:45:12 +0100 |
commit | a069e0d3db0e0771e54768a702fa18e57415992e (patch) | |
tree | 0216de28c44dd31278fcd47c09b8cc54c2891c7b /indra/newview/llviewermenu.cpp | |
parent | c0129e4b11455a05a94300e1649cf3edaaf824aa (diff) | |
parent | b12c98e48ce44df907c7477e1c21061778459496 (diff) |
Merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 36650af6cb..635cc361f3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7693,6 +7693,31 @@ void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y) LLMenuGL::showPopup(ctrl, show_navbar_context_menu, x, y); } +void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y) +{ + static LLMenuGL* show_topbarinfo_context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_topinfobar.xml", + gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + + LLMenuItemGL* landmark_item = show_topbarinfo_context_menu->getChild<LLMenuItemGL>("Landmark"); + if (!LLLandmarkActions::landmarkAlreadyExists()) + { + landmark_item->setLabel(LLTrans::getString("AddLandmarkNavBarMenu")); + } + else + { + landmark_item->setLabel(LLTrans::getString("EditLandmarkNavBarMenu")); + } + + if(gMenuHolder->hasVisibleMenu()) + { + gMenuHolder->hideMenus(); + } + + show_topbarinfo_context_menu->buildDrawLabels(); + show_topbarinfo_context_menu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(ctrl, show_topbarinfo_context_menu, x, y); +} + void initialize_edit_menu() { view_listener_t::addMenu(new LLEditUndo(), "Edit.Undo"); |