WEBOS: Renamed "Touchpad Mode" to "Trackpad Mode" to prevent confusion because one of the target devices is called the "HP Touchpad".

This commit is contained in:
Klaus Reimer 2012-01-28 11:44:31 +01:00
parent 9ee0526541
commit 7ee77cbd26
2 changed files with 16 additions and 16 deletions

View File

@ -151,8 +151,8 @@ bool WebOSSdlEventSource::handleMouseButtonDown(SDL_Event &ev,
event.type = Common::EVENT_LBUTTONDOWN; event.type = Common::EVENT_LBUTTONDOWN;
processMouseEvent(event, _curX, _curY); processMouseEvent(event, _curX, _curY);
} }
// If we're not in touchpad mode, move the cursor to the tap // If we're not in trackpad mode, move the cursor to the tap
if (!_touchpadMode) { if (!_trackpadMode) {
_curX = MIN(_screenX, MAX(0, 0 + ev.motion.x)); _curX = MIN(_screenX, MAX(0, 0 + ev.motion.x));
_curY = MIN(_screenY, MAX(0, 0 + ev.motion.y)); _curY = MIN(_screenY, MAX(0, 0 + ev.motion.y));
// If we're already clicking, hold it until after the move. // If we're already clicking, hold it until after the move.
@ -254,7 +254,7 @@ bool WebOSSdlEventSource::handleMouseMotion(SDL_Event &ev,
// If only one finger is on the screen and moving, that's // If only one finger is on the screen and moving, that's
// the mouse pointer. // the mouse pointer.
if (!_fingerDown[1] && !_fingerDown[2]) { if (!_fingerDown[1] && !_fingerDown[2]) {
if (_touchpadMode) { if (_trackpadMode) {
_curX = MIN(_screenX, MAX(0, _curX + ev.motion.xrel)); _curX = MIN(_screenX, MAX(0, _curX + ev.motion.xrel));
_curY = MIN(_screenY, MAX(0, _curY + ev.motion.yrel)); _curY = MIN(_screenY, MAX(0, _curY + ev.motion.yrel));
} else { } else {
@ -301,16 +301,16 @@ bool WebOSSdlEventSource::handleMouseMotion(SDL_Event &ev,
_queuedEscapeUpTime = g_system->getMillis() + _queuedEscapeUpTime = g_system->getMillis() +
QUEUED_KEY_DELAY; QUEUED_KEY_DELAY;
} else if (_dragDiffX[0] > 0 && _dragDiffX[1] > 0) { } else if (_dragDiffX[0] > 0 && _dragDiffX[1] > 0) {
// A swipe right toggles touchpad mode // A swipe right toggles trackpad mode
_touchpadMode = !_touchpadMode; _trackpadMode = !_trackpadMode;
g_system->showMouse(_touchpadMode); g_system->showMouse(_trackpadMode);
// I18N: Touchpad mode toggle status. // I18N: Trackpad mode toggle status.
Common::String dialogMsg(_("Touchpad mode is now")); Common::String dialogMsg(_("Trackpad mode is now"));
dialogMsg += " "; dialogMsg += " ";
// I18N: Touchpad mode on or off. // I18N: Trackpad mode on or off.
dialogMsg += (_touchpadMode ? _("ON") : _("OFF")); dialogMsg += (_trackpadMode ? _("ON") : _("OFF"));
dialogMsg += ".\n"; dialogMsg += ".\n";
// I18N: Instructions to toggle Touchpad mode. // I18N: Instructions to toggle Trackpad mode.
dialogMsg += dialogMsg +=
_("Swipe two fingers to the right to toggle."); _("Swipe two fingers to the right to toggle.");
GUI::TimedMessageDialog dialog(dialogMsg, 1500); GUI::TimedMessageDialog dialog(dialogMsg, 1500);
@ -377,11 +377,11 @@ bool WebOSSdlEventSource::pollEvent(Common::Event &event) {
// Set the initial dimensions // Set the initial dimensions
calculateDimensions(); calculateDimensions();
// Having a mouse pointer on screen when not in Touchpad mode is poor // Having a mouse pointer on screen when not in Trackpad mode is poor
// interface design, because the user won't know whether to tap buttons // interface design, because the user won't know whether to tap buttons
// or drag the pointer to them. On the first poll, set the appropriate // or drag the pointer to them. On the first poll, set the appropriate
// pointer visibility. // pointer visibility.
g_system->showMouse(_touchpadMode); g_system->showMouse(_trackpadMode);
_firstPoll = false; _firstPoll = false;
} }

View File

@ -45,7 +45,7 @@ public:
_dragStartTime(0), _dragging(false), _dragStartTime(0), _dragging(false),
_curX(0), _curY(0), _curX(0), _curY(0),
_screenX(0), _screenY(0), _screenX(0), _screenY(0),
_touchpadMode(false), _autoDragMode(true), _trackpadMode(false), _autoDragMode(true),
_doClick(true), _doClick(true),
_queuedDragTime(0), _queuedEscapeUpTime(0), _queuedSpaceUpTime(0), _queuedDragTime(0), _queuedEscapeUpTime(0), _queuedSpaceUpTime(0),
_queuedRUpTime(0), _queuedRUpTime(0),
@ -80,8 +80,8 @@ protected:
// The drag distance for linear gestures // The drag distance for linear gestures
int _swipeDistX, _swipeDistY; int _swipeDistX, _swipeDistY;
// Indicates if we're in touchpad mode or tap-to-move mode. // Indicates if we're in trackpad mode or tap-to-move mode.
bool _touchpadMode; bool _trackpadMode;
// Indicates if we're in automatic drag mode. // Indicates if we're in automatic drag mode.
bool _autoDragMode; bool _autoDragMode;