From 54a503c06a00939c38dc72321cdbe4b78c80cf89 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 1 Dec 2008 00:45:11 -0700 Subject: Added 'Select Only Copyable' option in the Tools menu --- linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ linden/indra/newview/llselectmgr.cpp | 3 ++- linden/indra/newview/llviewermenu.cpp | 13 +++++++++++++ .../indra/newview/skins/default/xui/en-us/menu_viewer.xml | 6 ++++++ 4 files changed, 32 insertions(+), 1 deletion(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 1d2da46..953d588 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -6676,6 +6676,17 @@ Value 0 + SelectCopyableOnly + + Comment + Select only objects you can copy + Persist + 1 + Type + Boolean + Value + 0 + SelectOwnedOnly Comment diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index 2e4983c..90b1bd3 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp @@ -5745,7 +5745,8 @@ BOOL LLSelectMgr::canSelectObject(LLViewerObject* object) } if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) || - (gSavedSettings.getBOOL("SelectMovableOnly") && !object->permMove())) + (gSavedSettings.getBOOL("SelectMovableOnly") && !object->permMove()) || + (gSavedSettings.getBOOL("SelectCopyableOnly") && !object->permCopy())) { // only select my own objects return FALSE; diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 5e67712..c794b6a 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -6714,6 +6714,18 @@ class LLToolsSelectOnlyMovableObjects : public view_listener_t } }; +class LLToolsSelectOnlyCopyableObjects : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + BOOL cur_val = gSavedSettings.getBOOL("SelectCopyableOnly"); + + gSavedSettings.setBOOL("SelectCopyableOnly", ! cur_val ); + + return true; + } +}; + class LLToolsSelectBySurrounding : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -9829,6 +9841,7 @@ void initialize_menus() addMenu(new LLToolsSelectTool(), "Tools.SelectTool"); addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects"); addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects"); + addMenu(new LLToolsSelectOnlyCopyableObjects(), "Tools.SelectOnlyCopyableObjects"); addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding"); addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection"); addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius"); diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 71044a0..aeef31a 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -608,6 +608,12 @@ userdata="movable" /> + + + +