From 771d2274dd0e4f875544a7f3c69d5d398ecfd155 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 7 Sep 2010 17:38:21 +0000 Subject: CREDITS: Thanked for Drascula and Hugo sources svn-id: r52622 --- gui/credits.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index bd4ecffc9b..ae311697d3 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -574,5 +574,9 @@ static const char *credits[] = { "C0""", "C0""John Young, Colin Smythe and especially Terry Pratchett himself for sharing the source code of Discworld I & II with us.", "C0""", +"C0""Emilio de Paz Aragon from Alcachofa Soft for sharing the source code of Drascula: The Vampire Strikes Back with us and his generousity with freewaring the game.", +"C0""", +"C0""David P. Gray from Gray Design Associate for sharing the source code of Hugo trilogy.", +"C0""", "", }; -- cgit v1.2.3 From 29afa3094d222f7ae4ab29e3d5db8aca4cf828ec Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 7 Sep 2010 17:45:36 +0000 Subject: CREDITS: Fix typo svn-id: r52624 --- gui/credits.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index ae311697d3..de77e02b47 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -574,9 +574,9 @@ static const char *credits[] = { "C0""", "C0""John Young, Colin Smythe and especially Terry Pratchett himself for sharing the source code of Discworld I & II with us.", "C0""", -"C0""Emilio de Paz Aragon from Alcachofa Soft for sharing the source code of Drascula: The Vampire Strikes Back with us and his generousity with freewaring the game.", +"C0""Emilio de Paz Aragon from Alcachofa Soft for sharing the source code of Drascula: The Vampire Strikes Back with us and his generosity with freewaring the game.", "C0""", -"C0""David P. Gray from Gray Design Associate for sharing the source code of Hugo trilogy.", +"C0""David P. Gray from Gray Design Associate for sharing the source code of the Hugo trilogy.", "C0""", "", }; -- cgit v1.2.3 From f3a9828d3683ed9ace360adb2b37459fbc28f98b Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Wed, 8 Sep 2010 17:41:31 +0000 Subject: WII: Fix typo, update translations. svn-id: r52640 --- gui/themes/translations.dat | Bin 75042 -> 73298 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index e00de3b9f3..3cd1abd344 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 873d794a6c7259b071a49d98f6b6ef031778b9f7 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Wed, 8 Sep 2010 22:58:41 +0000 Subject: I18N: Update the catalan translation. svn-id: r52646 --- gui/themes/translations.dat | Bin 73298 -> 74217 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 3cd1abd344..d0a3ac00ad 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From c81c7fd0bc95b1103c7cc0446898c86ac06f1db7 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 11 Sep 2010 16:18:55 +0000 Subject: i18n: Add lowres context in a few places Also update the Italian and French translations. svn-id: r52677 --- gui/launcher.cpp | 20 ++++++++++++++++---- gui/options.cpp | 25 ++++++++++++++++++++----- gui/themes/translations.dat | Bin 74217 -> 75315 bytes 3 files changed, 36 insertions(+), 9 deletions(-) (limited to 'gui') diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 7a9d610c3a..31c72b90fa 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -172,7 +172,10 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) tab->addTab(_("Game")); // GUI: Label & edit widget for the game ID - new StaticTextWidget(tab, "GameOptions_Game.Id", _("ID:"), _("Short game identifier used for referring to savegames and running the game from the command line")); + if (g_system->getOverlayWidth() > 320) + new StaticTextWidget(tab, "GameOptions_Game.Id", _("ID:"), _("Short game identifier used for referring to savegames and running the game from the command line")); + else + new StaticTextWidget(tab, "GameOptions_Game.Id", _c("ID:", "lowres"), _("Short game identifier used for referring to savegames and running the game from the command line")); _domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to savegames and running the game from the command line")); // GUI: Label & edit widget for the description @@ -276,17 +279,26 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // // 7) The Paths tab // - tab->addTab(_("Paths")); + if (g_system->getOverlayWidth() > 320) + tab->addTab(_("Paths")); + else + tab->addTab(_c("Paths", "lowres")); // These buttons have to be extra wide, or the text will be truncated // in the small version of the GUI. // GUI: Button + Label for the game path - new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _("Game Path:"), 0, kCmdGameBrowser); + if (g_system->getOverlayWidth() > 320) + new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _("Game Path:"), 0, kCmdGameBrowser); + else + new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _c("Game Path:", "context"), 0, kCmdGameBrowser); _gamePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.GamepathText", gamePath); // GUI: Button + Label for the additional path - new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _("Extra Path:"), _("Specifies path to additional data used the game"), kCmdExtraBrowser); + if (g_system->getOverlayWidth() > 320) + new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _("Extra Path:"), _("Specifies path to additional data used the game"), kCmdExtraBrowser); + else + new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _c("Extra Path:", "lowres"), _("Specifies path to additional data used the game"), kCmdExtraBrowser); _extraPathWidget = new StaticTextWidget(tab, "GameOptions_Paths.ExtrapathText", extraPath, _("Specifies path to additional data used the game")); // GUI: Button + Label for the save path diff --git a/gui/options.cpp b/gui/options.cpp index 7c7093fa95..a6357d9737 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -968,24 +968,39 @@ GlobalOptionsDialog::GlobalOptionsDialog() // // 5) The Paths tab // - tab->addTab(_("Paths")); + if (g_system->getOverlayWidth() > 320) + tab->addTab(_("Paths")); + else + tab->addTab(_c("Paths", "lowres")); #if !( defined(__DC__) || defined(__GP32__) ) // These two buttons have to be extra wide, or the text will be // truncated in the small version of the GUI. // Save game path - new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _("Save Path: "), _("Specifies where your savegames are put"), kChooseSaveDirCmd); + if (g_system->getOverlayWidth() > 320) + new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _("Save Path: "), _("Specifies where your savegames are put"), kChooseSaveDirCmd); + else + new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _c("Save Path: ", "lowres"), _("Specifies where your savegames are put"), kChooseSaveDirCmd); _savePath = new StaticTextWidget(tab, "GlobalOptions_Paths.SavePath", "/foo/bar", _("Specifies where your savegames are put")); - new ButtonWidget(tab, "GlobalOptions_Paths.ThemeButton", _("Theme Path:"), 0, kChooseThemeDirCmd); + if (g_system->getOverlayWidth() > 320) + new ButtonWidget(tab, "GlobalOptions_Paths.ThemeButton", _("Theme Path:"), 0, kChooseThemeDirCmd); + else + new ButtonWidget(tab, "GlobalOptions_Paths.ThemeButton", _c("Theme Path:", "lowres"), 0, kChooseThemeDirCmd); _themePath = new StaticTextWidget(tab, "GlobalOptions_Paths.ThemePath", _c("None", "path")); - new ButtonWidget(tab, "GlobalOptions_Paths.ExtraButton", _("Extra Path:"), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd); + if (g_system->getOverlayWidth() > 320) + new ButtonWidget(tab, "GlobalOptions_Paths.ExtraButton", _("Extra Path:"), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd); + else + new ButtonWidget(tab, "GlobalOptions_Paths.ExtraButton", _c("Extra Path:", "lowres"), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd); _extraPath = new StaticTextWidget(tab, "GlobalOptions_Paths.ExtraPath", _c("None", "path"), _("Specifies path to additional data used by all games or ScummVM")); #ifdef DYNAMIC_MODULES - new ButtonWidget(tab, "GlobalOptions_Paths.PluginsButton", _("Plugins Path:"), 0, kChoosePluginsDirCmd); + if (g_system->getOverlayWidth() > 320) + new ButtonWidget(tab, "GlobalOptions_Paths.PluginsButton", _("Plugins Path:"), 0, kChoosePluginsDirCmd); + else + new ButtonWidget(tab, "GlobalOptions_Paths.PluginsButton", _c("Plugins Path:", "lowres"), 0, kChoosePluginsDirCmd); _pluginsPath = new StaticTextWidget(tab, "GlobalOptions_Paths.PluginsPath", _c("None", "path")); #endif #endif diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index d0a3ac00ad..e291e074e3 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 5cbe8270dd5f036351ed34ec508fe6f3f5ba9746 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 11 Sep 2010 16:47:30 +0000 Subject: i18n: Update Italian and Spanish translations The change to the spanish translation fixes bug #3063423 svn-id: r52678 --- gui/themes/translations.dat | Bin 75315 -> 75438 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index e291e074e3..751d75f6bd 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 1f986e14af5dd6aab55c322e7edabeb98cb37f9e Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 12 Sep 2010 11:43:51 +0000 Subject: i18n: Add lowres context in a few places. I also changed the english text for the GUI Renderer items in 1x mode as the text was tool long and cut. svn-id: r52683 --- gui/ThemeEngine.cpp | 9 +++------ gui/ThemeEngine.h | 1 + gui/browser.cpp | 5 ++++- gui/options.cpp | 7 +++++-- gui/themes/translations.dat | Bin 75438 -> 75356 bytes 5 files changed, 13 insertions(+), 9 deletions(-) (limited to 'gui') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 9cc98d83ce..eb388272c8 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -331,15 +331,12 @@ ThemeEngine::~ThemeEngine() { * Rendering mode management *********************************************************/ const ThemeEngine::Renderer ThemeEngine::_rendererModes[] = { - { _s("Disabled GFX"), "none", kGfxDisabled }, - { _s("Standard Renderer (16bpp)"), "normal_16bpp", kGfxStandard16bit }, + { _s("Disabled GFX"), _sc("Disabled GFX", "lowres"), "none", kGfxDisabled }, + { _s("Standard Renderer (16bpp)"), _s("Standard (16bpp)"), "normal_16bpp", kGfxStandard16bit }, #ifndef DISABLE_FANCY_THEMES - { _s("Antialiased Renderer (16bpp)"), "aa_16bpp", kGfxAntialias16bit } + { _s("Antialiased Renderer (16bpp)"), _s("Antialiased (16bpp)"), "aa_16bpp", kGfxAntialias16bit } #endif }; - -DECLARE_TRANSLATION_ADDITIONAL_CONTEXT("Standard Renderer (16bpp)", "lowres") -DECLARE_TRANSLATION_ADDITIONAL_CONTEXT("Antialiased Renderer (16bpp)", "lowres") const uint ThemeEngine::_rendererModesSize = ARRAYSIZE(ThemeEngine::_rendererModes); diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index 73181b74a6..b2bb9439a7 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -238,6 +238,7 @@ public: struct Renderer { const char *name; + const char *shortname; const char *cfg; GraphicsMode mode; }; diff --git a/gui/browser.cpp b/gui/browser.cpp index 0d95e5397b..6a9d3d05b5 100644 --- a/gui/browser.cpp +++ b/gui/browser.cpp @@ -66,7 +66,10 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser) _backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain; // Buttons - new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd); + if (g_system->getOverlayWidth() > 320) + new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd); + else + new ButtonWidget(this, "Browser.Up", _c("Go up", "lowres"), _("Go to previous directory level"), kGoUpCmd); new ButtonWidget(this, "Browser.Cancel", _("Cancel"), 0, kCloseCmd); new ButtonWidget(this, "Browser.Choose", _("Choose"), 0, kChooseCmd); } diff --git a/gui/options.cpp b/gui/options.cpp index a6357d9737..970aa28155 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -663,7 +663,10 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &prefix) { // The MIDI mode popup & a label - _midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _("Preferred Device:") : _("Music Device:"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator")); + if (g_system->getOverlayWidth() > 320) + _midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _("Preferred Device:") : _("Music Device:"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator")); + else + _midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _c("Preferred Device:", "lowres") : _c("Music Device:", "lowres"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator")); _midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup", _("Specifies output sound device or sound card emulator")); // Populate it @@ -1025,7 +1028,7 @@ GlobalOptionsDialog::GlobalOptionsDialog() _rendererPopUp->appendEntry(_(GUI::ThemeEngine::_rendererModes[i].name), GUI::ThemeEngine::_rendererModes[i].mode); } else { for (uint i = 1; i < GUI::ThemeEngine::_rendererModesSize; ++i) - _rendererPopUp->appendEntry(_c(GUI::ThemeEngine::_rendererModes[i].name, "lowres"), GUI::ThemeEngine::_rendererModes[i].mode); + _rendererPopUp->appendEntry(_(GUI::ThemeEngine::_rendererModes[i].shortname), GUI::ThemeEngine::_rendererModes[i].mode); } if (g_system->getOverlayWidth() > 320) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 751d75f6bd..77bad8f2a6 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 5b6ca46adedf5af0fbfb60600b932f7a35890e32 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 12 Sep 2010 19:18:30 +0000 Subject: i18n: Update German translation svn-id: r52690 --- gui/themes/translations.dat | Bin 75356 -> 75434 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 77bad8f2a6..dd4986487d 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From c073369f0a563baf69f64b21175c481ba671c6b3 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 12 Sep 2010 21:56:37 +0000 Subject: i18n: Translate Save and Restore buttons in SCI engine svn-id: r52694 --- gui/themes/translations.dat | Bin 75434 -> 75496 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index dd4986487d..ba1ecf22b8 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From bfbb69f77e2ca2656a7beab2cdc58368d88c92a6 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 13 Sep 2010 12:50:26 +0000 Subject: I18N: Unified messages by removing whitespaces. svn-id: r52700 --- gui/options.cpp | 4 ++-- gui/themes/translations.dat | Bin 75496 -> 75306 bytes 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/options.cpp b/gui/options.cpp index 970aa28155..f609413642 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -982,9 +982,9 @@ GlobalOptionsDialog::GlobalOptionsDialog() // Save game path if (g_system->getOverlayWidth() > 320) - new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _("Save Path: "), _("Specifies where your savegames are put"), kChooseSaveDirCmd); + new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _("Save Path:"), _("Specifies where your savegames are put"), kChooseSaveDirCmd); else - new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _c("Save Path: ", "lowres"), _("Specifies where your savegames are put"), kChooseSaveDirCmd); + new ButtonWidget(tab, "GlobalOptions_Paths.SaveButton", _c("Save Path:", "lowres"), _("Specifies where your savegames are put"), kChooseSaveDirCmd); _savePath = new StaticTextWidget(tab, "GlobalOptions_Paths.SavePath", "/foo/bar", _("Specifies where your savegames are put")); if (g_system->getOverlayWidth() > 320) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index ba1ecf22b8..39057498c5 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From c2fb737950bd27d8f86a66a08d3c17b7b734fc1c Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 13 Sep 2010 12:53:27 +0000 Subject: I18N: Update the catalan translation. svn-id: r52701 --- gui/themes/translations.dat | Bin 75306 -> 75281 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 39057498c5..02e9d2ddee 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 3ed22f9f302bcfee10879e7cc1c5cd575bd9be5b Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 13 Sep 2010 21:19:58 +0000 Subject: I18N: Update German translation svn-id: r52714 --- gui/themes/translations.dat | Bin 75281 -> 75365 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 02e9d2ddee..26794391f1 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From dd76a20acd16df90457eb7eb11006902f8e3290b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 14 Sep 2010 00:15:20 +0000 Subject: GUI: Fix caret undrawing. (Regression from r48551) Starting with r48551 the caret undrawing caused the text selection color in ListWidgets to be removed. It also added a slight offset to the character next to the undrawn caret. All this is fixed now. svn-id: r52716 --- gui/EditTextWidget.cpp | 2 +- gui/ListWidget.cpp | 12 ++++++------ gui/editable.cpp | 5 +++-- gui/editable.h | 2 ++ 4 files changed, 12 insertions(+), 9 deletions(-) (limited to 'gui') diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp index 7079453173..e5de1c6e7f 100644 --- a/gui/EditTextWidget.cpp +++ b/gui/EditTextWidget.cpp @@ -88,7 +88,7 @@ void EditTextWidget::drawWidget() { } Common::Rect EditTextWidget::getEditRect() const { - Common::Rect r(2 + _leftPadding, 1, _w - 2 - _leftPadding - _rightPadding, _h-1); + Common::Rect r(2 + _leftPadding, 2, _w - 2 - _leftPadding - _rightPadding, _h-1); return r; } diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 4447b62244..f5f41bba80 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -449,11 +449,15 @@ bool ListWidget::handleKeyUp(Common::KeyState state) { } void ListWidget::receivedFocusWidget() { + _inversion = ThemeEngine::kTextInversionFocus; + // Redraw the widget so the selection color will change draw(); } void ListWidget::lostFocusWidget() { + _inversion = ThemeEngine::kTextInversion; + // If we lose focus, we simply forget the user changes _editMode = false; g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false); @@ -491,12 +495,8 @@ void ListWidget::drawWidget() { ThemeEngine::TextInversionState inverted = ThemeEngine::kTextInversionNone; // Draw the selected item inverted, on a highlighted background. - if (_selectedItem == pos) { - if (_hasFocus) - inverted = ThemeEngine::kTextInversionFocus; - else - inverted = ThemeEngine::kTextInversion; - } + if (_selectedItem == pos) + inverted = _inversion; Common::Rect r(getEditRect()); int pad = _leftPadding; diff --git a/gui/editable.cpp b/gui/editable.cpp index 755e34e380..1ebe307bb0 100644 --- a/gui/editable.cpp +++ b/gui/editable.cpp @@ -48,6 +48,7 @@ void EditableWidget::init() { _editScrollOffset = 0; _font = ThemeEngine::kFontStyleBold; + _inversion = ThemeEngine::kTextInversionNone; } EditableWidget::~EditableWidget() { @@ -237,7 +238,7 @@ void EditableWidget::drawCaret(bool erase) { Common::Rect editRect = getEditRect(); int x = editRect.left; - int y = editRect.top + 1; + int y = editRect.top; x += getCaretOffset(); @@ -253,7 +254,7 @@ void EditableWidget::drawCaret(bool erase) { if ((uint)_caretPos < _editString.size()) { GUI::EditableWidget::String chr(_editString[_caretPos]); int chrWidth = g_gui.getCharWidth(_editString[_caretPos], _font); - g_gui.theme()->drawText(Common::Rect(x, y, x + chrWidth, y + editRect.height() - 2), chr, _state, Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, 0, false, _font); + g_gui.theme()->drawText(Common::Rect(x, y, x + chrWidth, y + editRect.height() - 2), chr, _state, Graphics::kTextAlignLeft, _inversion, 0, false, _font); } } diff --git a/gui/editable.h b/gui/editable.h index 8ff5298511..4a2d98349e 100644 --- a/gui/editable.h +++ b/gui/editable.h @@ -54,6 +54,8 @@ protected: ThemeEngine::FontStyle _font; + ThemeEngine::TextInversionState _inversion; + public: EditableWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0); EditableWidget(GuiObject *boss, const String &name, const char *tooltip = 0, uint32 cmd = 0); -- cgit v1.2.3 From 2a353089aa4863be3d0255fe1a8f65dbabb8c2c1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 14 Sep 2010 00:34:12 +0000 Subject: GUI: Remove dead code. This code was added when tooltip support was added. Since we changed the way how tooltips are drawn later on, this code is not required anymore. Actually it was never used, but it could've been used to save/restore the state of the GUI for the tooltips. svn-id: r52717 --- gui/ThemeEngine.cpp | 64 ----------------------------------------------------- gui/ThemeEngine.h | 11 --------- 2 files changed, 75 deletions(-) (limited to 'gui') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index eb388272c8..0d0fe8aecd 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1189,70 +1189,6 @@ void ThemeEngine::debugWidgetPosition(const char *name, const Common::Rect &r) { _screen.vLine(r.right, r.top, r.bottom, 0xFFFF); } -ThemeEngine::StoredState *ThemeEngine::storeState(const Common::Rect &r) { - StoredState *state = new StoredState; - byte *dst; - byte *src; - - state->r.top = r.top; - state->r.bottom = r.bottom; - state->r.left = r.left; - state->r.right = r.right; - - state->r.clip(_screen.w, _screen.h); - - state->screen.create(state->r.width(), state->r.height(), _screen.bytesPerPixel); - state->backBuffer.create(state->r.width(), state->r.height(), _backBuffer.bytesPerPixel); - - src = (byte *)_screen.getBasePtr(state->r.left, state->r.top); - dst = (byte *)state->screen.getBasePtr(0, 0); - - for (int i = state->r.height(); i > 0; i--) { - memcpy(dst, src, state->r.width() * _screen.bytesPerPixel); - src += _screen.pitch; - dst += state->screen.pitch; - } - - src = (byte *)_backBuffer.getBasePtr(state->r.left, state->r.top); - dst = (byte *)state->backBuffer.getBasePtr(0, 0); - - for (int i = state->r.height(); i > 0; i--) { - memcpy(dst, src, state->r.width() * _backBuffer.bytesPerPixel); - src += _backBuffer.pitch; - dst += state->backBuffer.pitch; - } - - return state; -} - -void ThemeEngine::restoreState(StoredState *state) { - byte *dst; - byte *src; - - if (!state) - return; - - src = (byte *)state->screen.getBasePtr(0, 0); - dst = (byte *)_screen.getBasePtr(state->r.left, state->r.top); - - for (int i = state->r.height(); i > 0; i--) { - memcpy(dst, src, state->r.width() * _screen.bytesPerPixel); - src += state->screen.pitch; - dst += _screen.pitch; - } - - src = (byte *)state->backBuffer.getBasePtr(0, 0); - dst = (byte *)_backBuffer.getBasePtr(state->r.left, state->r.top); - - for (int i = state->r.height(); i > 0; i--) { - memcpy(dst, src, state->r.width() * _backBuffer.bytesPerPixel); - src += state->backBuffer.pitch; - dst += _backBuffer.pitch; - } - - addDirtyRect(state->r); -} - /********************************************************** * Screen/overlay management *********************************************************/ diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index b2bb9439a7..3d2fca04eb 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -264,17 +264,6 @@ public: void enable(); void disable(); - struct StoredState { - Common::Rect r; - Graphics::Surface screen; - Graphics::Surface backBuffer; - - StoredState() {} - }; - - StoredState *storeState(const Common::Rect &r); - void restoreState(StoredState *state); - /** * Implementation of the GUI::Theme API. Called when a * new dialog is opened. Note that the boolean parameter -- cgit v1.2.3 From 8ab435397fd0ee3b24f43cb135489fe70509c578 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 14 Sep 2010 19:02:33 +0000 Subject: I18N: Update Spanish and Italian translations svn-id: r52725 --- gui/themes/translations.dat | Bin 75365 -> 75943 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 26794391f1..e974923fe7 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 057056b8d335ab3fee8644e066e9db0a06451a90 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 15 Sep 2010 23:25:46 +0000 Subject: I18N: Add translation for load/save success or failure messages Also improve and update the french translation. svn-id: r52740 --- gui/themes/translations.dat | Bin 75943 -> 76264 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index e974923fe7..78548c0678 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From e0794fef7514d85d8d60fd18154b226b5d79b485 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Thu, 16 Sep 2010 20:02:24 +0000 Subject: I18N: Update Spanish translation svn-id: r52753 --- gui/themes/translations.dat | Bin 76264 -> 76446 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 78548c0678..ccf253ba1f 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From c91a07229a8bd841e6b6e77d977254c388a2e407 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 18 Sep 2010 10:55:16 +0000 Subject: JANITORIAL: Removed most punctuation at end of warning() and error() Our warning() and error() functions always add an exclamation mark to the end of the message anyway. svn-id: r52791 --- gui/saveload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 92cea00f30..3a86c5092e 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -179,7 +179,7 @@ void SaveLoadChooser::reflowLayout() { uint16 w, h; if (!g_gui.xmlEval()->getWidgetData("SaveLoadChooser.Thumbnail", x, y, w, h)) - error("Error when loading position data for Save/Load Thumbnails."); + error("Error when loading position data for Save/Load Thumbnails"); int thumbW = kThumbnailWidth; int thumbH = kThumbnailHeight2; -- cgit v1.2.3 From 965ec170cb019f48d31ee696568ca21d125f33af Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 19 Sep 2010 17:50:21 +0000 Subject: I18N: Add lowres context for one string. Also update German and French translations. svn-id: r52808 --- gui/launcher.cpp | 5 ++++- gui/themes/translations.dat | Bin 76446 -> 76636 bytes 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 31c72b90fa..e467900c61 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -179,7 +179,10 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) _domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to savegames and running the game from the command line")); // GUI: Label & edit widget for the description - new StaticTextWidget(tab, "GameOptions_Game.Name", _("Name:"), _("Full title of the game")); + if (g_system->getOverlayWidth() > 320) + new StaticTextWidget(tab, "GameOptions_Game.Name", _("Name:"), _("Full title of the game")); + else + new StaticTextWidget(tab, "GameOptions_Game.Name", _c("Name:", "lowres"), _("Full title of the game")); _descriptionWidget = new EditTextWidget(tab, "GameOptions_Game.Desc", description, _("Full title of the game")); // Language popup diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index ccf253ba1f..d4b6ec4459 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From f556a4d852e5c151d416d25708f712420ce4a28a Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 20 Sep 2010 20:12:32 +0000 Subject: I18N: Update Spanish German and French translations svn-id: r52822 --- gui/themes/translations.dat | Bin 76636 -> 76734 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index d4b6ec4459..f6eb4c9242 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 10031f81f6d973ea1828b1e27f81cca8ae15d457 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 20 Sep 2010 21:06:15 +0000 Subject: GUI: Fix Subtitles speed option cut in Audio tab of game options. In normal (no scaling) mode and aspect ratio correction turned off, the height of the Audio tab of the game options was too small and the subtitle speed option was subsequently cut. svn-id: r52829 --- gui/themes/scummmodern.zip | Bin 181317 -> 181820 bytes .../scummmodern/scummmodern_layout_lowres.stx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index ea7ecd733c..bc65b4dacb 100644 Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx index 5998c50b60..bd7b5fd8ea 100644 --- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx +++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx @@ -483,7 +483,7 @@ - + -- cgit v1.2.3 From b65c17edc4ecaf8d749fcd54d2552b2be6e88e4c Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 20 Sep 2010 21:17:28 +0000 Subject: GUI: Give slightly more space to the options label in scummmodern theme I think I have checked everywhere and it looks good both in English and in French. This might help for future translations. I am not committing the change to the 1.2.0 branch though as I am not completely sure it is harmless. svn-id: r52830 --- gui/themes/scummmodern.zip | Bin 181820 -> 181823 bytes gui/themes/scummmodern/scummmodern_layout.stx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index bc65b4dacb..f6c3ba7da4 100644 Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 484dd15429..9cf7267488 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -53,7 +53,7 @@ 76880 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index f6eb4c9242..c3048acb32 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From eb5ede13c3e3acce29d488107bbd59fbd210d067 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 21 Sep 2010 19:50:30 +0000 Subject: GUI: Quick fix for the mute checkbox label being cut in the in-game options This happened with some translations as the width of the checkbox was fixed to 80 pixels, even though more space was available. I have increased it to 120 pixels. svn-id: r52849 --- gui/themes/scummmodern.zip | Bin 181823 -> 181827 bytes gui/themes/scummmodern/scummmodern_layout.stx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index f6c3ba7da4..1023e82ff9 100644 Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 9cf7267488..95d775e5ea 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -712,7 +712,7 @@ + width = '120' /> -- cgit v1.2.3 From 25c91513f85844eb86fef3b844b32b18785a955c Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 21 Sep 2010 21:17:49 +0000 Subject: I18N: Update the catalan translation. svn-id: r52851 --- gui/themes/translations.dat | Bin 76880 -> 77049 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index c3048acb32..63b3224948 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 01175256695aedb355c687f9a3205f8a2f6b994b Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 22 Sep 2010 21:22:15 +0000 Subject: I18N: Update Ukrainian translation svn-id: r52861 --- gui/themes/translations.dat | Bin 77049 -> 77767 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 63b3224948..dbc996f427 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 40e96d8dc582fabed2469dc6f4ec237308d03ad4 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 25 Sep 2010 21:09:54 +0000 Subject: I18N: Update Spanish and French translations svn-id: r52893 --- gui/themes/translations.dat | Bin 77767 -> 77789 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index dbc996f427..5267e16a68 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From b1f63deba3afe176646dbf9aae5c22cfab453785 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 25 Sep 2010 22:47:00 +0000 Subject: GUI: Partial fix to bug #3075649 Fonts not found with buit-in theme When the locale font are not found when loading the theme, it now fallbacks to default language (i.e. English) and default font. For this to work I had to move the TranslationManager initialization before the Theme is loaded. Therefore it is now initialized when the GuiManager is constructed. svn-id: r52896 --- gui/GuiManager.cpp | 3 +++ gui/ThemeEngine.cpp | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp index bbd7718d71..44c6530d7e 100644 --- a/gui/GuiManager.cpp +++ b/gui/GuiManager.cpp @@ -62,6 +62,9 @@ GuiManager::GuiManager() : _redrawStatus(kRedrawDisabled), _tooltipCheck(false), // Clear the cursor memset(_cursor, 0xFF, sizeof(_cursor)); + + // Enable translation + TransMan.setLanguage(ConfMan.get("gui_language").c_str()); ConfMan.registerDefault("gui_theme", "scummmodern"); Common::String themefile(ConfMan.get("gui_theme")); diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 0d0fe8aecd..92ecf0346f 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -579,7 +579,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) { if (_texts[textId]->_fontPtr) FontMan.assignFontToName(file, _texts[textId]->_fontPtr); - // Fallback to non-localized font + // Fallback to non-localized font and default translation else { // Try built-in fonts _texts[textId]->_fontPtr = FontMan.getFontByName(file); @@ -593,7 +593,8 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) { FontMan.assignFontToName(file, _texts[textId]->_fontPtr); } - warning("Failed to load localized font '%s'. Using non-localized font instead", file.c_str()); + TransMan.setLanguage("C"); + warning("Failed to load localized font '%s'. Using non-localized font and default GUI language instead", file.c_str()); } } } -- cgit v1.2.3 From 484bf9c269889f205d7db58e88518e55ea615675 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 28 Sep 2010 20:30:50 +0000 Subject: ALL: Fixup some #define names svn-id: r52935 --- gui/ThemeEval.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/ThemeEval.h b/gui/ThemeEval.h index c484a49564..ac867512da 100644 --- a/gui/ThemeEval.h +++ b/gui/ThemeEval.h @@ -23,8 +23,8 @@ * */ -#ifndef GUI_THEME_EVAL -#define GUI_THEME_EVAL +#ifndef GUI_THEME_EVAL_H +#define GUI_THEME_EVAL_H #include "common/scummsys.h" #include "common/hashmap.h" -- cgit v1.2.3 From a0c0b934c75bc93f467b9b30f765e31aaf1a1536 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 28 Sep 2010 20:31:17 +0000 Subject: GUI: Replace GUI_ENABLE_BUILTIN_THEME by DISABLE_GUI_BUILTIN_THEME svn-id: r52936 --- gui/ThemeEngine.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 92ecf0346f..3d3aca5c5a 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -44,8 +44,6 @@ #include "gui/ThemeEval.h" #include "gui/ThemeParser.h" -#define GUI_ENABLE_BUILTIN_THEME - namespace GUI { const char * const ThemeEngine::kImageLogo = "logo.bmp"; @@ -714,7 +712,7 @@ bool ThemeEngine::loadDefaultXML() { // file inside the themes directory. // Use the Python script "makedeftheme.py" to convert a normal XML theme // into the "default.inc" file, which is ready to be included in the code. -#ifdef GUI_ENABLE_BUILTIN_THEME +#ifndef DISABLE_GUI_BUILTIN_THEME const char *defaultXML = #include "themes/default.inc" ; @@ -1595,7 +1593,7 @@ struct TDComparator { } // end of anonymous namespace void ThemeEngine::listUsableThemes(Common::List &list) { -#ifdef GUI_ENABLE_BUILTIN_THEME +#ifndef DISABLE_GUI_BUILTIN_THEME ThemeDescriptor th; th.name = "ScummVM Classic Theme (Builtin Version)"; th.id = "builtin"; -- cgit v1.2.3 From 7296a2d8d03b7358bdef0e9217f53eb4ee81ce9e Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Thu, 30 Sep 2010 18:09:01 +0000 Subject: I18N: Add translation for wince specific titles for key mapping dialog Also backport fix from branch on translation of default title for key mapping dialog. svn-id: r52959 --- gui/KeysDialog.h | 3 ++- gui/themes/translations.dat | Bin 77789 -> 78176 bytes 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/KeysDialog.h b/gui/KeysDialog.h index d18bcb3617..7a9936a085 100644 --- a/gui/KeysDialog.h +++ b/gui/KeysDialog.h @@ -30,12 +30,13 @@ #include "gui/dialog.h" #include "gui/ListWidget.h" #include "common/str.h" +#include "common/translation.h" namespace GUI { class KeysDialog : public GUI::Dialog { public: - KeysDialog(const Common::String &title = "Choose an action to map"); + KeysDialog(const Common::String &title = _("Choose an action to map")); virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); virtual void handleKeyUp(Common::KeyState state); diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 5267e16a68..2d658b12df 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From be1d196da5dbbabaef0bfa835b51e9c82c407645 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Fri, 1 Oct 2010 19:16:09 +0000 Subject: GUI: Error message for theme incompatible with current language Add an error message when switching to a theme that does not support the current language (i.e. it does not have fonts for the charset used by that language). svn-id: r52965 --- gui/options.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gui') diff --git a/gui/options.cpp b/gui/options.cpp index f609413642..b02200b47e 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -1281,9 +1281,20 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3 Common::String theme = browser.getSelected(); // FIXME: Actually, any changes (including the theme change) should // only become active *after* the options dialog has closed. + Common::String charset = TransMan.getCurrentCharset(); if (g_gui.loadNewTheme(theme)) { _curTheme->setLabel(g_gui.theme()->getThemeName()); ConfMan.set("gui_theme", theme); + // If the charset has changed, it means the font were not found for the + // new theme. Since for the moment we do not support change of translation + // language without restarting, we let the user know about this. + if (charset != TransMan.getCurrentCharset()) { + MessageDialog error( + "The theme you selected does not support your current language. You need to close " + "ScummVM and when you start it again it will be using this new theme and english language." + ); + error.runModal(); + } } draw(); } -- cgit v1.2.3 From 1177692701ccfef3eee94ab092a606c0da631566 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Fri, 1 Oct 2010 21:41:40 +0000 Subject: GUI: Fix bug #3075649 (Fonts not found with built-in theme) When switching to a theme that do not have the fonts needed to properly display the current language, it now revert to the previously used theme and display an error message telling the user to change the language first if he wants to use the theme he selected. svn-id: r52969 --- gui/options.cpp | 17 +++++++++-------- gui/themes/translations.dat | Bin 78176 -> 79078 bytes 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'gui') diff --git a/gui/options.cpp b/gui/options.cpp index b02200b47e..e497da9942 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -1281,19 +1281,20 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3 Common::String theme = browser.getSelected(); // FIXME: Actually, any changes (including the theme change) should // only become active *after* the options dialog has closed. - Common::String charset = TransMan.getCurrentCharset(); + Common::String lang = TransMan.getCurrentLanguage(); + Common::String oldTheme = g_gui.theme()->getThemeId(); if (g_gui.loadNewTheme(theme)) { - _curTheme->setLabel(g_gui.theme()->getThemeName()); - ConfMan.set("gui_theme", theme); // If the charset has changed, it means the font were not found for the // new theme. Since for the moment we do not support change of translation // language without restarting, we let the user know about this. - if (charset != TransMan.getCurrentCharset()) { - MessageDialog error( - "The theme you selected does not support your current language. You need to close " - "ScummVM and when you start it again it will be using this new theme and english language." - ); + if (lang != TransMan.getCurrentLanguage()) { + TransMan.setLanguage(lang.c_str()); + g_gui.loadNewTheme(oldTheme); + MessageDialog error(_("The theme you selected does not support your current language. If you want to use this theme you need to switch to another language first.")); error.runModal(); + } else { + _curTheme->setLabel(g_gui.theme()->getThemeName()); + ConfMan.set("gui_theme", theme); } } draw(); diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 2d658b12df..b4b854aba1 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 54127a2123cb703ac582a66c42c7686052f927af Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 2 Oct 2010 13:27:06 +0000 Subject: i18n: Update Russian translation svn-id: r52979 --- gui/themes/translations.dat | Bin 79078 -> 79968 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index b4b854aba1..eb9147c279 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From ad24be827c96b0a944ec6c1f5503a4e2e9b41218 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 2 Oct 2010 21:36:47 +0000 Subject: I18N: Update German translation in trunk svn-id: r52982 --- gui/themes/translations.dat | Bin 79968 -> 80358 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'gui') diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index eb9147c279..b9c41a8724 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 25dac76b3500c23bf13cce359a59ea184f9cbeeb Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 10 Oct 2010 08:13:26 +0000 Subject: GUI: Ensure that the message dialog is wide enough The Hugo engine currently uses the message dialog. Make sure that the dialog is always at least wide enough to hold the "Ok" button. svn-id: r53107 --- gui/message.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/message.cpp b/gui/message.cpp index 6406976569..198a34eb0d 100644 --- a/gui/message.cpp +++ b/gui/message.cpp @@ -58,7 +58,10 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines); // Calculate the desired dialog size (maxing out at 300*180 for now) - _w = maxlineWidth + 20; + if (maxlineWidth > buttonWidth) + _w = maxlineWidth + 20; + else + _w = buttonWidth + 20; lineCount = lines.size(); _h = 16; -- cgit v1.2.3 From bcf3b352853a268afba25a0bdfccefd27191f5c6 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 10 Oct 2010 10:11:33 +0000 Subject: GUI: Clean up my previous commit. svn-id: r53112 --- gui/message.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/message.cpp b/gui/message.cpp index 198a34eb0d..6f5d7d9e77 100644 --- a/gui/message.cpp +++ b/gui/message.cpp @@ -58,10 +58,7 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines); // Calculate the desired dialog size (maxing out at 300*180 for now) - if (maxlineWidth > buttonWidth) - _w = maxlineWidth + 20; - else - _w = buttonWidth + 20; + _w = MAX(maxlineWidth, buttonWidth) + 20; lineCount = lines.size(); _h = 16; -- cgit v1.2.3 From af6ffafe5fd6549b5dfce516a6c255cba515f54a Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Sun, 10 Oct 2010 10:32:58 +0000 Subject: GUI: Message dialog width Ensure the message dialog is wide enough when it contains 2 buttons. This is used by Hugo's engine, e.g. when Exiting the DOS versions. svn-id: r53114 --- gui/message.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/message.cpp b/gui/message.cpp index 6f5d7d9e77..06b4524eab 100644 --- a/gui/message.cpp +++ b/gui/message.cpp @@ -58,7 +58,11 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines); // Calculate the desired dialog size (maxing out at 300*180 for now) - _w = MAX(maxlineWidth, buttonWidth) + 20; + if (altButton) + _w = MAX(maxlineWidth, (2 * buttonWidth) + 10) + 20; + else + _w = MAX(maxlineWidth, buttonWidth) + 20; + lineCount = lines.size(); _h = 16; -- cgit v1.2.3 From 43161858ac14bae4ac6dea114d8b3e7a8c1b293b Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 12 Oct 2010 00:26:17 +0000 Subject: I18N: Forward-port r53063 (minor lowres fixes) svn-id: r53159 --- gui/launcher.cpp | 2 +- gui/options.cpp | 4 ++-- gui/themes/translations.dat | Bin 80358 -> 80935 bytes 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gui') diff --git a/gui/launcher.cpp b/gui/launcher.cpp index e467900c61..bc26fe3d47 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -294,7 +294,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) if (g_system->getOverlayWidth() > 320) new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _("Game Path:"), 0, kCmdGameBrowser); else - new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _c("Game Path:", "context"), 0, kCmdGameBrowser); + new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _c("Game Path:", "lowres"), 0, kCmdGameBrowser); _gamePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.GamepathText", gamePath); // GUI: Button + Label for the additional path diff --git a/gui/options.cpp b/gui/options.cpp index e497da9942..2809a68b92 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -666,7 +666,7 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref if (g_system->getOverlayWidth() > 320) _midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _("Preferred Device:") : _("Music Device:"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator")); else - _midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _c("Preferred Device:", "lowres") : _c("Music Device:", "lowres"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator")); + _midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _c("Preferred Dev.:", "lowres") : _c("Music Device:", "lowres"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator")); _midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup", _("Specifies output sound device or sound card emulator")); // Populate it @@ -763,7 +763,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi if (g_system->getOverlayWidth() > 320) _mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _("True Roland MT-32 (disable GM emulation)"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer")); else - _mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _c("True Roland MT-32 (disable GM emulation)", "lowres"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer")); + _mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _c("True Roland MT-32 (no GM emulation)", "lowres"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer")); // GS Extensions setting _enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Enable Roland GS Mode"), _("Turns off General MIDI mapping for games with Roland MT-32 soundtrack")); diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index b9c41a8724..b057f2ba44 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 8388e0dfea4ae0d80e51368acd12685c740c5bb5 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 12 Oct 2010 02:18:11 +0000 Subject: JANITORAL: Clean trailing whitespaces. svn-id: r53160 --- gui/GuiManager.cpp | 2 +- gui/ThemeEngine.cpp | 6 ++--- gui/Tooltip.cpp | 18 +++++++------- gui/Tooltip.h | 9 ++++--- gui/launcher.cpp | 2 +- gui/options.cpp | 6 ++--- gui/themes/scummmodern/scummmodern_layout.stx | 2 +- gui/themes/scummtheme.py | 36 +++++++++++++-------------- 8 files changed, 41 insertions(+), 40 deletions(-) (limited to 'gui') diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp index 44c6530d7e..a2a8654bf6 100644 --- a/gui/GuiManager.cpp +++ b/gui/GuiManager.cpp @@ -62,7 +62,7 @@ GuiManager::GuiManager() : _redrawStatus(kRedrawDisabled), _tooltipCheck(false), // Clear the cursor memset(_cursor, 0xFF, sizeof(_cursor)); - + // Enable translation TransMan.setLanguage(ConfMan.get("gui_language").c_str()); diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 3d3aca5c5a..d9a1e05855 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -573,7 +573,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) { if (!_texts[textId]->_fontPtr) { // First try to load localized font _texts[textId]->_fontPtr = loadFont(localized); - + if (_texts[textId]->_fontPtr) FontMan.assignFontToName(file, _texts[textId]->_fontPtr); @@ -581,14 +581,14 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) { else { // Try built-in fonts _texts[textId]->_fontPtr = FontMan.getFontByName(file); - + // Try to load it if (!_texts[textId]->_fontPtr) { _texts[textId]->_fontPtr = loadFont(file); if (!_texts[textId]->_fontPtr) error("Couldn't load font '%s'", file.c_str()); - + FontMan.assignFontToName(file, _texts[textId]->_fontPtr); } TransMan.setLanguage("C"); diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp index 64c34688df..272fa66072 100644 --- a/gui/Tooltip.cpp +++ b/gui/Tooltip.cpp @@ -34,7 +34,7 @@ namespace GUI { -Tooltip::Tooltip() : +Tooltip::Tooltip() : Dialog(-1, -1, -1, -1), _maxWidth(-1) { _backgroundType = GUI::ThemeEngine::kDialogBackgroundTooltip; @@ -69,7 +69,7 @@ bool Tooltip::tooltipModal(int x, int y) { _h = (tooltipFont->getFontHeight() + 2) * _wrappedLines.size(); _x = MIN(g_gui.getTopDialog()->_x + x + _xdelta, g_gui.getWidth() - _w - 3); - _y = MIN(g_gui.getTopDialog()->_y + y + _ydelta, g_gui.getHeight() - _h - 3); + _y = MIN(g_gui.getTopDialog()->_y + y + _ydelta, g_gui.getHeight() - _h - 3); open(); g_gui.runLoop(); @@ -85,14 +85,14 @@ void Tooltip::drawDialog() { for (Common::StringArray::const_iterator i = _wrappedLines.begin(); i != _wrappedLines.end(); ++i, ++num) { g_gui.theme()->drawText( - Common::Rect(_x + 1, _y + 1 + num * h, _x + 1 +_w, _y + 1+ (num + 1) * h), *i, - ThemeEngine::kStateEnabled, - Graphics::kTextAlignLeft, - ThemeEngine::kTextInversionNone, + Common::Rect(_x + 1, _y + 1 + num * h, _x + 1 +_w, _y + 1+ (num + 1) * h), *i, + ThemeEngine::kStateEnabled, + Graphics::kTextAlignLeft, + ThemeEngine::kTextInversionNone, 0, - false, - ThemeEngine::kFontStyleTooltip, - ThemeEngine::kFontColorNormal, + false, + ThemeEngine::kFontStyleTooltip, + ThemeEngine::kFontColorNormal, false ); } diff --git a/gui/Tooltip.h b/gui/Tooltip.h index 60f3cf3a19..02eb01d0d0 100644 --- a/gui/Tooltip.h +++ b/gui/Tooltip.h @@ -33,7 +33,7 @@ class Tooltip : public Dialog { public: Tooltip(); ~Tooltip() {} - + void drawDialog(); bool tooltipModal(int x, int y); void mustClose(); @@ -44,7 +44,8 @@ protected: int _xdelta, _ydelta; Common::StringArray _wrappedLines; -}; -} +}; + +} // End of namespace GUI -#endif +#endif // GUI_TOOLTIP_H diff --git a/gui/launcher.cpp b/gui/launcher.cpp index bc26fe3d47..63d3ba6954 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -1054,7 +1054,7 @@ void LauncherDialog::updateButtons() { int modifiers = g_system->getEventManager()->getModifierState(); const bool massAdd = (modifiers & Common::KBD_SHIFT) != 0; const bool lowRes = g_system->getOverlayWidth() <= 320; - + const char *newAddButtonLabel = massAdd ? (lowRes ? _c("Mass Add...", "lowres") : _("Mass Add...")) : (lowRes ? _c("Add Game...", "lowres") : _("Add Game...")); diff --git a/gui/options.cpp b/gui/options.cpp index 2809a68b92..e7888cf095 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -630,7 +630,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr Common::String context; if (g_system->getOverlayWidth() <= 320) context = "lowres"; - + // The GFX mode popup _gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", _("Graphics mode:")); _gfxPopUp = new PopUpWidget(boss, prefix + "grModePopup"); @@ -798,7 +798,7 @@ void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &p _subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Speech")); _subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subtitles")); _subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _("Both")); - + _subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _("Subtitle speed:")); } else { _subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", _c("Text and Speech:", "lowres")); @@ -808,7 +808,7 @@ void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &p _subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Spch"), _("Speech")); _subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subs"), _("Subtitles")); _subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _c("Both", "lowres"), _("Show subtitles and play speech")); - + _subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _c("Subtitle speed:", "lowres")); } diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 95d775e5ea..51f1ce6c6f 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -344,7 +344,7 @@ - + ", re.DOTALL) head = re.compile("<\?(.*?)\?>") @@ -40,33 +40,33 @@ def parseSTX(theme_file, def_file): output = "" for line in theme_file: output += line.rstrip("\r\n\t ").lstrip() + " \n" - + output = re.sub(comm, "", output) output = re.sub(head, "", output) output = output.replace("\t", " ").replace(" ", " ").replace("\"", "'") output = output.replace(" = ", "=").replace(", ", ",") - + for line in output.splitlines(): if line and not line.isspace(): def_file.write("\"" + line + "\"\n") def buildDefTheme(themeName): def_file = open("default.inc", "w") - + if not os.path.isdir(themeName): print ("Cannot open default theme dir.") - + def_file.write(""" ""\n""") - + for filename in os.listdir(themeName): filename = os.path.join(themeName, filename) if os.path.isfile(filename) and filename.endswith(".stx"): theme_file = open(filename, "r") parseSTX(theme_file, def_file) theme_file.close() - + def_file.close() - + def printUsage(): print ("===============================") print ("ScummVM Theme Generation Script") @@ -80,16 +80,16 @@ def printUsage(): print (" Creates a 'default.inc' file to embed the given theme in the source code.\n") def main(): - + if len(sys.argv) == 2 and sys.argv[1] == "makeall": buildAllThemes() - + elif len(sys.argv) == 3 and sys.argv[1] == "make": buildTheme(sys.argv[2]) - + elif len(sys.argv) == 3 and sys.argv[1] == "default": buildDefTheme(sys.argv[2]) - + else: printUsage() -- cgit v1.2.3 From 54b2a8c98df204dfe64a27fc830936ec62e3f9ed Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 12 Oct 2010 04:19:58 +0000 Subject: JANITORIAL: Cleanup (mostly whitespace) svn-id: r53161 --- gui/ThemeParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index c809447cbd..b9a0c583b0 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -144,7 +144,7 @@ Graphics::DrawStep *ThemeParser::defaultDrawStep() { Graphics::DrawStep *ThemeParser::newDrawStep() { assert(_defaultStepGlobal); - Graphics::DrawStep *step = 0 ; //new DrawStep; + Graphics::DrawStep *step = 0; //new DrawStep; if (_defaultStepLocal) { step = new Graphics::DrawStep(*_defaultStepLocal); -- cgit v1.2.3 From f2d8d71a78520b164e76a47b1792190534625ffc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 12 Oct 2010 19:33:36 +0000 Subject: CREDITS: Added qvist to credits per his request svn-id: r53164 --- gui/credits.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index de77e02b47..b469645217 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -544,6 +544,8 @@ static const char *credits[] = { "C2""For the original Gobliiins ADL player", "C0""Ivan Dubrov", "C2""For contributing the initial version of the Gobliiins engine", +"C0""Henrik Engqvist", +"C2""For generously providing hosting for our buildbot, SVN repository, planet and doxygen sites as well as tons of HD space", "C0""DOSBox Team", "C2""For their awesome OPL2 and OPL3 emulator", "C0""Till Kresslein", -- cgit v1.2.3 From 072c5b447c14b895ff90cddf699aedd741c5ff92 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 13 Oct 2010 22:15:22 +0000 Subject: CREDITS: Add Sword2.5 team. The wording was agreed with them svn-id: r53448 --- gui/credits.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index b469645217..e6be7e01e7 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -580,5 +580,7 @@ static const char *credits[] = { "C0""", "C0""David P. Gray from Gray Design Associate for sharing the source code of the Hugo trilogy.", "C0""", +"C0""Broken Sword 2.5 team for providing sources of their engine and their great support.", +"C0""", "", }; -- cgit v1.2.3 From 36cd5caf956c087995a62983ad09c15250f29475 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 15 Oct 2010 12:19:13 +0000 Subject: COMMON: Add XMLParser::parseIntegerKey variant accepting a Common::String Almost all places where we used XMLParser::parseIntegerKey were using it like this: XMLParser::parseIntegerKey(str.c_str(), ...) Since this makes the code harder to read, I overloaded the method to also accept Commmon::String directly. Also removed all .c_str() invocations where necessary. svn-id: r53479 --- gui/ThemeParser.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'gui') diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index b9a0c583b0..0daf2528dd 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -195,7 +195,7 @@ bool ThemeParser::parserCallback_text_color(ParserNode *node) { if (_palette.contains(node->values["color"])) getPaletteColor(node->values["color"], red, green, blue); - else if (!parseIntegerKey(node->values["color"].c_str(), 3, &red, &green, &blue)) + else if (!parseIntegerKey(node->values["color"], 3, &red, &green, &blue)) return parserError("Error parsing color value for text color definition."); if (!_theme->addTextColor(colorId, red, green, blue)) @@ -216,10 +216,10 @@ bool ThemeParser::parserCallback_cursor(ParserNode *node) { int spotx, spoty, scale; - if (!parseIntegerKey(node->values["hotspot"].c_str(), 2, &spotx, &spoty)) + if (!parseIntegerKey(node->values["hotspot"], 2, &spotx, &spoty)) return parserError("Error parsing cursor Hot Spot coordinates."); - if (!parseIntegerKey(node->values["scale"].c_str(), 1, &scale)) + if (!parseIntegerKey(node->values["scale"], 1, &scale)) return parserError("Error parsing cursor scale."); if (!_theme->createCursor(node->values["file"], spotx, spoty, scale)) @@ -286,7 +286,7 @@ bool ThemeParser::parserCallback_color(ParserNode *node) { int red, green, blue; - if (parseIntegerKey(node->values["rgb"].c_str(), 3, &red, &green, &blue) == false || + if (parseIntegerKey(node->values["rgb"], 3, &red, &green, &blue) == false || red < 0 || red > 255 || green < 0 || green > 255 || blue < 0 || blue > 255) return parserError("Error parsing RGB values for palette color '%s'", name.c_str());\ @@ -387,7 +387,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst */ #define __PARSER_ASSIGN_INT(struct_name, key_name, force) \ if (stepNode->values.contains(key_name)) { \ - if (!parseIntegerKey(stepNode->values[key_name].c_str(), 1, &x)) \ + if (!parseIntegerKey(stepNode->values[key_name], 1, &x)) \ return parserError("Error parsing key value for '%s'.", key_name); \ \ drawstep->struct_name = x; \ @@ -411,7 +411,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst red = _palette[val].r; \ green = _palette[val].g; \ blue = _palette[val].b; \ - } else if (parseIntegerKey(val.c_str(), 3, &red, &green, &blue) == false || \ + } else if (parseIntegerKey(val, 3, &red, &green, &blue) == false || \ red < 0 || red > 255 || green < 0 || green > 255 || blue < 0 || blue > 255) \ return parserError("Error parsing color struct '%s'", val.c_str());\ \ @@ -481,7 +481,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst drawstep->autoWidth = false; val = stepNode->values["width"]; - if (parseIntegerKey(val.c_str(), 1, &x)) + if (parseIntegerKey(val, 1, &x)) drawstep->w = x; else if (val == "height") drawstep->w = -1; @@ -490,7 +490,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst if (stepNode->values.contains("xpos")) { val = stepNode->values["xpos"]; - if (parseIntegerKey(val.c_str(), 1, &x)) + if (parseIntegerKey(val, 1, &x)) drawstep->x = x; else if (val == "center") drawstep->xAlign = Graphics::DrawStep::kVectorAlignCenter; @@ -509,7 +509,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst drawstep->autoHeight = false; val = stepNode->values["height"]; - if (parseIntegerKey(val.c_str(), 1, &x)) + if (parseIntegerKey(val, 1, &x)) drawstep->h = x; else if (val == "width") drawstep->h = -1; @@ -518,7 +518,7 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst if (stepNode->values.contains("ypos")) { val = stepNode->values["ypos"]; - if (parseIntegerKey(val.c_str(), 1, &x)) + if (parseIntegerKey(val, 1, &x)) drawstep->y = x; else if (val == "center") drawstep->yAlign = Graphics::DrawStep::kVectorAlignCenter; @@ -569,7 +569,7 @@ bool ThemeParser::parserCallback_def(ParserNode *node) { if (_theme->getEvaluator()->hasVar(node->values["value"]) == true) value = _theme->getEvaluator()->getVar(node->values["value"]); - else if (!parseIntegerKey(node->values["value"].c_str(), 1, &value)) + else if (!parseIntegerKey(node->values["value"], 1, &value)) return parserError("Invalid definition for '%s'.", var.c_str()); _theme->getEvaluator()->setVar(var, value); @@ -608,7 +608,7 @@ bool ThemeParser::parserCallback_widget(ParserNode *node) { if (_theme->getEvaluator()->hasVar(node->values["width"]) == true) width = _theme->getEvaluator()->getVar(node->values["width"]); - else if (!parseIntegerKey(node->values["width"].c_str(), 1, &width)) + else if (!parseIntegerKey(node->values["width"], 1, &width)) return parserError("Corrupted width value in key for %s", var.c_str()); } @@ -616,7 +616,7 @@ bool ThemeParser::parserCallback_widget(ParserNode *node) { if (_theme->getEvaluator()->hasVar(node->values["height"]) == true) height = _theme->getEvaluator()->getVar(node->values["height"]); - else if (!parseIntegerKey(node->values["height"].c_str(), 1, &height)) + else if (!parseIntegerKey(node->values["height"], 1, &height)) return parserError("Corrupted height value in key for %s", var.c_str()); } @@ -651,7 +651,7 @@ bool ThemeParser::parserCallback_dialog(ParserNode *node) { } if (node->values.contains("inset")) { - if (!parseIntegerKey(node->values["inset"].c_str(), 1, &inset)) + if (!parseIntegerKey(node->values["inset"], 1, &inset)) return false; } @@ -682,7 +682,7 @@ bool ThemeParser::parserCallback_layout(ParserNode *node) { int spacing = -1; if (node->values.contains("spacing")) { - if (!parseIntegerKey(node->values["spacing"].c_str(), 1, &spacing)) + if (!parseIntegerKey(node->values["spacing"], 1, &spacing)) return false; } @@ -697,7 +697,7 @@ bool ThemeParser::parserCallback_layout(ParserNode *node) { if (node->values.contains("padding")) { int paddingL, paddingR, paddingT, paddingB; - if (!parseIntegerKey(node->values["padding"].c_str(), 4, &paddingL, &paddingR, &paddingT, &paddingB)) + if (!parseIntegerKey(node->values["padding"], 4, &paddingL, &paddingR, &paddingT, &paddingB)) return false; _theme->getEvaluator()->addPadding(paddingL, paddingR, paddingT, paddingB); @@ -713,7 +713,7 @@ bool ThemeParser::parserCallback_space(ParserNode *node) { if (_theme->getEvaluator()->hasVar(node->values["size"])) size = _theme->getEvaluator()->getVar(node->values["size"]); - else if (!parseIntegerKey(node->values["size"].c_str(), 1, &size)) + else if (!parseIntegerKey(node->values["size"], 1, &size)) return parserError("Invalid value for Spacing size."); } @@ -734,7 +734,7 @@ bool ThemeParser::parseCommonLayoutProps(ParserNode *node, const Common::String if (node->values.contains("size")) { int width, height; - if (!parseIntegerKey(node->values["size"].c_str(), 2, &width, &height)) { + if (!parseIntegerKey(node->values["size"], 2, &width, &height)) { Common::StringTokenizer tokenizer(node->values["size"], " ,"); Common::String wtoken, htoken; char *parseEnd; @@ -779,7 +779,7 @@ bool ThemeParser::parseCommonLayoutProps(ParserNode *node, const Common::String if (node->values.contains("pos")) { int x, y; - if (!parseIntegerKey(node->values["pos"].c_str(), 2, &x, &y)) { + if (!parseIntegerKey(node->values["pos"], 2, &x, &y)) { Common::StringTokenizer tokenizer(node->values["pos"], " ,"); Common::String xpos, ypos; char *parseEnd; @@ -835,7 +835,7 @@ bool ThemeParser::parseCommonLayoutProps(ParserNode *node, const Common::String if (node->values.contains("padding")) { int paddingL, paddingR, paddingT, paddingB; - if (!parseIntegerKey(node->values["padding"].c_str(), 4, &paddingL, &paddingR, &paddingT, &paddingB)) + if (!parseIntegerKey(node->values["padding"], 4, &paddingL, &paddingR, &paddingT, &paddingB)) return false; _theme->getEvaluator()->setVar(var + "Padding.Left", paddingL); -- cgit v1.2.3 From 3b69f1cae63a5ddb47d159f57c5dfa93ce78d71f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Oct 2010 01:15:09 +0000 Subject: CREDITS: Sync credits with r53530. svn-id: r53531 --- gui/credits.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index e6be7e01e7..07f96f7581 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -181,6 +181,9 @@ static const char *credits[] = { "C0""Filippos Karapetis", "C0""Joost Peters", "", +"C1""Toon", +"C0""Sylvain Dupont", +"", "C1""Touch\351", "C0""Gregory Montoir", "", -- cgit v1.2.3 From 05b3f2a0711df91230bf39587c9eed4da36e1afa Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 18 Oct 2010 19:07:24 +0000 Subject: GUI: Use vprintf in Console class. Patch by littleboy svn-id: r53577 --- gui/console.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'gui') diff --git a/gui/console.cpp b/gui/console.cpp index a53e97888b..2fede327f1 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -660,7 +660,7 @@ void ConsoleDialog::updateScrollBuffer() { } int ConsoleDialog::printf(const char *format, ...) { - va_list argptr; + va_list argptr; va_start(argptr, format); int count = this->vprintf(format, argptr); @@ -669,17 +669,10 @@ int ConsoleDialog::printf(const char *format, ...) { } int ConsoleDialog::vprintf(const char *format, va_list argptr) { - char buf[2048]; + Common::String output = Common::String::vprintf(format, argptr); -#if defined(WIN32) - int count = _vsnprintf(buf, sizeof(buf), format, argptr); -#elif defined(__SYMBIAN32__) - int count = vsprintf(buf, format, argptr); -#else - int count = vsnprintf(buf, sizeof(buf), format, argptr); -#endif - print(buf); - return count; + print(output.c_str()); + return output.size(); } void ConsoleDialog::putchar(int c) { -- cgit v1.2.3 From 7f7a6cdafd758287f6bbb767adb98a42edb2f4a2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 18 Oct 2010 20:19:58 +0000 Subject: Revert "GUI: Use vprintf in Console class. Patch by littleboy" svn-id: r53585 --- gui/console.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/console.cpp b/gui/console.cpp index 2fede327f1..a53e97888b 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -660,7 +660,7 @@ void ConsoleDialog::updateScrollBuffer() { } int ConsoleDialog::printf(const char *format, ...) { - va_list argptr; + va_list argptr; va_start(argptr, format); int count = this->vprintf(format, argptr); @@ -669,10 +669,17 @@ int ConsoleDialog::printf(const char *format, ...) { } int ConsoleDialog::vprintf(const char *format, va_list argptr) { - Common::String output = Common::String::vprintf(format, argptr); + char buf[2048]; - print(output.c_str()); - return output.size(); +#if defined(WIN32) + int count = _vsnprintf(buf, sizeof(buf), format, argptr); +#elif defined(__SYMBIAN32__) + int count = vsprintf(buf, format, argptr); +#else + int count = vsnprintf(buf, sizeof(buf), format, argptr); +#endif + print(buf); + return count; } void ConsoleDialog::putchar(int c) { -- cgit v1.2.3 From 5c2bcadd214b0af8f10e2915b986735739c42b36 Mon Sep 17 00:00:00 2001 From: Julien Templier Date: Mon, 18 Oct 2010 21:35:15 +0000 Subject: CREDITS: Add lastexpress engine svn-id: r53590 --- gui/credits.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index 07f96f7581..c4fd4c3648 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -127,6 +127,11 @@ static const char *credits[] = { "C0""Gregory Montoir", "C0""Johannes Schickel", "", +"C1""Last Express", +"C0""Matthew Hoops", +"C0""Jordi Vilalta Prat", +"C0""Julien Templier", +"", "C1""Lure", "C0""Paul Gilbert", "", -- cgit v1.2.3 From 6dfab4fce8f8b1634f2771a043c4a5fcf1737482 Mon Sep 17 00:00:00 2001 From: John Willis Date: Wed, 20 Oct 2010 13:50:16 +0000 Subject: CREDITS: Commit the result of 'make credits'. svn-id: r53643 --- gui/credits.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index c4fd4c3648..0b29bcb7e9 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -203,7 +203,7 @@ static const char *credits[] = { "C1""Dreamcast", "C0""Marcus Comstedt", "", -"C1""GP2X", +"C1""GPH Devices (GP2X, GP2XWiz & Caanoo)", "C0""John Willis", "", "C1""iPhone", @@ -221,6 +221,9 @@ static const char *credits[] = { "C1""Nintendo DS", "C0""Neil Millstone", "", +"C1""OpenPandora", +"C0""John Willis", +"", "C1""PocketPC / WinCE", "C0""Nicolas Bacca", "C2""(retired)", -- cgit v1.2.3 From deb461d2003e8183402530cd27ae56c289f50050 Mon Sep 17 00:00:00 2001 From: Yotam Barnoy Date: Sat, 23 Oct 2010 21:30:39 +0000 Subject: GUI: added close() call to Dialog::runModal() This should prevent a small leak in the GuiManager when adding the dialog to the stack. Check for any regressions. svn-id: r53747 --- gui/dialog.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gui') diff --git a/gui/dialog.cpp b/gui/dialog.cpp index e20b181c83..e25cfa1397 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -76,6 +76,8 @@ int Dialog::runModal() { // Start processing events g_gui.runLoop(); + close(); // to prevent resource leak in GUI manager + // Return the result code return _result; } -- cgit v1.2.3 From 225fd20bee837d0a9d9959621c0aa8bfa8a4337b Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 24 Oct 2010 13:26:58 +0000 Subject: Revert r53747: "GUI: added close() call to Dialog::runModal()" It broke the launcher after adding new games. svn-id: r53765 --- gui/dialog.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'gui') diff --git a/gui/dialog.cpp b/gui/dialog.cpp index e25cfa1397..e20b181c83 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -76,8 +76,6 @@ int Dialog::runModal() { // Start processing events g_gui.runLoop(); - close(); // to prevent resource leak in GUI manager - // Return the result code return _result; } -- cgit v1.2.3 From 0db700a3dced67c607c9e9719ea22347612ead40 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 24 Oct 2010 19:15:17 +0000 Subject: GUI/LAUNCHER: improved MIDI device selection (also #3088438) This fixes an issue with the setting in the GM and MT-32 device tabs that has caused some complaints and discussions on -devel. It might also be what bug #3088438 is about. With a setting ScummVM would just use the first available MIDI device (even if this is the not really well working MT-32 emulator). This setting was also indeed set by default - making it even more annoying. Now there is a new setting for both the GM and MT-32 device tabs ("Don't use GM/MT-32 music"). This will cause MIDI device detection to be skipped and the best of the other devices (Adlib etc.) to be used. This new setting is used as default. So users who haven't specified anything will get Adlib, PC Speaker etc. (if supported by the engine) even if the engine prefers Midi. There is a new "Use first available device" setting which will have the same effect as the "" setting we had before. svn-id: r53771 --- gui/options.cpp | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'gui') diff --git a/gui/options.cpp b/gui/options.cpp index e7888cf095..40c6e64126 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -679,7 +679,7 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref const uint32 deviceGuiOption = MidiDriver::musicType2GUIO(d->getMusicType()); if ((_domain == Common::ConfigManager::kApplicationDomain && d->getMusicType() != MT_TOWNS // global dialog - skip useless FM-Towns, C64, Amiga, AppleIIGS options there - && d->getMusicType() != MT_C64 && d->getMusicType() != MT_AMIGA && d->getMusicType() != MT_APPLEIIGS) + && d->getMusicType() != MT_C64 && d->getMusicType() != MT_AMIGA && d->getMusicType() != MT_APPLEIIGS && d->getMusicType() != MT_PC98) || (_domain != Common::ConfigManager::kApplicationDomain && !(_guioptions & allFlags)) // No flags are specified || (_guioptions & deviceGuiOption) // flag is present // HACK/FIXME: For now we have to show GM devices, even when the game only has GUIO_MIDIMT32 set, @@ -719,13 +719,25 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi // Populate const MusicPlugin::List p = MusicMan.getPlugins(); + // Make sure the null device is the first one in the list to avoid undesired + // auto detection for users who don't have a saved setting yet. for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) { MusicDevices i = (**m)->getDevices(); for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) { - if (d->getMusicType() >= MT_GM || d->getMusicDriverId() == "auto") { + if (d->getMusicDriverId() == "null") + _gmDevicePopUp->appendEntry(_("Don't use General MIDI music"), d->getHandle()); + } + } + // Now we add the other devices. + for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) { + MusicDevices i = (**m)->getDevices(); + for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) { + if (d->getMusicType() >= MT_GM) { if (d->getMusicType() != MT_MT32) _gmDevicePopUp->appendEntry(d->getCompleteName(), d->getHandle()); - } + } else if (d->getMusicDriverId() == "auto") { + _gmDevicePopUp->appendEntry(_("Use first available device"), d->getHandle()); + } } } @@ -769,12 +781,23 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi _enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Enable Roland GS Mode"), _("Turns off General MIDI mapping for games with Roland MT-32 soundtrack")); const MusicPlugin::List p = MusicMan.getPlugins(); + // Make sure the null device is the first one in the list to avoid undesired + // auto detection for users who don't have a saved setting yet. + for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) { + MusicDevices i = (**m)->getDevices(); + for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) { + if (d->getMusicDriverId() == "null") + _mt32DevicePopUp->appendEntry(_("Don't use Roland MT-32 music"), d->getHandle()); + } + } + // Now we add the other devices. for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) { MusicDevices i = (**m)->getDevices(); for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) { - if (d->getMusicType() >= MT_GM || d->getMusicDriverId() == "auto") { + if (d->getMusicType() >= MT_GM) _mt32DevicePopUp->appendEntry(d->getCompleteName(), d->getHandle()); - } + else if (d->getMusicDriverId() == "auto") + _mt32DevicePopUp->appendEntry(_("Use first available device"), d->getHandle()); } } -- cgit v1.2.3 From 65c7299b38bf1f2e0b3039895f41d1afed647bca Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Mon, 25 Oct 2010 14:31:06 +0000 Subject: GUI/LAUNCHER: follow-up to r53771 The GM and MT-32 popup widgets would be set to the first available MIDI device by default (before any selection has taken place yet). Instead, default will now be the first list entry. svn-id: r53827 --- gui/options.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'gui') diff --git a/gui/options.cpp b/gui/options.cpp index 40c6e64126..558a89386b 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -213,14 +213,8 @@ void OptionsDialog::open() { } if (_multiMidiCheckbox) { - if (!loadMusicDeviceSetting(_gmDevicePopUp, "gm_device")) { - if (_domain.equals(Common::ConfigManager::kApplicationDomain)) { - if (!loadMusicDeviceSetting(_gmDevicePopUp, Common::String(), MT_GM)) - _gmDevicePopUp->setSelected(0); - } else { - _gmDevicePopUp->setSelected(0); - } - } + if (!loadMusicDeviceSetting(_gmDevicePopUp, "gm_device")) + _gmDevicePopUp->setSelected(0); // Multi midi setting _multiMidiCheckbox->setState(ConfMan.getBool("multi_midi", _domain)); @@ -244,14 +238,8 @@ void OptionsDialog::open() { // MT-32 options if (_mt32DevicePopUp) { - if (!loadMusicDeviceSetting(_mt32DevicePopUp, "mt32_device")) { - if (_domain.equals(Common::ConfigManager::kApplicationDomain)) { - if (!loadMusicDeviceSetting(_mt32DevicePopUp, Common::String(), MT_MT32)) - _mt32DevicePopUp->setSelected(0); - } else { - _mt32DevicePopUp->setSelected(0); - } - } + if (!loadMusicDeviceSetting(_mt32DevicePopUp, "mt32_device")) + _mt32DevicePopUp->setSelected(0); // Native mt32 setting _mt32Checkbox->setState(ConfMan.getBool("native_mt32", _domain)); -- cgit v1.2.3 From dfdf8f2e805022d8b018bd8ee2961bdea167716a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 26 Oct 2010 21:55:29 +0000 Subject: Update credits svn-id: r53862 --- gui/credits.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index 0b29bcb7e9..a2c3bd681a 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -119,6 +119,11 @@ static const char *credits[] = { "C0""Scott Thomas", "C0""Jordi Vilalta Prat", "", +"C1""Hugo", +"C0""Arnaud Boutonn\351", +"C0""Oystein Eftevaag", +"C0""Eugene Sandulenko", +"", "C1""Kyra", "C0""Torbj\366rn Andersson", "C2""VQA Player", -- cgit v1.2.3 From ff34a778318355ffba2ee5700524fccba9fe5cf3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 30 Oct 2010 21:26:32 +0000 Subject: GUI: Don't #include Mac OS X sys header here svn-id: r53960 --- gui/browser.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'gui') diff --git a/gui/browser.h b/gui/browser.h index 8dc7eda43a..1fef041a5a 100644 --- a/gui/browser.h +++ b/gui/browser.h @@ -29,10 +29,6 @@ #include "common/str.h" #include "common/fs.h" -#ifdef MACOSX -#include -#endif - namespace GUI { class ListWidget; @@ -54,7 +50,7 @@ public: protected: #ifdef MACOSX - CFStringRef _titleRef; + const void *_titleRef; #else ListWidget *_fileList; StaticTextWidget *_currentPath; -- cgit v1.2.3 From 44393b2dc8ba78342dcbb7df39eca2e9e1f6e429 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 30 Oct 2010 21:27:42 +0000 Subject: ALL: Add code to help stop people from accidentally using "bad" APIs A new header file common/forbidden.h is included by scummsys.h and it re-#defines numerous symbols like fopen(), fread(), system(), etc. with garbage, in order to provoke compile errors in any code using them. If a .cpp file really *must* use any of these (e.g. because it is a backend file), then these redefinitions can be disabled by #defining FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever this is done, an explanatory comment should be added. Note that this system cannot catch all "bad" usages (notably the Lua code in the sword25 engine), as it can only work if scummsys.h is included. svn-id: r53961 --- gui/browser_osx.mm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gui') diff --git a/gui/browser_osx.mm b/gui/browser_osx.mm index a3a09b8ed2..ea77e16c04 100644 --- a/gui/browser_osx.mm +++ b/gui/browser_osx.mm @@ -22,6 +22,9 @@ * $Id$ */ +// Disable symbol overrides so that we can use system headers +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "gui/browser.h" #include "gui/GuiManager.h" #include "gui/ListWidget.h" -- cgit v1.2.3