summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-09-27 15:25:47 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-09-27 15:25:47 +0300
commitf71cce50f26c197c1b2ce510b7a646d22a2eab26 (patch)
tree16c8a7c83259c30301411ae5cd65dbe679066dec
parent4080969968c5bac301d754e58ff938df6cbdb5a5 (diff)
SL-6109 Small reorganisation
-rw-r--r--indra/newview/CMakeLists.txt4
-rw-r--r--indra/newview/llappviewer.cpp8
-rw-r--r--indra/newview/llkeyconflict.cpp20
-rw-r--r--indra/newview/llkeyconflict.h4
-rw-r--r--indra/newview/llviewerinput.cpp (renamed from indra/newview/llviewerkeyboard.cpp)51
-rw-r--r--indra/newview/llviewerinput.h (renamed from indra/newview/llviewerkeyboard.h)22
-rw-r--r--indra/newview/llviewerwindow.cpp30
-rw-r--r--indra/newview/llwindowlistener.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_controls.xml5
9 files changed, 73 insertions, 77 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index bfbe1a0cfd..9a72fcc228 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -653,7 +653,7 @@ set(viewer_SOURCE_FILES
llviewerjointattachment.cpp
llviewerjointmesh.cpp
llviewerjoystick.cpp
- llviewerkeyboard.cpp
+ llviewerinput.cpp
llviewerlayer.cpp
llviewermedia.cpp
llviewermedia_streamingaudio.cpp
@@ -1275,7 +1275,7 @@ set(viewer_HEADER_FILES
llviewerjointattachment.h
llviewerjointmesh.h
llviewerjoystick.h
- llviewerkeyboard.h
+ llviewerinput.h
llviewerlayer.h
llviewermedia.h
llviewermediafocus.h
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 97e770a106..1023a553f8 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -149,7 +149,7 @@
#include "llapr.h"
#include <boost/lexical_cast.hpp>
-#include "llviewerkeyboard.h"
+#include "llviewerinput.h"
#include "lllfsthread.h"
#include "llworkerthread.h"
#include "lltexturecache.h"
@@ -1006,11 +1006,11 @@ bool LLAppViewer::init()
// Load User's bindings
std::string key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "keys.xml");
- if (!gDirUtilp->fileExists(key_bindings_file) || !gViewerKeyboard.loadBindingsXML(key_bindings_file))
+ if (!gDirUtilp->fileExists(key_bindings_file) || !gViewerInput.loadBindingsXML(key_bindings_file))
{
// Failed to load custom bindings, try default ones
key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "keys.xml");
- if (!gViewerKeyboard.loadBindingsXML(key_bindings_file))
+ if (!gViewerInput.loadBindingsXML(key_bindings_file))
{
LL_ERRS("InitInfo") << "Unable to open default key bindings from" << key_bindings_file << LL_ENDL;
}
@@ -1446,7 +1446,7 @@ bool LLAppViewer::doFrame()
{
joystick->scanJoystick();
gKeyboard->scanKeyboard();
- gViewerKeyboard.scanMouse();
+ gViewerInput.scanMouse();
}
// Update state based on messages, user input, object idle.
diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp
index 66d420369e..e81d121e3b 100644
--- a/indra/newview/llkeyconflict.cpp
+++ b/indra/newview/llkeyconflict.cpp
@@ -37,7 +37,7 @@
#include "llinitparam.h"
#include "llkeyboard.h"
#include "llviewercontrol.h"
-#include "llviewerkeyboard.h"
+#include "llviewerinput.h"
#include "llxuiparser.h"
//#include "llstring.h"
@@ -117,7 +117,7 @@ static const std::string typetostring[LLKeyConflictHandler::CONTROL_NUM_INDICES]
"control_cntrl_select"
};
-// note, a solution is needed that will keep this up to date with llviewerkeyboard
+// note, a solution is needed that will keep this up to date with llviewerinput
typedef std::map<std::string, LLKeyConflictHandler::EControlTypes> control_enum_t;
static const control_enum_t command_to_key =
{
@@ -358,9 +358,9 @@ std::string LLKeyConflictHandler::getControlString(EControlTypes control_type, U
return getStringFromKeyData(mControlsMap[control_type].getKeyData(index));
}
-void LLKeyConflictHandler::loadFromSettings(const LLViewerKeyboard::KeyMode& keymode, control_map_t *destination)
+void LLKeyConflictHandler::loadFromSettings(const LLViewerInput::KeyMode& keymode, control_map_t *destination)
{
- for (LLInitParam::ParamIterator<LLViewerKeyboard::KeyBinding>::const_iterator it = keymode.bindings.begin(),
+ for (LLInitParam::ParamIterator<LLViewerInput::KeyBinding>::const_iterator it = keymode.bindings.begin(),
end_it = keymode.bindings.end();
it != end_it;
++it)
@@ -400,7 +400,7 @@ void LLKeyConflictHandler::loadFromSettings(const ESourceMode &load_mode, const
return;
}
- LLViewerKeyboard::Keys keys;
+ LLViewerInput::Keys keys;
LLSimpleXUIParser parser;
if (parser.readXUI(filename, keys)
@@ -556,7 +556,7 @@ void LLKeyConflictHandler::saveToSettings()
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""),
gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
- LLViewerKeyboard::Keys keys;
+ LLViewerInput::Keys keys;
LLSimpleXUIParser parser;
if (parser.readXUI(filename, keys)
@@ -566,8 +566,8 @@ void LLKeyConflictHandler::saveToSettings()
// todo: fix this
// workaround to avoid doing own param container
- LLViewerKeyboard::KeyMode mode;
- LLViewerKeyboard::KeyBinding binding;
+ LLViewerInput::KeyMode mode;
+ LLViewerInput::KeyBinding binding;
control_map_t::iterator iter = mControlsMap.begin();
control_map_t::iterator end = mControlsMap.end();
@@ -657,7 +657,7 @@ void LLKeyConflictHandler::saveToSettings()
// Now force a rebind for keyboard
if (gDirUtilp->fileExists(filename))
{
- gViewerKeyboard.loadBindingsXML(filename);
+ gViewerInput.loadBindingsXML(filename);
}
}
}
@@ -816,7 +816,7 @@ void LLKeyConflictHandler::resetKeyboardBindings()
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""),
gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
- gViewerKeyboard.loadBindingsXML(filename);
+ gViewerInput.loadBindingsXML(filename);
}
void LLKeyConflictHandler::generatePlaceholders(ESourceMode load_mode)
diff --git a/indra/newview/llkeyconflict.h b/indra/newview/llkeyconflict.h
index 00fbe18863..e4a6da30d0 100644
--- a/indra/newview/llkeyconflict.h
+++ b/indra/newview/llkeyconflict.h
@@ -28,7 +28,7 @@
#define LL_LLKEYCONFLICT_H
#include "llkeybind.h"
-#include "llviewerkeyboard.h"
+#include "llviewerinput.h"
class LLKeyConflict
@@ -195,7 +195,7 @@ private:
void registerTemporaryControl(EControlTypes control_type, EMouseClickType mouse_ind, KEY key, MASK mask, U32 conflict_mask);
typedef std::map<EControlTypes, LLKeyConflict> control_map_t;
- void loadFromSettings(const LLViewerKeyboard::KeyMode& keymode, control_map_t *destination);
+ void loadFromSettings(const LLViewerInput::KeyMode& keymode, control_map_t *destination);
void loadFromSettings(const ESourceMode &load_mode, const std::string &filename, control_map_t *destination);
void resetKeyboardBindings();
void generatePlaceholders(ESourceMode load_mode); //E.x. non-assignable values
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerinput.cpp
index 9755d3444a..11f430cda3 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -1,6 +1,6 @@
/**
- * @file llviewerkeyboard.cpp
- * @brief LLViewerKeyboard class implementation
+ * @file llviewerinput.cpp
+ * @brief LLViewerInput class implementation
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -26,7 +26,7 @@
#include "llviewerprecompiledheaders.h"
-#include "llviewerkeyboard.h"
+#include "llviewerinput.h"
#include "llappviewer.h"
#include "llfloaterreg.h"
@@ -65,7 +65,7 @@ struct LLKeyboardActionRegistry
LLSINGLETON_EMPTY_CTOR(LLKeyboardActionRegistry);
};
-LLViewerKeyboard gViewerKeyboard;
+LLViewerInput gViewerInput;
bool agent_jump( EKeystate s )
{
@@ -467,7 +467,6 @@ bool camera_move_forward_sitting( EKeystate s )
return true;
}
-
bool camera_move_backward_sitting( EKeystate s )
{
if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_BACKWARD ) return true;
@@ -800,7 +799,7 @@ REGISTER_KEYBOARD_ACTION("toggle_voice", toggle_voice);
REGISTER_KEYBOARD_ACTION("voice_follow_key", voice_follow_key);
#undef REGISTER_KEYBOARD_ACTION
-LLViewerKeyboard::LLViewerKeyboard()
+LLViewerInput::LLViewerInput()
{
resetBindings();
@@ -819,7 +818,7 @@ LLViewerKeyboard::LLViewerKeyboard()
}
}
-BOOL LLViewerKeyboard::modeFromString(const std::string& string, S32 *mode) const
+BOOL LLViewerInput::modeFromString(const std::string& string, S32 *mode) const
{
if (string == "FIRST_PERSON")
{
@@ -853,7 +852,7 @@ BOOL LLViewerKeyboard::modeFromString(const std::string& string, S32 *mode) cons
}
}
-BOOL LLViewerKeyboard::mouseFromString(const std::string& string, EMouseClickType *mode) const
+BOOL LLViewerInput::mouseFromString(const std::string& string, EMouseClickType *mode) const
{
if (string == "LMB")
{
@@ -887,10 +886,10 @@ BOOL LLViewerKeyboard::mouseFromString(const std::string& string, EMouseClickTyp
}
}
-BOOL LLViewerKeyboard::handleKey(KEY translated_key, MASK translated_mask, BOOL repeated)
+BOOL LLViewerInput::handleKey(KEY translated_key, MASK translated_mask, BOOL repeated)
{
// check for re-map
- EKeyboardMode mode = gViewerKeyboard.getMode();
+ EKeyboardMode mode = gViewerInput.getMode();
U32 keyidx = (translated_mask<<16) | translated_key;
key_remap_t::iterator iter = mRemapKeys[mode].find(keyidx);
if (iter != mRemapKeys[mode].end())
@@ -925,12 +924,12 @@ BOOL LLViewerKeyboard::handleKey(KEY translated_key, MASK translated_mask, BOOL
return mKeyHandledByUI[translated_key];
}
-BOOL LLViewerKeyboard::handleKeyUp(KEY translated_key, MASK translated_mask)
+BOOL LLViewerInput::handleKeyUp(KEY translated_key, MASK translated_mask)
{
return gViewerWindow->handleKeyUp(translated_key, translated_mask);
}
-BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, const bool ignore, const std::string& function_name)
+BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const bool ignore, const std::string& function_name)
{
S32 index;
typedef boost::function<bool(EKeystate)> function_t;
@@ -1021,7 +1020,7 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
return TRUE;
}
-BOOL LLViewerKeyboard::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const bool ignore, const std::string& function_name)
+BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const bool ignore, const std::string& function_name)
{
S32 index;
typedef boost::function<bool(EKeystate)> function_t;
@@ -1090,7 +1089,7 @@ BOOL LLViewerKeyboard::bindMouse(const S32 mode, const EMouseClickType mouse, co
return TRUE;
}
-LLViewerKeyboard::KeyBinding::KeyBinding()
+LLViewerInput::KeyBinding::KeyBinding()
: key("key"),
mouse("mouse"),
mask("mask"),
@@ -1098,11 +1097,11 @@ LLViewerKeyboard::KeyBinding::KeyBinding()
ignore("ignore", false)
{}
-LLViewerKeyboard::KeyMode::KeyMode()
+LLViewerInput::KeyMode::KeyMode()
: bindings("binding")
{}
-LLViewerKeyboard::Keys::Keys()
+LLViewerInput::Keys::Keys()
: first_person("first_person"),
third_person("third_person"),
edit("edit"),
@@ -1110,7 +1109,7 @@ LLViewerKeyboard::Keys::Keys()
edit_avatar("edit_avatar")
{}
-void LLViewerKeyboard::resetBindings()
+void LLViewerInput::resetBindings()
{
for (S32 i = 0; i < MODE_COUNT; i++)
{
@@ -1121,7 +1120,7 @@ void LLViewerKeyboard::resetBindings()
}
}
-S32 LLViewerKeyboard::loadBindingsXML(const std::string& filename)
+S32 LLViewerInput::loadBindingsXML(const std::string& filename)
{
resetBindings();
@@ -1141,7 +1140,7 @@ S32 LLViewerKeyboard::loadBindingsXML(const std::string& filename)
return binding_count;
}
-S32 LLViewerKeyboard::loadBindingMode(const LLViewerKeyboard::KeyMode& keymode, S32 mode)
+S32 LLViewerInput::loadBindingMode(const LLViewerInput::KeyMode& keymode, S32 mode)
{
S32 binding_count = 0;
for (LLInitParam::ParamIterator<KeyBinding>::const_iterator it = keymode.bindings.begin(),
@@ -1194,7 +1193,7 @@ S32 LLViewerKeyboard::loadBindingMode(const LLViewerKeyboard::KeyMode& keymode,
return binding_count;
}
-EKeyboardMode LLViewerKeyboard::getMode() const
+EKeyboardMode LLViewerInput::getMode() const
{
if ( gAgentCamera.cameraMouselook() )
{
@@ -1214,7 +1213,7 @@ EKeyboardMode LLViewerKeyboard::getMode() const
}
}
-bool LLViewerKeyboard::scanKey(const LLKeyboardBinding* binding,
+bool LLViewerInput::scanKey(const LLKeyboardBinding* binding,
S32 binding_count,
KEY key,
MASK mask,
@@ -1256,7 +1255,7 @@ bool LLViewerKeyboard::scanKey(const LLKeyboardBinding* binding,
}
// Called from scanKeyboard.
-bool LLViewerKeyboard::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level) const
+bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level) const
{
if (LLApp::isExiting())
{
@@ -1296,7 +1295,7 @@ bool LLViewerKeyboard::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_lev
return res;
}
-BOOL LLViewerKeyboard::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down)
+BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down)
{
BOOL handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down);
@@ -1368,7 +1367,7 @@ BOOL LLViewerKeyboard::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK ma
return handled;
}
-bool LLViewerKeyboard::scanMouse(const LLMouseBinding *binding, S32 binding_count, EMouseClickType mouse, MASK mask, EMouseState state) const
+bool LLViewerInput::scanMouse(const LLMouseBinding *binding, S32 binding_count, EMouseClickType mouse, MASK mask, EMouseState state) const
{
for (S32 i = 0; i < binding_count; i++)
{
@@ -1404,7 +1403,7 @@ bool LLViewerKeyboard::scanMouse(const LLMouseBinding *binding, S32 binding_coun
}
// todo: this recods key, scanMouse() triggers functions with EKeystate
-bool LLViewerKeyboard::scanMouse(EMouseClickType click, EMouseState state) const
+bool LLViewerInput::scanMouse(EMouseClickType click, EMouseState state) const
{
bool res = false;
S32 mode = getMode();
@@ -1441,7 +1440,7 @@ bool LLViewerKeyboard::scanMouse(EMouseClickType click, EMouseState state) const
return res;
}
-void LLViewerKeyboard::scanMouse()
+void LLViewerInput::scanMouse()
{
for (S32 i = 0; i < CLICK_COUNT; i++)
{
diff --git a/indra/newview/llviewerkeyboard.h b/indra/newview/llviewerinput.h
index 02fa21d4f2..d18a61eaf0 100644
--- a/indra/newview/llviewerkeyboard.h
+++ b/indra/newview/llviewerinput.h
@@ -1,6 +1,6 @@
/**
- * @file llviewerkeyboard.h
- * @brief LLViewerKeyboard class header file
+ * @file llviewerinput.h
+ * @brief LLViewerInput class header file
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -24,8 +24,8 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLVIEWERKEYBOARD_H
-#define LL_LLVIEWERKEYBOARD_H
+#ifndef LL_LLVIEWERINPUT_H
+#define LL_LLVIEWERINPUT_H
#include "llkeyboard.h" // For EKeystate
#include "llinitparam.h"
@@ -78,7 +78,7 @@ class LLWindow;
void bind_keyboard_functions();
-class LLViewerKeyboard
+class LLViewerInput
{
public:
struct KeyBinding : public LLInitParam::Block<KeyBinding>
@@ -110,7 +110,7 @@ public:
Keys();
};
- LLViewerKeyboard();
+ LLViewerInput();
BOOL handleKey(KEY key, MASK mask, BOOL repeated);
BOOL handleKeyUp(KEY key, MASK mask);
@@ -127,8 +127,8 @@ public:
BOOL key_level) const;
// handleMouse() records state, scanMouse() goes through states, scanMouse(click) processes individual saved states after UI is done with them
- BOOL handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down);
- void LLViewerKeyboard::scanMouse();
+ BOOL handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down);
+ void scanMouse();
private:
bool scanKey(const LLKeyboardBinding* binding,
@@ -155,7 +155,7 @@ private:
MASK mask,
EMouseState state) const;
- S32 loadBindingMode(const LLViewerKeyboard::KeyMode& keymode, S32 mode);
+ S32 loadBindingMode(const LLViewerInput::KeyMode& keymode, S32 mode);
BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const bool ignore, const std::string& function_name);
BOOL bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const bool ignore, const std::string& function_name);
void resetBindings();
@@ -188,6 +188,6 @@ private:
EMouseState mMouseLevel[CLICK_COUNT]; // records of key state
};
-extern LLViewerKeyboard gViewerKeyboard;
+extern LLViewerInput gViewerInput;
-#endif // LL_LLVIEWERKEYBOARD_H
+#endif // LL_LLVIEWERINPUT_H
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index caf7a8a65a..5388d13a04 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -45,7 +45,7 @@
#include "llmeshrepository.h"
#include "llnotificationhandler.h"
#include "llpanellogin.h"
-#include "llviewerkeyboard.h"
+#include "llviewerinput.h"
#include "llviewermenu.h"
#include "llviewquery.h"
@@ -173,7 +173,7 @@
#include "llviewergesture.h"
#include "llviewertexturelist.h"
#include "llviewerinventory.h"
-#include "llviewerkeyboard.h"
+#include "llviewerinput.h"
#include "llviewermedia.h"
#include "llviewermediafocus.h"
#include "llviewermenu.h"
@@ -1081,7 +1081,7 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask
}
BOOL down = TRUE;
//handleMouse() loops back to LLViewerWindow::handleAnyMouseClick
- return gViewerKeyboard.handleMouse(window, pos, mask, CLICK_LEFT, down);
+ return gViewerInput.handleMouse(window, pos, mask, CLICK_LEFT, down);
}
BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask)
@@ -1089,7 +1089,7 @@ BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK ma
// try handling as a double-click first, then a single-click if that
// wasn't handled.
BOOL down = TRUE;
- if (gViewerKeyboard.handleMouse(window, pos, mask, CLICK_DOUBLELEFT, down))
+ if (gViewerInput.handleMouse(window, pos, mask, CLICK_DOUBLELEFT, down))
{
return TRUE;
}
@@ -1103,24 +1103,24 @@ BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
mMouseDownTimer.stop();
}
BOOL down = FALSE;
- return gViewerKeyboard.handleMouse(window, pos, mask, CLICK_LEFT, down);
+ return gViewerInput.handleMouse(window, pos, mask, CLICK_LEFT, down);
}
BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
{
BOOL down = TRUE;
- return gViewerKeyboard.handleMouse(window, pos, mask, CLICK_RIGHT, down);
+ return gViewerInput.handleMouse(window, pos, mask, CLICK_RIGHT, down);
}
BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
{
BOOL down = FALSE;
- return gViewerKeyboard.handleMouse(window, pos, mask, CLICK_RIGHT, down);
+ return gViewerInput.handleMouse(window, pos, mask, CLICK_RIGHT, down);
}
BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
{
BOOL down = TRUE;
- gViewerKeyboard.handleMouse(window, pos, mask, CLICK_MIDDLE, down);
+ gViewerInput.handleMouse(window, pos, mask, CLICK_MIDDLE, down);
// Always handled as far as the OS is concerned.
return TRUE;
@@ -1275,7 +1275,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
{
BOOL down = FALSE;
- gViewerKeyboard.handleMouse(window, pos, mask, CLICK_MIDDLE, down);
+ gViewerInput.handleMouse(window, pos, mask, CLICK_MIDDLE, down);
// Always handled as far as the OS is concerned.
return TRUE;
@@ -1286,10 +1286,10 @@ BOOL LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask
switch (button)
{
case 4:
- gViewerKeyboard.handleMouse(window, pos, mask, CLICK_BUTTON4, down);
+ gViewerInput.handleMouse(window, pos, mask, CLICK_BUTTON4, down);
break;
case 5:
- gViewerKeyboard.handleMouse(window, pos, mask, CLICK_BUTTON5, down);
+ gViewerInput.handleMouse(window, pos, mask, CLICK_BUTTON5, down);
break;
default:
break;
@@ -1454,7 +1454,7 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
}
// remaps, handles ignored cases and returns back to viewer window.
- return gViewerKeyboard.handleKey(key, mask, repeated);
+ return gViewerInput.handleKey(key, mask, repeated);
}
BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask)
@@ -1466,13 +1466,13 @@ BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask)
tool_inspectp->keyUp(key, mask);
}
- return gViewerKeyboard.handleKeyUp(key, mask);
+ return gViewerInput.handleKeyUp(key, mask);
}
void LLViewerWindow::handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
{
LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true);
- gViewerKeyboard.scanKey(key, key_down, key_up, key_level);
+ gViewerInput.scanKey(key, key_down, key_up, key_level);
return; // Be clear this function returns nothing
}
@@ -2930,7 +2930,7 @@ BOOL LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask)
if (mask != MASK_ALT)
{
// remaps, handles ignored cases and returns back to viewer window.
- return gViewerKeyboard.handleKey(KEY_RETURN, mask, gKeyboard->getKeyRepeated(KEY_RETURN));
+ return gViewerInput.handleKey(KEY_RETURN, mask, gKeyboard->getKeyRepeated(KEY_RETURN));
}
}
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index 5367262bb6..2c6905f4b0 100644
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -37,7 +37,7 @@
#include "llview.h"
#include "llviewinject.h"
#include "llviewerwindow.h"
-#include "llviewerkeyboard.h"
+#include "llviewerinput.h"
#include "llrootview.h"
#include "llsdutil.h"
#include "stringize.h"
@@ -279,7 +279,7 @@ void LLWindowListener::keyDown(LLSD const & evt)
response.setResponse(target_view->getInfo());
gFocusMgr.setKeyboardFocus(target_view);
- gViewerKeyboard.handleKey(key, mask, false);
+ gViewerInput.handleKey(key, mask, false);
if(key < 0x80) mWindow->handleUnicodeChar(key, mask);
}
else
@@ -291,7 +291,7 @@ void LLWindowListener::keyDown(LLSD const & evt)
}
else
{
- gViewerKeyboard.handleKey(key, mask, false);
+ gViewerInput.handleKey(key, mask, false);
if(key < 0x80) mWindow->handleUnicodeChar(key, mask);
}
}
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_controls.xml b/indra/newview/skins/default/xui/en/panel_preferences_controls.xml
index ac4be34be2..62267dce8a 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_controls.xml
@@ -285,7 +285,7 @@
width="110"
label="Restore Default"
name="restore_defaults"/>
-
+
<scroll_list
draw_heading="true"
follows="all"
@@ -315,8 +315,5 @@
relative_width="0.22"
label="Control Method 3"
name="lst_ctrl3" />
- <scroll_list.commit_callback
- function="Pref.CommitControl" />
</scroll_list>
-
</panel>