Author: gschneider
Date: Tue May 17 18:32:51 2011
New Revision: 51811
URL:
http://svn.reactos.org/svn/reactos?rev=51811&view=rev
Log:
[msconfig/freeldr]
- Load freeldr.ini first chance, boot.ini on second chance
- Make freeldr list box scrollable
- Fix some FIXME's
[msgconfig/system]
- Implement parsing and displaying system.ini contents
See issue #1986 for more details.
Modified:
trunk/reactos/base/applications/msconfig/freeldrpage.c
trunk/reactos/base/applications/msconfig/lang/bg-BG.rc
trunk/reactos/base/applications/msconfig/lang/ca-ES.rc
trunk/reactos/base/applications/msconfig/lang/cs-CZ.rc
trunk/reactos/base/applications/msconfig/lang/de-DE.rc
trunk/reactos/base/applications/msconfig/lang/el-GR.rc
trunk/reactos/base/applications/msconfig/lang/en-US.rc
trunk/reactos/base/applications/msconfig/lang/es-ES.rc
trunk/reactos/base/applications/msconfig/lang/fr-FR.rc
trunk/reactos/base/applications/msconfig/lang/hu-HU.rc
trunk/reactos/base/applications/msconfig/lang/id-ID.rc
trunk/reactos/base/applications/msconfig/lang/it-IT.rc
trunk/reactos/base/applications/msconfig/lang/ko-KR.rc
trunk/reactos/base/applications/msconfig/lang/nl-NL.rc
trunk/reactos/base/applications/msconfig/lang/no-NO.rc
trunk/reactos/base/applications/msconfig/lang/pl-PL.rc
trunk/reactos/base/applications/msconfig/lang/pt-BR.rc
trunk/reactos/base/applications/msconfig/lang/ro-RO.rc
trunk/reactos/base/applications/msconfig/lang/ru-RU.rc
trunk/reactos/base/applications/msconfig/lang/sk-SK.rc
trunk/reactos/base/applications/msconfig/lang/sv-SE.rc
trunk/reactos/base/applications/msconfig/lang/th-TH.rc
trunk/reactos/base/applications/msconfig/lang/uk-UA.rc
trunk/reactos/base/applications/msconfig/lang/zh-CN.rc
trunk/reactos/base/applications/msconfig/systempage.c
Modified: trunk/reactos/base/applications/msconfig/freeldrpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/freeldrpage.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/freeldrpage.c [iso-8859-1] Tue May 17
18:32:51 2011
@@ -1,10 +1,10 @@
/*
* PROJECT: ReactOS Applications
* LICENSE: LGPL - See COPYING in the top level directory
- * FILE: base/applications/freeldrpage.c
+ * FILE: base/applications/msconfig/freeldrpage.c
* PURPOSE: Freeloader configuration page message handler
* COPYRIGHT: Copyright 2005-2006 Christoph von Wittich <Christoph(a)ApiViewer.de>
- *
+ * 2011 Gregor Schneider
<Gregor.Schneider(a)reactos.org>
*/
#include <precomp.h>
@@ -23,100 +23,111 @@
static FREELDR_SETTINGS Settings = { 0, { 0, }, 0, 0, FALSE };
+#define BUFFER_SIZE 512
-BOOL
-LoadBootIni(WCHAR * szDrive, HWND hDlg)
+static BOOL
+LoadBootIni(WCHAR *szDrive, HWND hDlg)
{
- WCHAR szBuffer[512];
- HWND hDlgCtrl;
- FILE * file;
- UINT length;
- LRESULT pos;
+ WCHAR szBuffer[BUFFER_SIZE];
+ HWND hDlgCtrl;
+ FILE * file;
+ UINT length;
+ LRESULT pos;
- wcscpy(szBuffer, szDrive);
- wcscat(szBuffer, L"boot.ini");
-
- file = _wfopen(szBuffer, L"rt");
- if (!file)
- return FALSE;
-
- hDlgCtrl = GetDlgItem(hDlg, IDC_LIST_BOX);
+ wcscpy(szBuffer, szDrive);
+ wcscat(szBuffer, L"freeldr.ini");
- while(!feof(file))
- {
- if (fgetws(szBuffer, sizeof(szBuffer) / sizeof(WCHAR), file))
+ file = _wfopen(szBuffer, L"rt");
+ if (!file)
+ {
+ wcscpy(szBuffer, szDrive);
+ wcscat(szBuffer, L"boot.ini");
+ file = _wfopen(szBuffer, L"rt");
+ if (!file)
+ return FALSE;
+ }
+
+ hDlgCtrl = GetDlgItem(hDlg, IDC_LIST_BOX);
+
+ while(!feof(file))
+ {
+ if (fgetws(szBuffer, BUFFER_SIZE, file))
{
length = wcslen(szBuffer);
- while(szBuffer[length] < 14) //FIXME remove line feeds
- szBuffer[length--] = 0;
+ if (length > 1)
+ {
+ szBuffer[length] = L'\0';
+ szBuffer[length - 1] = L'\0';
- pos = SendMessageW(hDlgCtrl, LB_ADDSTRING, 0, (LPARAM)szBuffer);
+ pos = SendMessageW(hDlgCtrl, LB_ADDSTRING, 0, (LPARAM)szBuffer);
+ if (szBuffer[0] == L'[')
+ continue;
- if (szBuffer[0] == L'[')
- continue;
+ if (!wcsncmp(szBuffer, L"timeout=", 8))
+ {
+ Settings.TimeOut = _wtoi(&szBuffer[8]);
+ continue;
+ }
- if (!wcsncmp(szBuffer, L"timeout=", 8))
- {
- Settings.TimeOut = _wtoi(&szBuffer[8]);
- continue;
+ if (!wcsncmp(szBuffer, L"default=", 8))
+ {
+ wcscpy(Settings.szDefaultOS, &szBuffer[8]);
+ continue;
+ }
+ if (pos != LB_ERR)
+ SendMessage(hDlgCtrl, LB_SETITEMDATA, pos, 1); // indicate that this
item is an boot entry
+ Settings.OSConfigurationCount++;
}
+ }
+ }
- if (!wcsncmp(szBuffer, L"default=", 8))
- {
- wcscpy(Settings.szDefaultOS, &szBuffer[8]);
- continue;
- }
- if (pos != LB_ERR)
- SendMessage(hDlgCtrl, LB_SETITEMDATA, pos, 1); // indicate that this item
is an boot entry
- Settings.OSConfigurationCount++;
- }
- }
+ fclose(file);
+ Settings.UseBootIni = TRUE;
- fclose(file);
- Settings.UseBootIni = TRUE;
-
- pos = SendMessageW(hDlgCtrl, LB_FINDSTRING, 3, (LPARAM)Settings.szDefaultOS);
- if (pos != LB_ERR)
- {
+ pos = SendMessageW(hDlgCtrl, LB_FINDSTRING, 3, (LPARAM)Settings.szDefaultOS);
+ if (pos != LB_ERR)
+ {
Settings.szDefaultPos = pos;
SendMessage(hDlgCtrl, LB_SETCURSEL, pos, 0);
- }
+ }
- SetDlgItemInt(hDlg, IDC_TXT_BOOT_TIMEOUT, Settings.TimeOut, FALSE);
- if (Settings.OSConfigurationCount < 2)
- {
+ SetDlgItemInt(hDlg, IDC_TXT_BOOT_TIMEOUT, Settings.TimeOut, FALSE);
+ if (Settings.OSConfigurationCount < 2)
+ {
EnableWindow(GetDlgItem(hDlg, IDC_BTN_SET_DEFAULT_BOOT), FALSE);
EnableWindow(GetDlgItem(hDlg, IDC_BTN_MOVE_UP_BOOT_OPTION), FALSE);
EnableWindow(GetDlgItem(hDlg, IDC_BTN_MOVE_DOWN_BOOT_OPTION), FALSE);
- }
- return TRUE;
+ }
+ return TRUE;
}
+static BOOL
+InitializeFreeLDRDialog(HWND hDlg)
+{
+ WCHAR winDir[PATH_MAX];
+ WCHAR* ptr = NULL;
-BOOL
-InitializeDialog(HWND hDlg)
-{
- // FIXME
- // find real boot drive and handle freeldr configuration ini
- return LoadBootIni(L"C:\\", hDlg);
+ GetWindowsDirectoryW(winDir, PATH_MAX);
+ ptr = wcschr(winDir, L'\\');
+ if (ptr == NULL)
+ {
+ return FALSE;
+ }
+ ptr[1] = L'\0';
+ return LoadBootIni(winDir, hDlg);
}
-
-
INT_PTR CALLBACK
FreeLdrPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
LRESULT pos;
- UNREFERENCED_PARAMETER(lParam);
- UNREFERENCED_PARAMETER(wParam);
-
switch (message) {
case WM_INITDIALOG:
hFreeLdrDialog = hDlg;
SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER |
SWP_NOSIZE | SWP_NOZORDER);
- InitializeDialog(hDlg);
+ InitializeFreeLDRDialog(hDlg);
return TRUE;
case WM_COMMAND:
switch(HIWORD(wParam))
Modified: trunk/reactos/base/applications/msconfig/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/bg-BG.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -78,7 +78,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Ïðîâåðêà íà âñè÷êè ïóñêîâè ïúòèùà",
IDC_BTN_CHECK_BOOT_PATH, 5, 65, 129, 12
PUSHBUTTON "&Íàïðàâè ïîäðàçáðàíî", IDC_BTN_SET_DEFAULT_BOOT, 135, 65,
78, 12
PUSHBUTTON "Ïðåìåñòè íà&ãîðå", IDC_BTN_MOVE_UP_BOOT_OPTION, 213, 65,
66, 12
Modified: trunk/reactos/base/applications/msconfig/lang/ca-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/ca-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/ca-ES.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -77,7 +77,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Prova camins d'arrencada", IDC_BTN_CHECK_BOOT_PATH,
10, 65, 70, 12
PUSHBUTTON "&Fes-ho per defecte", IDC_BTN_SET_DEFAULT_BOOT, 100, 65,
70, 12
PUSHBUTTON "P&uja", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/cs-CZ.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -83,7 +83,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Kontrola cest sputìní", IDC_BTN_CHECK_BOOT_PATH, 10,
65, 77, 12
PUSHBUTTON "&Nastavit jako výchozí", IDC_BTN_SET_DEFAULT_BOOT, 100,
65, 75, 12
PUSHBUTTON "Posunout N&ahoru", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65,
70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/de-DE.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -78,7 +78,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Alle Bootpfade überprüfen", IDC_BTN_CHECK_BOOT_PATH, 10,
65, 90, 12
PUSHBUTTON "A&ls Standard", IDC_BTN_SET_DEFAULT_BOOT, 120, 65, 63,
12
PUSHBUTTON "Nach &oben", IDC_BTN_MOVE_UP_BOOT_OPTION, 203, 65, 63,
12
Modified: trunk/reactos/base/applications/msconfig/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/el-GR.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -77,7 +77,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Check All Boot Paths", IDC_BTN_CHECK_BOOT_PATH, 10, 65,
70, 12
PUSHBUTTON "&Set as Default", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70,
12
PUSHBUTTON "Move &Up", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/en-US.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -77,7 +77,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Check All Boot Paths", IDC_BTN_CHECK_BOOT_PATH, 10, 65,
70, 12
PUSHBUTTON "&Set as Default", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70,
12
PUSHBUTTON "Move &Up", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/es-ES.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -77,7 +77,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Verificar las rutas de Arranque",
IDC_BTN_CHECK_BOOT_PATH, 10, 65, 110, 12
PUSHBUTTON "&Configurar por Defecto", IDC_BTN_SET_DEFAULT_BOOT, 130,
65, 80, 12
PUSHBUTTON "Mover &Arriba", IDC_BTN_MOVE_UP_BOOT_OPTION, 220, 65, 60,
12
Modified: trunk/reactos/base/applications/msconfig/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/fr-FR.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -77,7 +77,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Vérifier les chemins de démarrage",
IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12
PUSHBUTTON "&Par Défaut", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12
PUSHBUTTON "&Monter", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/hu-HU.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -79,7 +79,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Check All Boot Paths", IDC_BTN_CHECK_BOOT_PATH, 10, 65,
70, 12
PUSHBUTTON "&Set as Default", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70,
12
PUSHBUTTON "Move &Up", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/id-ID.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -77,7 +77,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "Periksa Se&mua Path Boot", IDC_BTN_CHECK_BOOT_PATH, 10,
65, 70, 12
PUSHBUTTON "&Set sebagai Standar", IDC_BTN_SET_DEFAULT_BOOT, 100, 65,
70, 12
PUSHBUTTON "&Naik", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/it-IT.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -77,7 +77,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 3, 2, 354, 58,
0x00000200
+ LISTBOX IDC_LIST_BOX, 3, 2, 354, 58, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "Ve&rifica percorsi di avvio", IDC_BTN_CHECK_BOOT_PATH, 3,
64, 85, 14
PUSHBUTTON "&Imposta come predefinito", IDC_BTN_SET_DEFAULT_BOOT, 93,
64, 85, 14
PUSHBUTTON "&Sposta su", IDC_BTN_MOVE_UP_BOOT_OPTION, 183, 64, 85,
14
Modified: trunk/reactos/base/applications/msconfig/lang/ko-KR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/ko-KR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/ko-KR.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -80,7 +80,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "¸ðµç ºÎÆðæ·Î Á¡°Ë(&C)", IDC_BTN_CHECK_BOOT_PATH, 10, 65,
70, 12
PUSHBUTTON "±âº»°ªÀ¸·Î ¼³Á¤(&S)", IDC_BTN_SET_DEFAULT_BOOT, 100, 65,
70, 12
PUSHBUTTON "À§·Î ¿òÁ÷À̱â(&U)", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65,
70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/nl-NL.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -97,7 +97,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Alle opstartpaden controleren", IDC_BTN_CHECK_BOOT_PATH,
10, 65, 70, 12
PUSHBUTTON "Als stan&daard instellen", IDC_BTN_SET_DEFAULT_BOOT, 100,
65, 70, 12
PUSHBUTTON "&Omhoog", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/no-NO.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -77,7 +77,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Sjekk oppstartsbaner", IDC_BTN_CHECK_BOOT_PATH, 10, 65,
75, 12
PUSHBUTTON "&Sett som standard", IDC_BTN_SET_DEFAULT_BOOT, 100, 65,
70, 12
PUSHBUTTON "Flytt &opp", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70,
12
Modified: trunk/reactos/base/applications/msconfig/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/pl-PL.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -83,7 +83,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Sprawd wszystkie cie¿ki rozruchu",
IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12
PUSHBUTTON "&Ustaw jako domylne", IDC_BTN_SET_DEFAULT_BOOT, 100, 65,
70, 12
PUSHBUTTON "Przenie w &górê", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65,
70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/pt-BR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/pt-BR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/pt-BR.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -83,7 +83,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "Verificar camin&hos de inicialização",
IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12
PUSHBUTTON "&Definir como padrão", IDC_BTN_SET_DEFAULT_BOOT, 100, 65,
70, 12
PUSHBUTTON "Mo&ver para cima", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65,
70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/ro-RO.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -77,7 +77,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Verificare toate cãile de pornire",
IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12
PUSHBUTTON "&Setare implicit", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70,
12
PUSHBUTTON "În &sus", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/ru-RU.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -79,7 +79,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Ïðîâåðèòü âñå ïóòè çàãðóçêè", IDC_BTN_CHECK_BOOT_PATH,
10, 65, 110, 12
PUSHBUTTON "Ï&î óìîë÷àíèþ", IDC_BTN_SET_DEFAULT_BOOT, 125, 65, 70,
12
PUSHBUTTON "&Ââåðõ", IDC_BTN_MOVE_UP_BOOT_OPTION, 200, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/sk-SK.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -81,7 +81,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "S&kontrolova vetky cesty zavedenia",
IDC_BTN_CHECK_BOOT_PATH, 10, 65, 130, 12
PUSHBUTTON "&Predvoli", IDC_BTN_SET_DEFAULT_BOOT, 145, 65, 60, 12
PUSHBUTTON "Posunú na&hor", IDC_BTN_MOVE_UP_BOOT_OPTION, 210, 65,
70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/sv-SE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/sv-SE.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -83,7 +83,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Undersök alla bootvägar", IDC_BTN_CHECK_BOOT_PATH, 10,
65, 75, 12
PUSHBUTTON "&Sätt som standard", IDC_BTN_SET_DEFAULT_BOOT, 100, 65,
70, 12
PUSHBUTTON "Flytta &upp", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70,
12
Modified: trunk/reactos/base/applications/msconfig/lang/th-TH.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/th-TH.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/th-TH.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -97,7 +97,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&µÃǨ¡ÒûÅØ¡à¤Ã×èͧ·Ø¡àÊé¹·Ò§", IDC_BTN_CHECK_BOOT_PATH,
10, 65, 70, 12
PUSHBUTTON "&µÑ駤èÒâ´Â»ÃÔÂÒÂ", IDC_BTN_SET_DEFAULT_BOOT, 100, 65,
70, 12
PUSHBUTTON "à¤Å×è͹·Õè &¢Öé¹", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65,
70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/uk-UA.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -85,7 +85,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&Âèáðàòè âñ³ øëÿõè", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70,
12
PUSHBUTTON "&Âñòàíîâèòè ñòàíäàðòíî", IDC_BTN_SET_DEFAULT_BOOT, 92,
65, 88, 12
PUSHBUTTON "Ïåðåì³ñòèòè Ââ&åðõ", IDC_BTN_MOVE_UP_BOOT_OPTION, 190,
65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/lang/zh-CN.rc [iso-8859-1] Tue May 17
18:32:51 2011
@@ -97,7 +97,7 @@
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50,
0x00000200
+ LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "¼ì²éËùÓÐÆô¶¯Â·¾¶(&C)", IDC_BTN_CHECK_BOOT_PATH, 10, 65,
80, 12
PUSHBUTTON "ÉèΪĬÈÏ(&S)", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12
PUSHBUTTON "ÉÏÒÆ(&U)", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
Modified: trunk/reactos/base/applications/msconfig/systempage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/systempage.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/msconfig/systempage.c [iso-8859-1] Tue May 17 18:32:51
2011
@@ -1,15 +1,80 @@
/*
* PROJECT: ReactOS Applications
* LICENSE: LGPL - See COPYING in the top level directory
- * FILE: base/applications/systempage.c
+ * FILE: base/applications/msconfig/systempage.c
* PURPOSE: System page message handler
* COPYRIGHT: Copyright 2005-2006 Christoph von Wittich <Christoph(a)ApiViewer.de>
- *
+ * 2011 Gregor Schneider
<Gregor.Schneider(a)reactos.org>
*/
#include <precomp.h>
HWND hSystemPage;
HWND hSystemDialog;
+
+#define BUFFER_SIZE 512
+
+static BOOL
+LoadSystemIni(WCHAR * szPath, HWND hDlg)
+{
+ WCHAR szBuffer[BUFFER_SIZE];
+ HWND hDlgCtrl;
+ HTREEITEM parent = NULL;
+ FILE* file;
+ UINT length;
+ TVINSERTSTRUCT insert;
+
+ wcscpy(szBuffer, szPath);
+ wcscat(szBuffer, L"\\system.ini");
+
+ file = _wfopen(szBuffer, L"rt");
+ if (!file)
+ return FALSE;
+
+ hDlgCtrl = GetDlgItem(hDlg, IDC_SYSTEM_TREE);
+
+ while(!feof(file))
+ {
+ if (fgetws(szBuffer, BUFFER_SIZE, file))
+ {
+ length = wcslen(szBuffer);
+ if (length > 1)
+ {
+ szBuffer[length] = L'\0';
+ szBuffer[length - 1] = L'\0';
+ insert.hInsertAfter = TVI_LAST;
+ insert.item.mask = TVIF_TEXT;
+ insert.item.pszText = szBuffer;
+
+ if (szBuffer[0] == L';' || szBuffer[0] == L'[')
+ {
+ /* Parent */
+ insert.hParent = NULL;
+ parent = TreeView_InsertItem(hDlgCtrl, &insert);
+ }
+ else
+ {
+ /* Child */
+ insert.hParent = parent;
+ TreeView_InsertItem(hDlgCtrl, &insert);
+ }
+ }
+ }
+ }
+
+ fclose(file);
+
+ return TRUE;
+}
+
+static BOOL
+InitializeSystemDialog(HWND hDlg)
+{
+ WCHAR winDir[PATH_MAX];
+
+ GetWindowsDirectoryW(winDir, PATH_MAX);
+ return LoadSystemIni(winDir, hDlg);
+}
+
INT_PTR CALLBACK
SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
@@ -21,6 +86,7 @@
{
hSystemDialog = hDlg;
SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER |
SWP_NOSIZE | SWP_NOZORDER);
+ InitializeSystemDialog(hDlg);
return TRUE;
}
}