diff options
Diffstat (limited to 'indra/newview/lltool.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/lltool.cpp | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp index 669a62a238..4aad650b68 100644..100755 --- a/indra/newview/lltool.cpp +++ b/indra/newview/lltool.cpp @@ -2,31 +2,25 @@ * @file lltool.cpp * @brief LLTool class implementation * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -39,6 +33,7 @@ #include "llview.h" #include "llviewerwindow.h" +#include "llviewercontrol.h" #include "lltoolcomp.h" #include "lltoolfocus.h" #include "llfocusmgr.h" @@ -60,7 +55,7 @@ LLTool::~LLTool() { if( hasMouseCapture() ) { - llwarns << "Tool deleted holding mouse capture. Mouse capture removed." << llendl; + LL_WARNS() << "Tool deleted holding mouse capture. Mouse capture removed." << LL_ENDL; gFocusMgr.removeMouseCaptureWithoutCallback( this ); } } @@ -85,10 +80,10 @@ BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask) { if (gDebugClicks) { - llinfos << "LLTool left mouse down" << llendl; + LL_INFOS() << "LLTool left mouse down" << LL_ENDL; } // by default, didn't handle it - // llinfos << "LLTool::handleMouseDown" << llendl; + // LL_INFOS() << "LLTool::handleMouseDown" << LL_ENDL; gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN); return TRUE; } @@ -97,10 +92,10 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask) { if (gDebugClicks) { - llinfos << "LLTool left mouse up" << llendl; + LL_INFOS() << "LLTool left mouse up" << LL_ENDL; } // by default, didn't handle it - // llinfos << "LLTool::handleMouseUp" << llendl; + // LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL; gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP); return TRUE; } @@ -108,7 +103,7 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask) BOOL LLTool::handleHover(S32 x, S32 y, MASK mask) { gViewerWindow->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by a tool" << llendl; + LL_DEBUGS("UserInput") << "hover handled by a tool" << LL_ENDL; // by default, do nothing, say we handled it return TRUE; } @@ -116,13 +111,13 @@ BOOL LLTool::handleHover(S32 x, S32 y, MASK mask) BOOL LLTool::handleScrollWheel(S32 x, S32 y, S32 clicks) { // by default, didn't handle it - // llinfos << "LLTool::handleScrollWheel" << llendl; + // LL_INFOS() << "LLTool::handleScrollWheel" << LL_ENDL; return FALSE; } BOOL LLTool::handleDoubleClick(S32 x,S32 y,MASK mask) { - // llinfos << "LLTool::handleDoubleClick" << llendl; + // LL_INFOS() << "LLTool::handleDoubleClick" << LL_ENDL; // by default, pretend it's a left click return FALSE; } @@ -130,35 +125,35 @@ BOOL LLTool::handleDoubleClick(S32 x,S32 y,MASK mask) BOOL LLTool::handleRightMouseDown(S32 x,S32 y,MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleRightMouseDown" << llendl; + // LL_INFOS() << "LLTool::handleRightMouseDown" << LL_ENDL; return FALSE; } BOOL LLTool::handleRightMouseUp(S32 x, S32 y, MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleRightMouseDown" << llendl; + // LL_INFOS() << "LLTool::handleRightMouseDown" << LL_ENDL; return FALSE; } BOOL LLTool::handleMiddleMouseDown(S32 x,S32 y,MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleMiddleMouseDown" << llendl; + // LL_INFOS() << "LLTool::handleMiddleMouseDown" << LL_ENDL; return FALSE; } BOOL LLTool::handleMiddleMouseUp(S32 x, S32 y, MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleMiddleMouseUp" << llendl; + // LL_INFOS() << "LLTool::handleMiddleMouseUp" << LL_ENDL; return FALSE; } BOOL LLTool::handleToolTip(S32 x, S32 y, MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleToolTip" << llendl; + // LL_INFOS() << "LLTool::handleToolTip" << LL_ENDL; return FALSE; } @@ -196,9 +191,12 @@ LLTool* LLTool::getOverrideTool(MASK mask) { return NULL; } - if (mask & MASK_ALT) + if (gSavedSettings.getBOOL("EnableAltZoom")) { - return LLToolCamera::getInstance(); + if (mask & MASK_ALT) + { + return LLToolCamera::getInstance(); + } } return NULL; } |