From 63e8bb875b6aa3ae7789ee01497b848e9090e435 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 7 Mar 2012 19:41:49 -0800 Subject: Adding an enabled check for the linksets menu item based on whether the state is frozen. --- indra/newview/llviewermenu.cpp | 11 +++++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 2 ++ 2 files changed, 13 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 92a01c22b3..06f9d931f8 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -110,6 +110,7 @@ #include "lleconomy.h" #include "lltoolgrab.h" #include "llwindow.h" +#include "llpathfindingmanager.h" #include "boost/unordered_map.hpp" using namespace LLVOAvatarDefines; @@ -4752,6 +4753,14 @@ class LLToolsSaveToObjectInventory : public view_listener_t } }; +class LLToolsEnableLinksets : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return LLPathfindingManager::getInstance()->isAllowAlterPermanent(); + } +}; + // Round the position of all root objects to the grid class LLToolsSnapObjectXY : public view_listener_t { @@ -8144,6 +8153,8 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory"); view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); + view_listener_t::addMenu(new LLToolsEnableLinksets(), "Tools.EnableLinksets"); + // Help menu // most items use the ShowFloater method view_listener_t::addMenu(new LLToggleHowTo(), "Help.ToggleHowTo"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 1e4a3fc13c..fb1709f28d 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -963,6 +963,8 @@ +