Author: cfinck
Date: Thu Jan 29 22:30:04 2015
New Revision: 66116
URL:
http://svn.reactos.org/svn/reactos?rev=66116&view=rev
Log:
[WELCOME]
- Apply parts of the welcome.c part from r62439 to this branch. Compared to CLT2014,
remove the code for handling <msg>, we don't need it anymore.
This change should go into Trunk if it works well :)
- Create a new French resource file out of the English one to let Hermès translate it to
French.
Added:
branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/lang/fr-FR.rc
- copied, changed from r66115,
branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/lang/en-US.rc
Modified:
branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/welcome.c
branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/welcome.rc
Copied: branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/lang/fr-FR.rc (from
r66115, branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/lang/en-US.rc)
URL:
http://svn.reactos.org/svn/reactos/branches/ReactOS-0.3.17-FOSDEM2015/react…
==============================================================================
---
branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/lang/en-US.rc [iso-8859-1]
(original)
+++
branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/lang/fr-FR.rc [iso-8859-1]
Thu Jan 29 22:30:04 2015
@@ -1,4 +1,4 @@
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
/* String Tables */
Modified: branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/welcome.c
URL:
http://svn.reactos.org/svn/reactos/branches/ReactOS-0.3.17-FOSDEM2015/react…
==============================================================================
--- branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/welcome.c [iso-8859-1]
(original)
+++ branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/welcome.c [iso-8859-1]
Thu Jan 29 22:30:04 2015
@@ -34,6 +34,7 @@
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
+#include <shellapi.h>
#include <reactos/version.h>
#include <tchar.h>
#include <winnls.h>
@@ -46,6 +47,7 @@
#define TITLE_WIDTH 480
#define TITLE_HEIGHT 93
+#define TOPIC_DESC_LENGTH 1024
/* GLOBALS ******************************************************************/
@@ -248,15 +250,11 @@
static BOOL
RunApplication(int nTopic)
{
- PROCESS_INFORMATION ProcessInfo;
- STARTUPINFO StartupInfo;
- TCHAR AppName[256];
- TCHAR CurrentDir[256];
+ TCHAR AppName[512];
+ TCHAR Parameters[2];
int nLength;
InvalidateRect(hwndMain, NULL, TRUE);
-
- GetCurrentDirectory(256, CurrentDir);
nLength = LoadString(hInstance, IDS_TOPICACTION0 + nTopic, AppName, 256);
if (nLength == 0)
@@ -266,24 +264,11 @@
return FALSE;
if (_tcsicmp(AppName, TEXT("explorer.exe")) == 0)
- {
- _tcscat(AppName, TEXT(" "));
- _tcscat(AppName, CurrentDir);
- }
-
- ZeroMemory(&StartupInfo, sizeof(StartupInfo));
- StartupInfo.cb = sizeof(StartupInfo);
- StartupInfo.lpTitle = TEXT("Test");
- StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
- StartupInfo.wShowWindow = SW_SHOWNORMAL;
-
- CreateProcess(NULL, AppName, NULL, NULL, FALSE, CREATE_NEW_CONSOLE,NULL,
- CurrentDir,
- &StartupInfo,
- &ProcessInfo);
-
- CloseHandle(ProcessInfo.hProcess);
- CloseHandle(ProcessInfo.hThread);
+ _tcscpy(Parameters, TEXT("\\"));
+ else
+ *Parameters = 0;
+
+ ShellExecute(NULL, NULL, AppName, Parameters, NULL, SW_SHOWDEFAULT);
return TRUE;
}
@@ -531,7 +516,7 @@
HFONT hOldFont;
RECT rcTitle, rcDescription;
TCHAR szTopicTitle[80];
- TCHAR szTopicDesc[256];
+ TCHAR szTopicDesc[TOPIC_DESC_LENGTH];
int nLength;
BITMAP bmpInfo;
TCHAR version[50];
@@ -615,13 +600,13 @@
if (nTopic == -1)
{
- nLength = LoadString(hInstance, IDS_DEFAULTTOPICDESC, szTopicDesc, 256);
+ nLength = LoadString(hInstance, IDS_DEFAULTTOPICDESC, szTopicDesc,
TOPIC_DESC_LENGTH);
}
else
{
- nLength = LoadString(hInstance, IDS_TOPICDESC0 + nTopic, szTopicDesc, 256);
+ nLength = LoadString(hInstance, IDS_TOPICDESC0 + nTopic, szTopicDesc,
TOPIC_DESC_LENGTH);
if (nLength == 0)
- nLength = LoadString(hInstance, IDS_DEFAULTTOPICDESC, szTopicDesc, 256);
+ nLength = LoadString(hInstance, IDS_DEFAULTTOPICDESC, szTopicDesc,
TOPIC_DESC_LENGTH);
}
SetBkMode(hdc, TRANSPARENT);
Modified: branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/welcome.rc
URL:
http://svn.reactos.org/svn/reactos/branches/ReactOS-0.3.17-FOSDEM2015/react…
==============================================================================
--- branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/welcome.rc [iso-8859-1]
(original)
+++ branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/setup/welcome/welcome.rc [iso-8859-1]
Thu Jan 29 22:30:04 2015
@@ -51,3 +51,6 @@
#ifdef LANGUAGE_EN_US
#include "lang/en-US.rc"
#endif
+#ifdef LANGUAGE_FR_FR
+ #include "lang/fr-FR.rc"
+#endif