aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/Actions.cpp3
-rw-r--r--gui/Actions.h3
-rw-r--r--gui/Key.cpp3
-rw-r--r--gui/Key.h3
-rw-r--r--gui/KeysDialog.cpp3
-rw-r--r--gui/KeysDialog.h3
-rw-r--r--gui/ThemeEngine.cpp3
-rw-r--r--gui/ThemeEngine.h3
-rw-r--r--gui/ThemeEval.cpp3
-rw-r--r--gui/ThemeEval.h3
-rw-r--r--gui/ThemeLayout.cpp3
-rw-r--r--gui/ThemeLayout.h3
-rw-r--r--gui/ThemeParser.cpp3
-rw-r--r--gui/ThemeParser.h3
-rw-r--r--gui/Tooltip.cpp3
-rw-r--r--gui/Tooltip.h3
-rw-r--r--gui/about.cpp3
-rw-r--r--gui/about.h3
-rw-r--r--gui/browser.cpp3
-rw-r--r--gui/browser.h3
-rw-r--r--gui/browser_osx.mm2
-rw-r--r--gui/chooser.cpp3
-rw-r--r--gui/chooser.h3
-rw-r--r--gui/console.cpp3
-rw-r--r--gui/console.h3
-rw-r--r--gui/credits.h82
-rw-r--r--gui/debugger.cpp21
-rw-r--r--gui/debugger.h9
-rw-r--r--gui/dialog.cpp3
-rw-r--r--gui/dialog.h3
-rw-r--r--gui/error.cpp3
-rw-r--r--gui/error.h3
-rw-r--r--gui/gui-manager.cpp5
-rw-r--r--gui/gui-manager.h3
-rw-r--r--gui/launcher.cpp3
-rw-r--r--gui/launcher.h3
-rw-r--r--gui/massadd.cpp3
-rw-r--r--gui/massadd.h3
-rw-r--r--gui/message.cpp3
-rw-r--r--gui/message.h3
-rw-r--r--gui/object.cpp3
-rw-r--r--gui/object.h3
-rw-r--r--gui/options.cpp66
-rw-r--r--gui/options.h3
-rw-r--r--gui/saveload.cpp3
-rw-r--r--gui/saveload.h3
-rw-r--r--gui/themebrowser.cpp3
-rw-r--r--gui/themebrowser.h3
-rw-r--r--gui/themes/scummclassic/classic_gfx.stx3
-rw-r--r--gui/themes/scummclassic/classic_layout.stx3
-rw-r--r--gui/themes/scummclassic/classic_layout_lowres.stx3
-rw-r--r--gui/themes/scummmodern/scummmodern_gfx.stx3
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx3
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_lowres.stx3
-rw-r--r--gui/themes/translations.datbin201288 -> 205556 bytes
-rw-r--r--gui/widget.cpp3
-rw-r--r--gui/widget.h3
-rw-r--r--gui/widgets/editable.cpp102
-rw-r--r--gui/widgets/editable.h3
-rw-r--r--gui/widgets/edittext.cpp3
-rw-r--r--gui/widgets/edittext.h3
-rw-r--r--gui/widgets/list.cpp8
-rw-r--r--gui/widgets/list.h3
-rw-r--r--gui/widgets/popup.cpp3
-rw-r--r--gui/widgets/popup.h3
-rw-r--r--gui/widgets/scrollbar.cpp3
-rw-r--r--gui/widgets/scrollbar.h3
-rw-r--r--gui/widgets/tab.cpp3
-rw-r--r--gui/widgets/tab.h3
69 files changed, 181 insertions, 294 deletions
diff --git a/gui/Actions.cpp b/gui/Actions.cpp
index f44479a5a8..0c80844ff9 100644
--- a/gui/Actions.cpp
+++ b/gui/Actions.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gui/Actions.h"
diff --git a/gui/Actions.h b/gui/Actions.h
index 67faa03cba..039fb9019c 100644
--- a/gui/Actions.h
+++ b/gui/Actions.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GUI_ACTIONS_H
diff --git a/gui/Key.cpp b/gui/Key.cpp
index d3680509c0..fa29971e12 100644
--- a/gui/Key.cpp
+++ b/gui/Key.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gui/Key.h"
diff --git a/gui/Key.h b/gui/Key.h
index e64745115f..f8f8983c97 100644
--- a/gui/Key.h
+++ b/gui/Key.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GUI_KEY_H
diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp
index 897dd8c741..f28b039763 100644
--- a/gui/KeysDialog.cpp
+++ b/gui/KeysDialog.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gui/KeysDialog.h"
diff --git a/gui/KeysDialog.h b/gui/KeysDialog.h
index 4626e0245a..2dd6076a02 100644
--- a/gui/KeysDialog.h
+++ b/gui/KeysDialog.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef KEYSDIALOG_H
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 098cb8e0ac..678b5f0ea4 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/system.h"
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 08560c8635..cc446ac6b0 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GUI_THEME_ENGINE_H
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp
index 64e18f93a3..9d57d2408b 100644
--- a/gui/ThemeEval.cpp
+++ b/gui/ThemeEval.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gui/ThemeEval.h"
diff --git a/gui/ThemeEval.h b/gui/ThemeEval.h
index 65bed3e271..f76a613bc4 100644
--- a/gui/ThemeEval.h
+++ b/gui/ThemeEval.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GUI_THEME_EVAL_H
diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp
index fbfc498bcb..6a6fd9e343 100644
--- a/gui/ThemeLayout.cpp
+++ b/gui/ThemeLayout.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/util.h"
diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h
index 76d3f7d380..ba28fae1ac 100644
--- a/gui/ThemeLayout.h
+++ b/gui/ThemeLayout.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef THEME_LAYOUT_H
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 230dad8cc5..56ee6df5cc 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "gui/ThemeEngine.h"
diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h
index cab1050b47..39a951e007 100644
--- a/gui/ThemeParser.h
+++ b/gui/ThemeParser.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef THEME_PARSER_H
diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp
index a7cb0610e7..85e5856cff 100644
--- a/gui/Tooltip.cpp
+++ b/gui/Tooltip.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/util.h"
diff --git a/gui/Tooltip.h b/gui/Tooltip.h
index f5e2bb08a8..9ab536b349 100644
--- a/gui/Tooltip.h
+++ b/gui/Tooltip.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_TOOLTIP_H
diff --git a/gui/about.cpp b/gui/about.cpp
index 0389f4c8da..00dbc5fe0b 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "engines/metaengine.h"
diff --git a/gui/about.h b/gui/about.h
index b49365c5e5..65062ab79d 100644
--- a/gui/about.h
+++ b/gui/about.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef ABOUT_DIALOG_H
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 2c7459623f..2b4f254156 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "gui/browser.h"
diff --git a/gui/browser.h b/gui/browser.h
index eb3498e654..e5cc12ad8e 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef BROWSER_DIALOG_H
diff --git a/gui/browser_osx.mm b/gui/browser_osx.mm
index 37699c364c..017b31b9a8 100644
--- a/gui/browser_osx.mm
+++ b/gui/browser_osx.mm
@@ -18,8 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
*/
// Disable symbol overrides so that we can use system headers
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index ecc8ebd894..6ae08161df 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/translation.h"
diff --git a/gui/chooser.h b/gui/chooser.h
index 79a20383c5..d7e795b344 100644
--- a/gui/chooser.h
+++ b/gui/chooser.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef CHOOSER_DIALOG_H
diff --git a/gui/console.cpp b/gui/console.cpp
index cbab1b212e..b656d23a09 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "gui/console.h"
diff --git a/gui/console.h b/gui/console.h
index 7136043de9..442047ef78 100644
--- a/gui/console.h
+++ b/gui/console.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef CONSOLE_DIALOG_H
diff --git a/gui/credits.h b/gui/credits.h
index 7ad480032e..1b13b31829 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -24,6 +24,7 @@ static const char *credits[] = {
"C2""(retired)",
"C0""Max Horn",
"C0""Travis Howell",
+"C2""(retired)",
"C0""Pawel Kolodziejski",
"C2""Codecs, iMUSE, Smush, etc.",
"C0""Gregory Montoir",
@@ -36,6 +37,7 @@ static const char *credits[] = {
"C0""Jonathan Gray",
"C2""(retired)",
"C0""Travis Howell",
+"C2""(retired)",
"C0""Gregory Montoir",
"C0""Eugene Sandulenko",
"",
@@ -54,41 +56,13 @@ static const char *credits[] = {
"C0""Torbj\366rn Andersson",
"C0""Paul Gilbert",
"C0""Travis Howell",
-"C0""Oliver Kiehl",
-"C2""(retired)",
-"C0""Ludvig Strigeus",
-"C2""(retired)",
-"",
-"C1""BASS",
-"C0""Robert G\366ffringmann",
"C2""(retired)",
"C0""Oliver Kiehl",
"C2""(retired)",
-"C0""Joost Peters",
-"",
-"C1""Broken Sword",
-"C0""Fabio Battaglia",
-"C2""PSX version support",
-"C0""Thierry Crozat",
-"C2""Mac version support",
-"C0""Robert G\366ffringmann",
-"C2""(retired)",
-"",
-"C1""Broken Sword II",
-"C0""Torbj\366rn Andersson",
-"C0""Fabio Battaglia",
-"C2""PSX version support",
-"C0""Jonathan Gray",
+"C0""Ludvig Strigeus",
"C2""(retired)",
"",
-"C1""Broken Sword 2.5",
-"C0""Eugene Sandulenko",
-"C0""Filippos Karapetis",
-"C0""Max Horn",
-"C0""Paul Gilbert",
-"C0""Torbj\366rn Andersson",
-"",
-"C1""Cinematique evo 1",
+"C1""Cine",
"C0""Vincent Hamm",
"C2""(retired)",
"C0""Pawel Kolodziejski",
@@ -96,7 +70,7 @@ static const char *credits[] = {
"C0""Kari Salminen",
"C0""Eugene Sandulenko",
"",
-"C1""Cinematique evo 2",
+"C1""CruisE",
"C0""Paul Gilbert",
"C0""Vincent Hamm",
"C2""(retired)",
@@ -109,12 +83,6 @@ static const char *credits[] = {
"C0""Filippos Karapetis",
"C0""Pawel Kolodziejski",
"",
-"C1""FOTAQ",
-"C0""David Eriksson",
-"C2""(retired)",
-"C0""Gregory Montoir",
-"C0""Joost Peters",
-"",
"C1""Gob",
"C0""Torbj\366rn Andersson",
"C0""Arnaud Boutonn\351",
@@ -139,7 +107,7 @@ static const char *credits[] = {
"C0""Gregory Montoir",
"C0""Johannes Schickel",
"",
-"C1""Last Express",
+"C1""Lastexpress",
"C0""Matthew Hoops",
"C0""Jordi Vilalta Prat",
"C0""Julien Templier",
@@ -168,6 +136,12 @@ static const char *credits[] = {
"C1""Parallaction",
"C0""peres",
"",
+"C1""Queen",
+"C0""David Eriksson",
+"C2""(retired)",
+"C0""Gregory Montoir",
+"C0""Joost Peters",
+"",
"C1""SAGA",
"C0""Torbj\366rn Andersson",
"C0""Filippos Karapetis",
@@ -185,6 +159,35 @@ static const char *credits[] = {
"C0""Jordi Vilalta Prat",
"C0""Lars Skovlund",
"",
+"C1""Sky",
+"C0""Robert G\366ffringmann",
+"C2""(retired)",
+"C0""Oliver Kiehl",
+"C2""(retired)",
+"C0""Joost Peters",
+"",
+"C1""Sword1",
+"C0""Fabio Battaglia",
+"C2""PSX version support",
+"C0""Thierry Crozat",
+"C2""Mac version support",
+"C0""Robert G\366ffringmann",
+"C2""(retired)",
+"",
+"C1""Sword2",
+"C0""Torbj\366rn Andersson",
+"C0""Fabio Battaglia",
+"C2""PSX version support",
+"C0""Jonathan Gray",
+"C2""(retired)",
+"",
+"C1""Sword25",
+"C0""Eugene Sandulenko",
+"C0""Filippos Karapetis",
+"C0""Max Horn",
+"C0""Paul Gilbert",
+"C0""Torbj\366rn Andersson",
+"",
"C1""TeenAgent",
"C0""Robert Megone",
"C2""Help with callback rewriting",
@@ -246,7 +249,9 @@ static const char *credits[] = {
"C1""PocketPC / WinCE",
"C0""Nicolas Bacca",
"C2""(retired)",
+"C0""Ismail Khatib",
"C0""Kostas Nakos",
+"C2""(retired)",
"",
"C1""PlayStation 2",
"C0""Robert G\366ffringmann",
@@ -406,6 +411,7 @@ static const char *credits[] = {
"",
"C1""Win32",
"C0""Travis Howell",
+"C2""(retired)",
"",
"C1""Win64",
"C0""Chris Gray",
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 2282bc3a1c..2f49cb2bbe 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
// NB: This is really only necessary if USE_READLINE is defined
@@ -32,7 +29,7 @@
#include "engines/engine.h"
#include "gui/debugger.h"
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
#include "gui/console.h"
#elif defined(USE_READLINE)
#include <readline/readline.h>
@@ -47,7 +44,7 @@ Debugger::Debugger() {
_isActive = false;
_errStr = NULL;
_firstTime = true;
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
_debuggerDialog = new GUI::ConsoleDialog(1.0f, 0.67f);
_debuggerDialog->setInputCallback(debuggerInputCallback, this);
_debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this);
@@ -69,7 +66,7 @@ Debugger::Debugger() {
}
Debugger::~Debugger() {
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
delete _debuggerDialog;
#endif
}
@@ -81,7 +78,7 @@ int Debugger::DebugPrintf(const char *format, ...) {
va_start(argptr, format);
int count;
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
count = _debuggerDialog->vprintFormat(1, format, argptr);
#else
count = ::vprintf(format, argptr);
@@ -128,7 +125,7 @@ void Debugger::onFrame() {
}
}
-#if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE)
+#if defined(USE_TEXT_CONSOLE_FOR_DEBUGGER) && defined(USE_READLINE)
namespace {
Debugger *g_readline_debugger;
@@ -143,7 +140,7 @@ void Debugger::enter() {
// TODO: Having three I/O methods #ifdef-ed in this file is not the
// cleanest approach to this...
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
if (_firstTime) {
DebugPrintf("Debugger started, type 'exit' to return to the game.\n");
DebugPrintf("Type 'help' to see a little list of commands and variables.\n");
@@ -366,7 +363,7 @@ bool Debugger::tabComplete(const char *input, Common::String &completion) const
return true;
}
-#if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE)
+#if defined(USE_TEXT_CONSOLE_FOR_DEBUGGER) && defined(USE_READLINE)
char *Debugger::readlineComplete(const char *input, int state) {
static CommandsMap::const_iterator iter;
@@ -420,7 +417,7 @@ bool Debugger::Cmd_Exit(int argc, const char **argv) {
// Print a list of all registered commands (and variables, if any),
// nicely word-wrapped.
bool Debugger::Cmd_Help(int argc, const char **argv) {
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
const int charsPerLine = _debuggerDialog->getCharsPerLine();
#elif defined(USE_READLINE)
int charsPerLine, rows;
@@ -523,7 +520,7 @@ bool Debugger::Cmd_DebugFlagDisable(int argc, const char **argv) {
}
// Console handler
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
bool Debugger::debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon) {
Debugger *debugger = (Debugger *)refCon;
diff --git a/gui/debugger.h b/gui/debugger.h
index 95719b0e0d..6da569e0f8 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_DEBUGGER_H
@@ -32,7 +29,7 @@
namespace GUI {
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
class ConsoleDialog;
#endif
@@ -147,7 +144,7 @@ private:
*/
bool _firstTime;
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
GUI::ConsoleDialog *_debuggerDialog;
#endif
@@ -197,7 +194,7 @@ protected:
bool Cmd_DebugFlagEnable(int argc, const char **argv);
bool Cmd_DebugFlagDisable(int argc, const char **argv);
-#ifndef USE_TEXT_CONSOLE
+#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
private:
static bool debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon);
static bool debuggerCompletionCallback(GUI::ConsoleDialog *console, const char *input, Common::String &completion, void *refCon);
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 15e47141c8..2ec8641257 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/rect.h"
diff --git a/gui/dialog.h b/gui/dialog.h
index c298ef107b..a324450996 100644
--- a/gui/dialog.h
+++ b/gui/dialog.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_DIALOG_H
diff --git a/gui/error.cpp b/gui/error.cpp
index f6da795d40..75bdab1a2a 100644
--- a/gui/error.cpp
+++ b/gui/error.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#include "common/error.h"
diff --git a/gui/error.h b/gui/error.h
index f048a0cd09..f193136d74 100644
--- a/gui/error.h
+++ b/gui/error.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef GUI_ERROR_H
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 19ca66b7b1..f56a9097d5 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/events.h"
@@ -300,7 +297,7 @@ void GuiManager::runLoop() {
// dialog-related events since they were probably generated while the old dialog
// was still visible, and therefore not intended for the new one.
//
- // This hopefully fixes strange behaviour/crashes with pop-up widgets. (Most easily
+ // This hopefully fixes strange behavior/crashes with pop-up widgets. (Most easily
// triggered in 3x mode or when running ScummVM under Valgrind.)
if (activeDialog != getTopDialog() && event.type != Common::EVENT_SCREEN_CHANGED)
continue;
diff --git a/gui/gui-manager.h b/gui/gui-manager.h
index ac4118bb06..10f9e6a29f 100644
--- a/gui/gui-manager.h
+++ b/gui/gui-manager.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUIMANAGER_H
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index aed57decd3..792b5bbfbe 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "base/version.h"
diff --git a/gui/launcher.h b/gui/launcher.h
index 274fc45bb4..f27b4df202 100644
--- a/gui/launcher.h
+++ b/gui/launcher.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_LAUNCHER_DIALOG_H
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 80d580d2a0..7b641d71e5 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "engines/metaengine.h"
diff --git a/gui/massadd.h b/gui/massadd.h
index 6aad392b0d..15cef7ba68 100644
--- a/gui/massadd.h
+++ b/gui/massadd.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef MASSADD_DIALOG_H
diff --git a/gui/message.cpp b/gui/message.cpp
index 5cb4cec3d3..6c2f489a4c 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/str.h"
diff --git a/gui/message.h b/gui/message.h
index 5c3308e425..9da8417b5f 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef MESSAGE_DIALOG_H
diff --git a/gui/object.cpp b/gui/object.cpp
index 6564fe2b68..2ec42df9d7 100644
--- a/gui/object.cpp
+++ b/gui/object.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/textconsole.h"
diff --git a/gui/object.h b/gui/object.h
index 3b181fd8a3..34ff0d47f2 100644
--- a/gui/object.h
+++ b/gui/object.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_OBJECT_H
diff --git a/gui/options.cpp b/gui/options.cpp
index 547ab0f3c6..5cb70bc5e4 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "gui/browser.h"
@@ -308,8 +305,14 @@ void OptionsDialog::close() {
if (getResult()) {
// Graphic options
+ bool graphicsModeChanged = false;
if (_fullscreenCheckbox) {
if (_enableGraphicSettings) {
+ if (ConfMan.getBool("fullscreen", _domain) != _fullscreenCheckbox->getState())
+ graphicsModeChanged = true;
+ if (ConfMan.getBool("aspect_ratio", _domain) != _aspectCheckbox->getState())
+ graphicsModeChanged = true;
+
ConfMan.setBool("fullscreen", _fullscreenCheckbox->getState(), _domain);
ConfMan.setBool("aspect_ratio", _aspectCheckbox->getState(), _domain);
ConfMan.setBool("disable_dithering", _disableDitheringCheckbox->getState(), _domain);
@@ -321,6 +324,8 @@ void OptionsDialog::close() {
while (gm->name) {
if (gm->id == (int)_gfxPopUp->getSelectedTag()) {
+ if (ConfMan.get("gfx_mode", _domain) != gm->name)
+ graphicsModeChanged = true;
ConfMan.set("gfx_mode", gm->name, _domain);
isSet = true;
break;
@@ -341,6 +346,61 @@ void OptionsDialog::close() {
ConfMan.removeKey("render_mode", _domain);
}
}
+
+ // Setup graphics again if needed
+ if (_domain == Common::ConfigManager::kApplicationDomain && graphicsModeChanged) {
+ g_system->beginGFXTransaction();
+ g_system->setGraphicsMode(ConfMan.get("gfx_mode", _domain).c_str());
+
+ if (ConfMan.hasKey("aspect_ratio"))
+ g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio", _domain));
+ if (ConfMan.hasKey("fullscreen"))
+ g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen", _domain));
+ OSystem::TransactionError gfxError = g_system->endGFXTransaction();
+
+ // Since this might change the screen resolution we need to give
+ // the GUI a chance to update it's internal state. Otherwise we might
+ // get a crash when the GUI tries to grab the overlay.
+ //
+ // This fixes bug #3303501 "Switching from HQ2x->HQ3x crashes ScummVM"
+ //
+ // It is important that this is called *before* any of the current
+ // dialog's widgets are destroyed (for example before
+ // Dialog::close) is called, to prevent crashes caused by invalid
+ // widgets being referenced or similar errors.
+ g_gui.checkScreenChange();
+
+ if (gfxError != OSystem::kTransactionSuccess) {
+ // Revert ConfMan to what OSystem is using.
+ Common::String message = "Failed to apply some of the graphic options changes:";
+
+ if (gfxError & OSystem::kTransactionModeSwitchFailed) {
+ const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
+ while (gm->name) {
+ if (gm->id == g_system->getGraphicsMode()) {
+ ConfMan.set("gfx_mode", gm->name, _domain);
+ break;
+ }
+ gm++;
+ }
+ message += "\nthe video mode could not be changed.";
+ }
+
+ if (gfxError & OSystem::kTransactionAspectRatioFailed) {
+ ConfMan.setBool("aspect_ratio", g_system->getFeatureState(OSystem::kFeatureAspectRatioCorrection), _domain);
+ message += "\nthe fullscreen setting could not be changed";
+ }
+
+ if (gfxError & OSystem::kTransactionFullscreenFailed) {
+ ConfMan.setBool("fullscreen", g_system->getFeatureState(OSystem::kFeatureFullscreenMode), _domain);
+ message += "\nthe aspect ratio setting could not be changed";
+ }
+
+ // And display the error
+ GUI::MessageDialog dialog(message);
+ dialog.runModal();
+ }
+ }
// Volume options
if (_musicVolumeSlider) {
diff --git a/gui/options.h b/gui/options.h
index c097a3a9e9..f17669a3cc 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef OPTIONS_DIALOG_H
diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index 41b6018e3b..7c7394a71d 100644
--- a/gui/saveload.cpp
+++ b/gui/saveload.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/config-manager.h"
diff --git a/gui/saveload.h b/gui/saveload.h
index 06f1251e11..adaf311fd2 100644
--- a/gui/saveload.h
+++ b/gui/saveload.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_SAVELOAD_DIALOG_H
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index 0056a5d55b..831cee1996 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "gui/themebrowser.h"
diff --git a/gui/themebrowser.h b/gui/themebrowser.h
index bd6b11fb46..9da57622db 100644
--- a/gui/themebrowser.h
+++ b/gui/themebrowser.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_THEMEBROWSER_H
diff --git a/gui/themes/scummclassic/classic_gfx.stx b/gui/themes/scummclassic/classic_gfx.stx
index 3fd00abbb9..c0fcc9f083 100644
--- a/gui/themes/scummclassic/classic_gfx.stx
+++ b/gui/themes/scummclassic/classic_gfx.stx
@@ -19,9 +19,6 @@
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- - $URL$
- - $Id$
- -
-->
<render_info>
<palette>
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index f09c29e360..4b42b4f36d 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -19,9 +19,6 @@
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- - $URL$
- - $Id$
- -
-->
<layout_info resolution = 'y>399'>
<globals>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index a440be7694..4db6cc4bfc 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -19,9 +19,6 @@
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- - $URL$
- - $Id$
- -
-->
<layout_info resolution = 'y<400'>
<globals>
diff --git a/gui/themes/scummmodern/scummmodern_gfx.stx b/gui/themes/scummmodern/scummmodern_gfx.stx
index a325d4982b..80177054f4 100644
--- a/gui/themes/scummmodern/scummmodern_gfx.stx
+++ b/gui/themes/scummmodern/scummmodern_gfx.stx
@@ -19,9 +19,6 @@
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- - $URL$
- - $Id$
- -
-->
<render_info>
<palette>
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index c0433ceb9a..e77284e5ac 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -19,9 +19,6 @@
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- - $URL$
- - $Id$
- -
-->
<layout_info resolution = 'y>399'>
<globals>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 06916a80f1..e95fa2d584 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -19,9 +19,6 @@
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- - $URL$
- - $Id$
- -
-->
<layout_info resolution = 'y<400'>
<globals>
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index f025a05337..d696cc0d75 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ
diff --git a/gui/widget.cpp b/gui/widget.cpp
index d3c8d3402d..29838961df 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/scummsys.h"
diff --git a/gui/widget.h b/gui/widget.h
index 9acccd9684..70f2da4c98 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_WIDGET_H
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index 2ee3575bc6..4a0ee54828 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/rect.h"
@@ -96,6 +93,28 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
if (_caretVisible)
drawCaret(true);
+ // Remap numeric keypad if NUM lock is *not* active.
+ // This code relies on the fact that the various KEYCODE_KP* values are
+ // consecutive.
+ if (0 == (state.flags & Common::KBD_NUM)
+ && Common::KEYCODE_KP0 <= state.keycode
+ && state.keycode <= Common::KEYCODE_KP_PERIOD) {
+ const Common::KeyCode remap[11] = {
+ Common::KEYCODE_INSERT, // KEYCODE_KP0
+ Common::KEYCODE_END, // KEYCODE_KP1
+ Common::KEYCODE_DOWN, // KEYCODE_KP2
+ Common::KEYCODE_PAGEDOWN, // KEYCODE_KP3
+ Common::KEYCODE_LEFT, // KEYCODE_KP4
+ Common::KEYCODE_INVALID, // KEYCODE_KP5
+ Common::KEYCODE_RIGHT, // KEYCODE_KP6
+ Common::KEYCODE_HOME, // KEYCODE_KP7
+ Common::KEYCODE_UP, // KEYCODE_KP8
+ Common::KEYCODE_PAGEUP, // KEYCODE_KP9
+ Common::KEYCODE_DELETE, // KEYCODE_KP_PERIOD
+ };
+ state.keycode = remap[state.keycode - Common::KEYCODE_KP0];
+ }
+
switch (state.keycode) {
case Common::KEYCODE_RETURN:
case Common::KEYCODE_KP_ENTER:
@@ -120,27 +139,6 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
forcecaret = true;
break;
- // Keypad & special keys
- // - if num lock is set, we always go to the default case
- // - if num lock is not set, we either fall down to the special key case
- // or ignore the key press in case of 0 (INSERT), 2 (DOWN), 3 (PGDWN)
- // 5, 8 (UP) and 9 (PGUP)
-
- case Common::KEYCODE_KP0:
- case Common::KEYCODE_KP2:
- case Common::KEYCODE_KP3:
- case Common::KEYCODE_KP5:
- case Common::KEYCODE_KP8:
- case Common::KEYCODE_KP9:
- if (state.flags & Common::KBD_NUM)
- defaultKeyDownHandler(state, dirty, forcecaret, handled);
- break;
-
- case Common::KEYCODE_KP_PERIOD:
- if (state.flags & Common::KBD_NUM) {
- defaultKeyDownHandler(state, dirty, forcecaret, handled);
- break;
- }
case Common::KEYCODE_DELETE:
if (_caretPos < (int)_editString.size()) {
_editString.deleteChar(_caretPos);
@@ -151,22 +149,15 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
forcecaret = true;
break;
- case Common::KEYCODE_KP1:
- if (state.flags & Common::KBD_NUM) {
- defaultKeyDownHandler(state, dirty, forcecaret, handled);
- break;
- }
+ case Common::KEYCODE_DOWN:
case Common::KEYCODE_END:
+ // Move caret to end
dirty = setCaretPos(_editString.size());
forcecaret = true;
break;
- case Common::KEYCODE_KP4:
- if (state.flags & Common::KBD_NUM) {
- defaultKeyDownHandler(state, dirty, forcecaret, handled);
- break;
- }
case Common::KEYCODE_LEFT:
+ // Move caret one left (if possible)
if (_caretPos > 0) {
dirty = setCaretPos(_caretPos - 1);
}
@@ -174,12 +165,8 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
dirty = true;
break;
- case Common::KEYCODE_KP6:
- if (state.flags & Common::KBD_NUM) {
- defaultKeyDownHandler(state, dirty, forcecaret, handled);
- break;
- }
case Common::KEYCODE_RIGHT:
+ // Move caret one right (if possible)
if (_caretPos < (int)_editString.size()) {
dirty = setCaretPos(_caretPos + 1);
}
@@ -187,16 +174,43 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
dirty = true;
break;
- case Common::KEYCODE_KP7:
- if (state.flags & Common::KBD_NUM) {
- defaultKeyDownHandler(state, dirty, forcecaret, handled);
- break;
- }
+ case Common::KEYCODE_UP:
case Common::KEYCODE_HOME:
+ // Move caret to start
dirty = setCaretPos(0);
forcecaret = true;
break;
+#ifdef MACOSX
+ // Let ctrl-a / ctrl-e move the caret to the start / end of the line.
+ //
+ // These shortcuts go back a long time for command line programs. As
+ // for edit fields in GUIs, they are supported natively on Mac OS X,
+ // which is why I enabled these shortcuts there.
+ // On other systems (Windows, Gnome), Ctrl-A by default means
+ // "select all", which is why I didn't enable the shortcuts there
+ // for now, to avoid potential confusion.
+ //
+ // But since we don't support text selection, and since at least Gnome
+ // can be configured to also support ctrl-a and ctrl-e, we may want
+ // to extend this code to other targets, maybe even all. I'll leave
+ // this to other porters to decide, though.
+ case Common::KEYCODE_a:
+ case Common::KEYCODE_e:
+ if (state.flags & Common::KBD_CTRL) {
+ if (state.keycode == Common::KEYCODE_a) {
+ // Move caret to start
+ dirty = setCaretPos(0);
+ forcecaret = true;
+ } else if (state.keycode == Common::KEYCODE_e) {
+ // Move caret to end
+ dirty = setCaretPos(_editString.size());
+ forcecaret = true;
+ }
+ break;
+ }
+#endif
+
default:
defaultKeyDownHandler(state, dirty, forcecaret, handled);
}
diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h
index e0b6375919..4b51ac9145 100644
--- a/gui/widgets/editable.h
+++ b/gui/widgets/editable.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_WIDGETS_EDITABLE_H
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp
index 106262bafe..d4a4407ee0 100644
--- a/gui/widgets/edittext.cpp
+++ b/gui/widgets/edittext.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "gui/widgets/edittext.h"
diff --git a/gui/widgets/edittext.h b/gui/widgets/edittext.h
index b94e58780c..a34dc4b5dd 100644
--- a/gui/widgets/edittext.h
+++ b/gui/widgets/edittext.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_WIDGETS_EDITTEXT_H
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 1f7846c503..a0877fc68a 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/system.h"
@@ -41,7 +38,7 @@ ListWidget::ListWidget(Dialog *boss, const String &name, const char *tooltip, ui
_scrollBar = NULL;
_textWidth = NULL;
- // This ensures that _entriesPerPage is properly initialised.
+ // This ensures that _entriesPerPage is properly initialized.
reflowLayout();
_scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth + 1, 0, _scrollBarWidth, _h);
@@ -73,7 +70,7 @@ ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, const char *too
_scrollBar = NULL;
_textWidth = NULL;
- // This ensures that _entriesPerPage is properly initialised.
+ // This ensures that _entriesPerPage is properly initialized.
reflowLayout();
_scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth + 1, 0, _scrollBarWidth, _h);
@@ -590,6 +587,7 @@ void ListWidget::startEditMode() {
if (_editable && !_editMode && _selectedItem >= 0) {
_editMode = true;
setEditString(_list[_selectedItem]);
+ _caretPos = _editString.size(); // Force caret to the *end* of the selection.
if (_listColors.empty()) {
_editColor = ThemeEngine::kFontColorNormal;
} else {
diff --git a/gui/widgets/list.h b/gui/widgets/list.h
index 4bc9adc5ef..41fae37a71 100644
--- a/gui/widgets/list.h
+++ b/gui/widgets/list.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_WIDGETS_LIST_H
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index cab556065f..1a552e97c0 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/system.h"
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index b3b3e30837..34983adbeb 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_WIDGETS_POPUP_H
diff --git a/gui/widgets/scrollbar.cpp b/gui/widgets/scrollbar.cpp
index 38383c0e55..cc8e587668 100644
--- a/gui/widgets/scrollbar.cpp
+++ b/gui/widgets/scrollbar.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/rect.h"
diff --git a/gui/widgets/scrollbar.h b/gui/widgets/scrollbar.h
index 53a3369fb4..3b248ce8a4 100644
--- a/gui/widgets/scrollbar.h
+++ b/gui/widgets/scrollbar.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_WIDGETS_SCROLLBAR_H
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index 721fb88cf8..66f33907ca 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#include "common/util.h"
diff --git a/gui/widgets/tab.h b/gui/widgets/tab.h
index aec68cca0a..b19036979e 100644
--- a/gui/widgets/tab.h
+++ b/gui/widgets/tab.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
#ifndef GUI_WIDGETS_TAB_H