[Scummvm-cvs-logs] SF.net SVN: scummvm:[49795] scummvm/trunk/backends/platform/wince

sev at users.sourceforge.net sev at users.sourceforge.net
Tue Jun 15 13:02:23 CEST 2010


Revision: 49795
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49795&view=rev
Author:   sev
Date:     2010-06-15 11:02:23 +0000 (Tue, 15 Jun 2010)

Log Message:
-----------
WINCE: sync with recent GUI changes. NOT TESTED.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/wince/CEActionsPocket.cpp
    scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp
    scummvm/trunk/backends/platform/wince/CELauncherDialog.cpp

Modified: scummvm/trunk/backends/platform/wince/CEActionsPocket.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEActionsPocket.cpp	2010-06-15 11:01:41 UTC (rev 49794)
+++ scummvm/trunk/backends/platform/wince/CEActionsPocket.cpp	2010-06-15 11:02:23 UTC (rev 49795)
@@ -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 @@
 
 
 String CEActionsPocket::actionName(GUI::ActionType action) {
-	return pocketActionNames[action];
+	return _(pocketActionNames[action]);
 }
 
 int CEActionsPocket::size() {
@@ -258,7 +260,7 @@
 		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 @@
 	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;

Modified: scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp	2010-06-15 11:01:41 UTC (rev 49794)
+++ scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp	2010-06-15 11:02:23 UTC (rev 49795)
@@ -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 @@
 
 
 String CEActionsSmartphone::actionName(GUI::ActionType action) {
-	return smartphoneActionNames[action];
+	return _(smartphoneActionNames[action]);
 }
 
 int CEActionsSmartphone::size() {
@@ -220,7 +222,7 @@
 			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 @@
 		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;

Modified: scummvm/trunk/backends/platform/wince/CELauncherDialog.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CELauncherDialog.cpp	2010-06-15 11:01:41 UTC (rev 49794)
+++ scummvm/trunk/backends/platform/wince/CELauncherDialog.cpp	2010-06-15 11:02:23 UTC (rev 49795)
@@ -38,6 +38,8 @@
 
 #include "common/config-manager.h"
 
+#include "common/translation.h"
+
 using namespace GUI;
 using namespace Common;
 
@@ -51,13 +53,13 @@
 		// 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 @@
  * 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();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list