From b7cf5ff947161d0b7e42a9ed8fe10741bb7af100 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 27 Sep 2011 09:33:58 -0700 Subject: Commenting out unused variable to fix mac build. --- indra/llui/lltoolbarview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/lltoolbarview.cpp b/indra/llui/lltoolbarview.cpp index 6ae10fbf1d..9df6f4946f 100644 --- a/indra/llui/lltoolbarview.cpp +++ b/indra/llui/lltoolbarview.cpp @@ -86,7 +86,7 @@ void LLToolBarView::draw() static S32 old_width = 0; static S32 old_height = 0; - LLPanel* sizer_left = getChild("sizer_left"); + //LLPanel* sizer_left = getChild("sizer_left"); LLRect bottom_rect, left_rect, right_rect; -- cgit v1.2.3 From a686aeabffe619c9a467455982f1a39968fbd9e3 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 27 Sep 2011 12:40:47 -0700 Subject: * Modified toolbar context menus to bind to the specific instance of the toolbar --- indra/llui/lltoolbar.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 2fb9f249d4..9986eece2d 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -123,12 +123,16 @@ void LLToolBar::createContextMenu() { if (!mPopupMenuHandle.get()) { + // Setup bindings specific to this instance for the context menu options + LLUICtrl::CommitCallbackRegistry::Registrar& commit_reg = LLUICtrl::CommitCallbackRegistry::defaultRegistrar(); commit_reg.add("Toolbars.EnableSetting", boost::bind(&LLToolBar::onSettingEnable, this, _2)); LLUICtrl::EnableCallbackRegistry::Registrar& enable_reg = LLUICtrl::EnableCallbackRegistry::defaultRegistrar(); enable_reg.add("Toolbars.CheckSetting", boost::bind(&LLToolBar::isSettingChecked, this, _2)); + // Create the context menu + LLContextMenu* menu = LLUICtrlFactory::instance().createFromFile("menu_toolbars.xml", LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance()); if (menu) @@ -141,6 +145,10 @@ void LLToolBar::createContextMenu() { llwarns << "Unable to load toolbars context menu." << llendl; } + + // Remove this instance's bindings + commit_reg.remove("Toolbars.EnableSetting"); + enable_reg.remove("Toolbars.CheckSetting"); } } @@ -251,11 +259,13 @@ BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask) if (handle_it_here) { createContextMenu(); + LLContextMenu * menu = (LLContextMenu *) mPopupMenuHandle.get(); if (menu) { menu->show(x, y); + LLMenuGL::showPopup(this, menu, x, y); } } -- cgit v1.2.3