From 9793c96f1b0afd9e6898d73012be2492e4d53be8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 15 Jun 2010 11:02:23 +0000 Subject: WINCE: sync with recent GUI changes. NOT TESTED. svn-id: r49795 --- backends/platform/wince/CEActionsPocket.cpp | 46 +++++++++++++------------ backends/platform/wince/CEActionsSmartphone.cpp | 36 ++++++++++--------- backends/platform/wince/CELauncherDialog.cpp | 10 +++--- 3 files changed, 49 insertions(+), 43 deletions(-) (limited to 'backends/platform/wince') diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp index ebe6981290..64abd0be3e 100644 --- a/backends/platform/wince/CEActionsPocket.cpp +++ b/backends/platform/wince/CEActionsPocket.cpp @@ -31,30 +31,32 @@ #include "common/config-manager.h" #include "gui/KeysDialog.h" +#include "common/translation.h" + #ifdef _WIN32_WCE #define KEY_ALL_SKIP 3457 #endif const String pocketActionNames[] = { - "Pause", - "Save", - "Quit", - "Skip", - "Hide Toolbar", - "Show Keyboard", - "Sound on/off", - "Right click", - "Show/Hide Cursor", - "Free look", - "Zoom up", - "Zoom down", - "Multi Function", - "Bind Keys", - "Cursor Up", - "Cursor Down", - "Cursor Left", - "Cursor Right", - "Left Click", + _s("Pause"), + _s("Save"), + _s("Quit"), + _s("Skip"), + _s("Hide Toolbar"), + _s("Show Keyboard"), + _s("Sound on/off"), + _s("Right click"), + _s("Show/Hide Cursor"), + _s("Free look"), + _s("Zoom up"), + _s("Zoom down"), + _s("Multi Function"), + _s("Bind Keys"), + _s("Cursor Up"), + _s("Cursor Down"), + _s("Cursor Left"), + _s("Cursor Right"), + _s("Left Click") }; void CEActionsPocket::init() { @@ -63,7 +65,7 @@ void CEActionsPocket::init() { String CEActionsPocket::actionName(GUI::ActionType action) { - return pocketActionNames[action]; + return _(pocketActionNames[action]); } int CEActionsPocket::size() { @@ -258,7 +260,7 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) { if (action == POCKET_ACTION_SAVE && ConfMan.get("gameid") == "parallaction") { // FIXME: This is a temporary solution. The engine should handle its own menus. // Note that the user can accomplish this via the virtual keyboard as well, this is just for convenience - GUI::MessageDialog alert("Do you want to load or save the game?", "Load", "Save"); + GUI::MessageDialog alert(_("Do you want to load or save the game?"), _("Load"), _("Save")); if (alert.runModal() == GUI::kMessageOK) _key_action[action].setKey(SDLK_l); else @@ -308,7 +310,7 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) { case POCKET_ACTION_QUIT: if (!quitdialog) { quitdialog = true; - GUI::MessageDialog alert(" Are you sure you want to quit ? ", "Yes", "No"); + GUI::MessageDialog alert(_(" Are you sure you want to quit ? "), _("Yes"), _("No")); if (alert.runModal() == GUI::kMessageOK) _mainSystem->quit(); quitdialog = false; diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index 47733ae317..af80bd2908 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -30,23 +30,25 @@ #include "common/config-manager.h" #include "gui/KeysDialog.h" +#include "common/translation.h" + #define KEY_ALL_SKIP 3457 const String smartphoneActionNames[] = { - "Up", - "Down", - "Left", - "Right", - "Left Click", - "Right Click", - "Save", - "Skip", - "Zone", - "Multi Function", - "Bind Keys", - "Keyboard", - "Rotate", - "Quit" + _s("Up"), + _s("Down"), + _s("Left"), + _s("Right"), + _s("Left Click"), + _s("Right Click"), + _s("Save"), + _s("Skip"), + _s("Zone"), + _s("Multi Function"), + _s("Bind Keys"), + _s("Keyboard"), + _s("Rotate"), + _s("Quit") }; const int ACTIONS_SMARTPHONE_DEFAULT[] = { SDLK_UP, SDLK_DOWN, SDLK_LEFT, SDLK_RIGHT, SDLK_F1, SDLK_F2, SDLK_F3, SDLK_ESCAPE, SDLK_9, SDLK_8, SDLK_F4, SDLK_RETURN, SDLK_5, SDLK_0 }; @@ -57,7 +59,7 @@ void CEActionsSmartphone::init() { String CEActionsSmartphone::actionName(GUI::ActionType action) { - return smartphoneActionNames[action]; + return _(smartphoneActionNames[action]); } int CEActionsSmartphone::size() { @@ -220,7 +222,7 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) { if (action == SMARTPHONE_ACTION_SAVE && ConfMan.get("gameid") == "parallaction") { // FIXME: This is a temporary solution. The engine should handle its own menus. // Note that the user can accomplish this via the virtual keyboard as well, this is just for convenience - GUI::MessageDialog alert("Do you want to load or save the game?", "Load", "Save"); + GUI::MessageDialog alert(_("Do you want to load or save the game?"), _("Load"), _("Save")); if (alert.runModal() == GUI::kMessageOK) _key_action[action].setKey(SDLK_l); else @@ -267,7 +269,7 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) { case SMARTPHONE_ACTION_QUIT: if (!quitdialog) { quitdialog = true; - GUI::MessageDialog alert(" Are you sure you want to quit ? ", "Yes", "No"); + GUI::MessageDialog alert(_(" Are you sure you want to quit ? "), _("Yes"), _("No")); if (alert.runModal() == GUI::kMessageOK) _mainSystem->quit(); quitdialog = false; diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp index 21a967336e..11e4900c2d 100644 --- a/backends/platform/wince/CELauncherDialog.cpp +++ b/backends/platform/wince/CELauncherDialog.cpp @@ -38,6 +38,8 @@ #include "common/config-manager.h" +#include "common/translation.h" + using namespace GUI; using namespace Common; @@ -51,13 +53,13 @@ public: // needs fixing, or remove it! const int buttonWidth = g_gui.xmlEval()->getVar("Globals.Button.Width", 0); const int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0); - new ButtonWidget(this, (_w - buttonWidth) / 2, 45, buttonWidth, buttonHeight, "OK", kCloseCmd, '\r'); // Close dialog - FIXME + new ButtonWidget(this, (_w - buttonWidth) / 2, 45, buttonWidth, buttonHeight, _("OK"), 0, kCloseCmd, '\r'); // Close dialog - FIXME - Common::String videoDriver("Using SDL driver "); + Common::String videoDriver(_("Using SDL driver ")); SDL_VideoDriverName(tempo, sizeof(tempo)); videoDriver += tempo; new StaticTextWidget(this, 0, 10, _w, kLineHeight, videoDriver, Graphics::kTextAlignCenter); - Common::String displayInfos("Display "); + Common::String displayInfos(_("Display ")); sprintf(tempo, "%dx%d (real %dx%d)", GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), OSystem_WINCE3::getScreenWidth(), OSystem_WINCE3::getScreenHeight()); displayInfos += tempo; new StaticTextWidget(this, 0, 20, _w, kLineHeight, displayInfos, Graphics::kTextAlignCenter); @@ -99,7 +101,7 @@ void CELauncherDialog::automaticScanDirectory(const Common::FSNode &node) { * returns some illegal paths atm. */ void CELauncherDialog::addGame() { - MessageDialog alert("Do you want to perform an automatic scan ?", "Yes", "No"); + MessageDialog alert(_("Do you want to perform an automatic scan ?"), _("Yes"), _("No")); if (alert.runModal() == kMessageOK && _browser->runModal() > 0) { // Clear existing domains ConfigManager::DomainMap &domains = (ConfigManager::DomainMap&)ConfMan.getGameDomains(); -- cgit v1.2.3