Author: ekohl
Date: Sat Sep 22 15:26:03 2007
New Revision: 29137
URL:
http://svn.reactos.org/svn/reactos?rev=29137&view=rev
Log:
Don't use hardcoded strings in the configuration message box. Use string resources
instead.
Added:
trunk/reactos/base/applications/screensavers/starfield/lang/ (with props)
trunk/reactos/base/applications/screensavers/starfield/lang/en-US.rc (with props)
Modified:
trunk/reactos/base/applications/screensavers/starfield/resource.h
trunk/reactos/base/applications/screensavers/starfield/screensaver.c
trunk/reactos/base/applications/screensavers/starfield/starfield.rc
Propchange: trunk/reactos/base/applications/screensavers/starfield/lang/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Sep 22 15:26:03 2007
@@ -1,0 +1,7 @@
+GNUmakefile
+*.vcproj
+*.user
+*.cbp
+*.ncb
+*.suo
+*.sln
Added: trunk/reactos/base/applications/screensavers/starfield/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/starfield/lang/en-US.rc (added)
+++ trunk/reactos/base/applications/screensavers/starfield/lang/en-US.rc Sat Sep 22
15:26:03 2007
@@ -1,0 +1,8 @@
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_DESCRIPTION "Starfield ScreenSaver"
+ IDS_TITLE "About"
+ IDS_TEXT "No options need to be set."
+END
Propchange: trunk/reactos/base/applications/screensavers/starfield/lang/en-US.rc
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/base/applications/screensavers/starfield/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/starfield/resource.h (original)
+++ trunk/reactos/base/applications/screensavers/starfield/resource.h Sat Sep 22 15:26:03
2007
@@ -1,1 +1,4 @@
-#define IDS_DESCRIPTION 1
+
+#define IDS_DESCRIPTION 1
+#define IDS_TITLE 2
+#define IDS_TEXT 3
Modified: trunk/reactos/base/applications/screensavers/starfield/screensaver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/starfield/screensaver.c (original)
+++ trunk/reactos/base/applications/screensavers/starfield/screensaver.c Sat Sep 22
15:26:03 2007
@@ -315,6 +315,27 @@
*hwndParent = 0;
}
+void Configure(void)
+{
+ TCHAR szTitle[256];
+ TCHAR szText[256];
+
+ LoadString(hInstance,
+ IDS_TITLE,
+ szTitle,
+ 256);
+
+ LoadString(hInstance,
+ IDS_TEXT,
+ szText,
+ 256);
+
+ MessageBox(0,
+ szText,
+ szTitle,
+ MB_OK | MB_ICONWARNING);
+}
+
int WINAPI WinMain (HINSTANCE hInst,
HINSTANCE hPrev,
LPSTR lpCmdLine,
@@ -343,10 +364,7 @@
case 'c':
default:
- MessageBox(0,
- _T("No options need to be set."),
- _T("About"),
- MB_OK | MB_ICONWARNING);
+ Configure();
return 0;
}
Modified: trunk/reactos/base/applications/screensavers/starfield/starfield.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
==============================================================================
--- trunk/reactos/base/applications/screensavers/starfield/starfield.rc (original)
+++ trunk/reactos/base/applications/screensavers/starfield/starfield.rc Sat Sep 22
15:26:03 2007
@@ -10,10 +10,4 @@
#include <reactos/version.rc>
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_DESCRIPTION "Starfield ScreenSaver"
-END
+#include "lang/en-US.rc"