Author: dchapyshev
Date: Sun Jun 1 07:52:18 2008
New Revision: 33800
URL:
http://svn.reactos.org/svn/reactos?rev=33800&view=rev
Log:
- Move layouts to lang headers
- Other small changes
Modified:
trunk/reactos/base/setup/usetup/lang/bg-BG.h
trunk/reactos/base/setup/usetup/lang/cs-CZ.h
trunk/reactos/base/setup/usetup/lang/de-DE.h
trunk/reactos/base/setup/usetup/lang/el-GR.h
trunk/reactos/base/setup/usetup/lang/en-US.h
trunk/reactos/base/setup/usetup/lang/es-ES.h
trunk/reactos/base/setup/usetup/lang/fr-FR.h
trunk/reactos/base/setup/usetup/lang/it-IT.h
trunk/reactos/base/setup/usetup/lang/lt-LT.h
trunk/reactos/base/setup/usetup/lang/pl-PL.h
trunk/reactos/base/setup/usetup/lang/ru-RU.h
trunk/reactos/base/setup/usetup/lang/sk-SK.h
trunk/reactos/base/setup/usetup/lang/sv-SE.h
trunk/reactos/base/setup/usetup/lang/uk-UA.h
trunk/reactos/base/setup/usetup/mui.c
trunk/reactos/base/setup/usetup/mui.h
trunk/reactos/base/setup/usetup/muilanguages.h
trunk/reactos/base/setup/usetup/settings.c
Modified: trunk/reactos/base/setup/usetup/lang/bg-BG.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/bg-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/bg-BG.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/bg-BG.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,12 @@
#ifndef LANG_BG_BG_H__
#define LANG_BG_BG_H__
+
+MUI_LAYOUTS bgBGLayouts[] =
+{
+ { L"0402", L"00000402" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY bgBGLanguagePageEntries[] =
{
@@ -1079,7 +1086,7 @@
{
6,
8,
- "᪠⥠¤ ᬥ¨â¥ ª« ¢¨ âãà â ¯®¤à¥¤¡ .",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/cs-CZ.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/cs-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/cs-CZ.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/cs-CZ.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -7,6 +7,13 @@
#ifndef LANG_CS_CZ_H__
#define LANG_CS_CZ_H__
+MUI_LAYOUTS csCZLayouts[] =
+{
+ { L"0405", L"00000405" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
+
static MUI_ENTRY csCZLanguagePageEntries[] =
{
{
@@ -1078,7 +1085,7 @@
{
6,
8,
- "Chcete zmØnit rozlo§en¡ kl ves, kter bude nainstalov no.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/de-DE.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/de-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/de-DE.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/de-DE.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,12 @@
#ifndef LANG_DE_DE_H__
#define LANG_DE_DE_H__
+
+MUI_LAYOUTS deDELayouts[] =
+{
+ { L"0407", L"00000407" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY deDELanguagePageEntries[] =
{
@@ -1072,7 +1079,7 @@
{
6,
8,
- "Sie wollen das Tastaturlayout ndern, der installiert wird.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/el-GR.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/el-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/el-GR.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/el-GR.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,12 @@
#ifndef LANG_EL_GR_H__
#define LANG_EL_GR_H__
+
+MUI_LAYOUTS elGRLayouts[] =
+{
+ { L"0408", L"00000408" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY elGRLanguagePageEntries[] =
{
@@ -1101,7 +1108,7 @@
{
6,
8,
- "⢫ ¤ ¢¢á¥« «¤ á«¥ «¦¬ §¢¡«¨¦¢¦å¦¬ §¦¬
¡«©«å.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/en-US.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/en-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/en-US.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/en-US.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,11 @@
#ifndef LANG_EN_US_H__
#define LANG_EN_US_H__
+
+MUI_LAYOUTS enUSLayouts[] =
+{
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY enUSLanguagePageEntries[] =
{
@@ -1072,7 +1078,7 @@
{
6,
8,
- "You want to change the keyboard layout to be installed.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/es-ES.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/es-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/es-ES.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/es-ES.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,12 @@
#ifndef LANG_ES_ES_H__
#define LANG_ES_ES_H__
+
+MUI_LAYOUTS esESLayouts[] =
+{
+ { L"040A", L"0000040A" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY esESLanguagePageEntries[] =
{
@@ -1072,7 +1079,7 @@
{
6,
8,
- "Desea cambiar la disposici¢n del teclado a instalar.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/fr-FR.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/fr-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/fr-FR.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/fr-FR.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,12 @@
#ifndef LANG_FR_FR_H__
#define LANG_FR_FR_H__
+
+MUI_LAYOUTS frFRLayouts[] =
+{
+ { L"040C", L"0000040C" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY frFRLanguagePageEntries[] =
{
@@ -1084,7 +1091,7 @@
{
6,
8,
- "Vous voulez changer la disposition du clavier.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/it-IT.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/it-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/it-IT.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/it-IT.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,12 @@
#ifndef LANG_IT_IT_H__
#define LANG_IT_IT_H__
+
+MUI_LAYOUTS itITLayouts[] =
+{
+ { L"0410", L"00000410" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY itITLanguagePageEntries[] =
{
@@ -1072,7 +1079,7 @@
{
6,
8,
- "Volete cambiare il tipo di layout di tastiera da installare.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/lt-LT.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/lt-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/lt-LT.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/lt-LT.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -10,6 +10,13 @@
#ifndef LANG_LT_LT_H__
#define LANG_LT_LT_H__
+MUI_LAYOUTS ltLTLayouts[] =
+{
+ { L"0427", L"00000427" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
+
static MUI_ENTRY ltLTLanguagePageEntries[] =
{
{
@@ -1081,7 +1088,7 @@
{
6,
8,
- "You want to change the keyboard layout to be installed.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/pl-PL.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/pl-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/pl-PL.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/pl-PL.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -8,6 +8,14 @@
#ifndef LANG_PL_PL_H__
#define LANG_PL_PL_H__
+MUI_LAYOUTS plPLLayouts[] =
+{
+ { L"0415", L"00000415" },
+ { L"0415", L"00010415" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
+
static MUI_ENTRY plPLLanguagePageEntries[] =
{
{
@@ -1079,7 +1087,7 @@
{
6,
8,
- "Chcesz zmieni ukad klawiatury, jaki ma by zainstalowany.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/ru-RU.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/ru-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/ru-RU.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/ru-RU.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,12 @@
#ifndef LANG_RU_RU_H__
#define LANG_RU_RU_H__
+
+MUI_LAYOUTS ruRULayouts[] =
+{
+ { L"0419", L"00000419" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY ruRULanguagePageEntries[] =
{
@@ -1072,7 +1079,7 @@
{
6,
8,
- "ë¡®à ãáâ ¢«¨¢ ¥¬®© à ᪫ ¤ª¨ ª« ¢¨ âãàë.",
+ "®¦ «ã©á⠢롥à¨â¥ à ᪫ ¤ªã, ª®â®à ï ¡ã¤¥â ãáâ ®¢«¥ ¯®
㬮«ç ¨î.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/sk-SK.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/sk-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/sk-SK.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/sk-SK.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -7,6 +7,13 @@
#ifndef LANG_SK_SK_H__
#define LANG_SK_SK_H__
+MUI_LAYOUTS skSKLayouts[] =
+{
+ { L"041B", L"0000041B" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
+
static MUI_ENTRY skSKLanguagePageEntries[] =
{
{
@@ -1079,7 +1086,7 @@
{
6,
8,
- "Chcete zmeni rozlo§enie kl vesnice, ktor m by nainçtalovan.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/sv-SE.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/sv-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/sv-SE.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/sv-SE.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,12 @@
#ifndef LANG_SV_SE_H__
#define LANG_SV_SE_H__
+
+MUI_LAYOUTS svSELayouts[] =
+{
+ { L"041D", L"0000041D" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY svSELanguagePageEntries[] =
{
@@ -1072,7 +1079,7 @@
{
6,
8,
- "You want to change the keyboard layout to be installed.",
+ "Please select a layout to be installed by default.",
TEXT_STYLE_NORMAL
},
{
Modified: trunk/reactos/base/setup/usetup/lang/uk-UA.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/uk-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/uk-UA.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/uk-UA.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -1,5 +1,12 @@
#ifndef LANG_UK_UA_H__
#define LANG_UK_UA_H__
+
+MUI_LAYOUTS ukUALayouts[] =
+{
+ { L"0422", L"00000422" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
static MUI_ENTRY ukUALanguagePageEntries[] =
{
Modified: trunk/reactos/base/setup/usetup/mui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/mui.c?re…
==============================================================================
--- trunk/reactos/base/setup/usetup/mui.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/mui.c [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -109,7 +109,14 @@
MUIDefaultKeyboardLayout(VOID)
{
ULONG lngIndex = max(FindLanguageIndex(), 0);
- return LanguageList[lngIndex].LanguageKeyboardLayoutID;
+ return LanguageList[lngIndex].MuiLayouts[0].LayoutID;
+}
+
+const MUI_LAYOUTS *
+MUIGetLayoutsList(VOID)
+{
+ ULONG lngIndex = max(FindLanguageIndex(), 0);
+ return LanguageList[lngIndex].MuiLayouts;
}
VOID
@@ -286,16 +293,21 @@
return TRUE;
}
-static BOOLEAN
-AddKbLayoutsToRegistry(IN LPCWSTR DefKbLayout, IN LPCWSTR SecKbLayout)
+BOOLEAN
+AddKbLayoutsToRegistry(IN const MUI_LAYOUTS * MuiLayouts)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
UNICODE_STRING ValueName;
HANDLE KeyHandle;
+ HANDLE SubKeyHandle;
NTSTATUS Status;
ULONG Disposition;
+ ULONG uIndex = 0;
+ ULONG uCount = 0;
WCHAR szKeyName[48] = L"\\Registry\\User\\.DEFAULT\\Keyboard Layout";
+ WCHAR szValueName[3 + 1];
+ WCHAR szLangID[8 + 1];
// Open the keyboard layout key
RtlInitUnicodeString(&KeyName,
@@ -352,50 +364,100 @@
return FALSE;
}
- /* Set def keyboard layout */
- RtlInitUnicodeString(&ValueName,
- L"1");
-
- Status = NtSetValueKey(KeyHandle,
- &ValueName,
- 0,
- REG_SZ,
- (PVOID)DefKbLayout,
- (8 + 1) * sizeof(WCHAR));
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
- NtClose(KeyHandle);
- return FALSE;
- }
-
- if (SecKbLayout != NULL)
- {
- /* Set second keyboard layout */
- RtlInitUnicodeString(&ValueName,
- L"2");
-
- Status = NtSetValueKey(KeyHandle,
- &ValueName,
- 0,
- REG_SZ,
- (PVOID)SecKbLayout,
- (8 + 1) * sizeof(WCHAR));
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
- NtClose(KeyHandle);
- return FALSE;
- }
-
- /*
- Switching input languages - Ctrl + Shift
- Switching keyboard layouts - Left Alt + Shift
- */
+ RtlInitUnicodeString(&KeyName, L"\\Registry\\User\\.DEFAULT\\Keyboard
Layout\\Substitutes");
+ InitializeObjectAttributes(&ObjectAttributes,
+ &KeyName,
+ OBJ_CASE_INSENSITIVE,
+ NULL,
+ NULL);
+
+ Status = NtCreateKey(&SubKeyHandle,
+ KEY_ALL_ACCESS,
+ &ObjectAttributes,
+ 0,
+ NULL,
+ 0,
+ &Disposition);
+
+ if(!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
+ NtClose(SubKeyHandle);
+ NtClose(KeyHandle);
+ return FALSE;
+ }
+
+ do
+ {
+ if (uIndex > 19) break;
+
+ swprintf(szValueName, L"%d", uIndex + 1);
+ RtlInitUnicodeString(&ValueName, szValueName);
+
+ swprintf(szLangID, L"0000%s", MuiLayouts[uIndex].LangID);
+
+ if (wcscmp(szLangID, MuiLayouts[uIndex].LayoutID) == 0)
+ {
+ Status = NtSetValueKey(KeyHandle,
+ &ValueName,
+ 0,
+ REG_SZ,
+ (PVOID)MuiLayouts[uIndex].LayoutID,
+ wcslen(MuiLayouts[uIndex].LayoutID) * sizeof(WCHAR));
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n",
Status, uIndex);
+ NtClose(SubKeyHandle);
+ NtClose(KeyHandle);
+ return FALSE;
+ }
+ }
+ else
+ {
+ swprintf(szLangID, L"d%03d%s", uCount, MuiLayouts[uIndex].LangID);
+ Status = NtSetValueKey(KeyHandle,
+ &ValueName,
+ 0,
+ REG_SZ,
+ (PVOID)szLangID,
+ wcslen(szLangID) * sizeof(WCHAR));
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n",
Status, uIndex);
+ NtClose(SubKeyHandle);
+ NtClose(KeyHandle);
+ return FALSE;
+ }
+
+ RtlInitUnicodeString(&ValueName, szLangID);
+
+ Status = NtSetValueKey(SubKeyHandle,
+ &ValueName,
+ 0,
+ REG_SZ,
+ (PVOID)MuiLayouts[uIndex].LayoutID,
+ wcslen(MuiLayouts[uIndex].LayoutID) * sizeof(WCHAR));
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n",
Status, uIndex);
+ NtClose(SubKeyHandle);
+ NtClose(KeyHandle);
+ return FALSE;
+ }
+
+ uCount++;
+ }
+
+ uIndex++;
+ }
+ while (MuiLayouts[uIndex].LangID != NULL);
+
+ if (uIndex > 1)
AddHotkeySettings(L"2", L"2", L"1");
- }
- else AddHotkeySettings(L"3", L"3", L"3"); // Off all
hotkeys
-
+ else
+ AddHotkeySettings(L"3", L"3", L"3");
+
+ NtClose(SubKeyHandle);
NtClose(KeyHandle);
return TRUE;
}
@@ -408,8 +470,7 @@
{
if (_wcsicmp(LanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0)
{
- return
AddKbLayoutsToRegistry(LanguageList[lngIndex].LanguageKeyboardLayoutID,
- LanguageList[lngIndex].SecondLangKbLayoutID);
+ return AddKbLayoutsToRegistry(LanguageList[lngIndex].MuiLayouts);
}
lngIndex++;
@@ -529,7 +590,7 @@
0,
REG_SZ,
(PVOID)MuiSubFonts[uIndex].SubFontName,
- wcslen(MuiSubFonts[uIndex].SubFontName) *
sizeof(PWCHAR));
+ (wcslen(MuiSubFonts[uIndex].SubFontName)+1) *
sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n",
Status, uIndex);
Modified: trunk/reactos/base/setup/usetup/mui.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/mui.h?re…
==============================================================================
--- trunk/reactos/base/setup/usetup/mui.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/mui.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -29,15 +29,19 @@
typedef struct
{
- LPCWSTR FontName;
- LPCWSTR SubFontName;
+ PWCHAR FontName;
+ PWCHAR SubFontName;
} MUI_SUBFONT;
typedef struct
{
+ PWCHAR LangID; // Language ID (like "0409")
+ PWCHAR LayoutID; // Layout ID (like "00000409")
+} MUI_LAYOUTS;
+
+typedef struct
+{
PWCHAR LanguageID;
- PWCHAR LanguageKeyboardLayoutID;
- PWCHAR SecondLangKbLayoutID;
PWCHAR ACPage;
PWCHAR OEMCPage;
PWCHAR MACCPage;
@@ -46,6 +50,7 @@
const MUI_ERROR * MuiErrors;
const MUI_STRING * MuiStrings;
const MUI_SUBFONT * MuiSubFonts;
+ const MUI_LAYOUTS * MuiLayouts;
} MUI_LANGUAGE;
VOID
@@ -56,6 +61,12 @@
LPCWSTR
MUIDefaultKeyboardLayout(VOID);
+
+const MUI_LAYOUTS *
+MUIGetLayoutsList(VOID);
+
+BOOLEAN
+AddKbLayoutsToRegistry(IN const MUI_LAYOUTS * MuiLayouts);
BOOLEAN
AddCodePage(VOID);
Modified: trunk/reactos/base/setup/usetup/muilanguages.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/muilangu…
==============================================================================
--- trunk/reactos/base/setup/usetup/muilanguages.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/muilanguages.h [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -18,59 +18,97 @@
const MUI_LANGUAGE LanguageList[] =
{
- /* Lang ID, DefKbdLayout, SecKbLayout, ANSI CP, OEM CP, MAC CP, Language Name,
page strgs,error strings, other strings */
- {L"00000409", L"00000409", NULL, L"1252",
L"437", L"10000", L"English", enUSPages,
enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"0000041C", L"0000041C", L"00000409",
L"1250", L"852", L"10029", L"Albanian",
enUSPages, enUSErrorEntries, enUSStrings, CP1250Fonts },
- {L"00000401", L"00000401", L"00000409",
L"1256", L"720", L"10004", L"Arabic",
enUSPages, enUSErrorEntries, enUSStrings, CP1256Fonts },
- {L"0000042B", L"0000042B", L"00000409", L"0",
L"1", L"2", L"Armenian Eastern", enUSPages,
enUSErrorEntries, enUSStrings, UnicodeFonts},
- {L"0000082C", L"0000082C", L"00000409",
L"1251", L"866", L"10007", L"Azeri Cyrillic",
enUSPages, enUSErrorEntries, enUSStrings, CP1251Fonts },
- {L"0000042C", L"0000042C", L"00000409",
L"1254", L"857", L"10081", L"Azeri Latin",
enUSPages, enUSErrorEntries, enUSStrings, CP1254Fonts },
- {L"00000423", L"00000423", L"00000409",
L"1251", L"866", L"10007", L"Belarusian",
enUSPages, enUSErrorEntries, enUSStrings, CP1251Fonts },
- {L"00000813", L"00000813", L"00000409",
L"1252", L"850", L"10000", L"Belgian (Dutch)",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"0000080C", L"0000080C", L"00000409",
L"1252", L"850", L"10000", L"Belgian (French)",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000416", L"00010416", L"00000409",
L"1252", L"850", L"10000", L"Brazilian",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000402", L"00000402", L"00000409",
L"1251", L"866", L"10007", L"Bulgarian",
bgBGPages, bgBGErrorEntries, bgBGStrings, CP1251Fonts },
- {L"00000455", L"00000455", L"00000409", L"0",
L"1", L"2", L"Burmese", enUSPages,
enUSErrorEntries, enUSStrings, UnicodeFonts},
- {L"00000C0C", L"00000C0C", L"00000409",
L"1252", L"850", L"10000", L"Canadian (French)",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000403", L"0000040A", L"00000409",
L"1252", L"850", L"10000", L"Catalan",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000804", L"00000804", L"00000409",
L"936", L"936", L"10008", L"Chinese (PRC)",
enUSPages, enUSErrorEntries, enUSStrings, CP936Fonts },
- {L"00000405", L"00000405", L"00000409",
L"1250", L"852", L"10029", L"Czech",
csCZPages, csCZErrorEntries, csCZStrings, CP1250Fonts },
- {L"00000406", L"00000406", L"00000409",
L"1252", L"850", L"10000", L"Danish",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000407", L"00000407", L"00000409",
L"1252", L"850", L"10000", L"Deutsch",
deDEPages, deDEErrorEntries, deDEStrings, CP1252Fonts },
- {L"00000413", L"00000813", L"00000409",
L"1252", L"850", L"10000", L"Dutch",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000425", L"00000425", L"00000409",
L"1257", L"775", L"10029", L"Estonian",
enUSPages, enUSErrorEntries, enUSStrings, CP1257Fonts },
- {L"0000040B", L"0000040B", L"00000409",
L"1252", L"850", L"10000", L"Finnish",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"0000040C", L"0000040C", L"00000409",
L"1252", L"850", L"10000", L"French",
frFRPages, frFRErrorEntries, frFRStrings, CP1252Fonts },
- {L"00000437", L"00000437", L"00000409", L"0",
L"1", L"2", L"Georgian", enUSPages,
enUSErrorEntries, enUSStrings, UnicodeFonts},
- {L"00000408", L"00000408", L"00000409",
L"1253", L"737", L"10006", L"Greek",
elGRPages, elGRErrorEntries, elGRStrings, CP1253Fonts },
- {L"0000040D", L"0000040D", L"00000409",
L"1255", L"862", L"10005", L"Hebrew",
enUSPages, enUSErrorEntries, enUSStrings, CP1255Fonts },
- {L"0000040E", L"0000040E", L"00000409",
L"1250", L"852", L"10029", L"Hungarian",
enUSPages, enUSErrorEntries, enUSStrings, CP1250Fonts },
- {L"0000040F", L"0000040F", L"00000409",
L"1252", L"850", L"10079", L"Icelandic",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000410", L"00000410", L"00000409",
L"1252", L"850", L"10000", L"Italian",
itITPages, itITErrorEntries, itITStrings, CP1252Fonts },
- {L"00000411", L"00000411", L"00000409",
L"932", L"932", L"10001", L"Japanese",
enUSPages, enUSErrorEntries, enUSStrings, CP932Fonts },
- {L"0000043F", L"0000043F", L"00000409",
L"1251", L"866", L"10007", L"Kazakh",
enUSPages, enUSErrorEntries, enUSStrings, CP1251Fonts },
- {L"00000412", L"00000412", L"00000409",
L"949", L"949", L"10003", L"Korean",
enUSPages, enUSErrorEntries, enUSStrings, CP949Fonts },
- {L"00000426", L"00000426", L"00000409",
L"1257", L"775", L"10029", L"Latvian",
enUSPages, enUSErrorEntries, enUSStrings, CP1257Fonts },
- {L"00000427", L"00000427", L"00000409",
L"1257", L"775", L"10029", L"Lithuanian",
ltLTPages, ltLTErrorEntries, ltLTStrings, CP1257Fonts },
- {L"0000042F", L"0000042F", L"00000409",
L"1251", L"866", L"10007", L"Macedonian",
enUSPages, enUSErrorEntries, enUSStrings, CP1251Fonts },
- {L"00000414", L"00000414", L"00000409",
L"1252", L"850", L"10000", L"Norwegian",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000418", L"00000418", L"00000409",
L"1250", L"852", L"10029", L"Romanian",
enUSPages, enUSErrorEntries, enUSStrings, CP1250Fonts },
- {L"00000419", L"00000419", L"00000409",
L"1251", L"866", L"10007", L"Russkij",
ruRUPages, ruRUErrorEntries, ruRUStrings, CP1251Fonts },
- {L"00000415", L"00000415", L"00000409",
L"1250", L"852", L"10029", L"Polski",
plPLPages, plPLErrorEntries, plPLStrings, CP1250Fonts },
- {L"00000816", L"00000816", L"00000409",
L"1252", L"850", L"10000", L"Portuguese",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000C1A", L"00000C1A", L"00000409",
L"1251", L"855", L"10007", L"Serbian
(Cyrillic)",enUSPages, enUSErrorEntries, enUSStrings, CP1251Fonts },
- {L"0000081A", L"0000081A", L"00000409",
L"1250", L"852", L"10029", L"Serbian (Latin)",
enUSPages, enUSErrorEntries, enUSStrings, CP1250Fonts },
- {L"0000041B", L"0000041B", L"00000409",
L"1250", L"852", L"10029", L"Slovak",
skSKPages, skSKErrorEntries, skSKStrings, CP1250Fonts },
- {L"0000040A", L"0000040A", L"00000409",
L"1252", L"850", L"10000", L"Spanish",
esESPages, esESErrorEntries, esESStrings, CP1252Fonts },
- {L"00000807", L"00000807", L"00000409",
L"1252", L"850", L"10000", L"Swiss (German)",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"0000041D", L"0000041D", L"00000409",
L"1252", L"850", L"10000", L"Swedish",
svSEPages, svSEErrorEntries, svSEStrings, CP1252Fonts },
- {L"00000444", L"00000444", L"00000409",
L"1251", L"866", L"10007", L"Tatar",
enUSPages, enUSErrorEntries, enUSStrings, CP1251Fonts },
- {L"0000041E", L"0000041E", L"00000409",
L"874", L"874", L"10021", L"Thai",
enUSPages, enUSErrorEntries, enUSStrings, CP874Fonts },
- {L"0000041F", L"0000041F", L"00000409",
L"1254", L"857", L"10081", L"Turkish",
enUSPages, enUSErrorEntries, enUSStrings, CP1254Fonts },
- {L"00000422", L"00000422", L"00000409",
L"1251", L"866", L"10017", L"Ukrainian",
ukUAPages, ukUAErrorEntries, ukUAStrings, CP1251Fonts },
- {L"00000809", L"00000809", L"00000409",
L"1252", L"850", L"10000", L"United Kingdom",
enUSPages, enUSErrorEntries, enUSStrings, CP1252Fonts },
- {L"00000843", L"00000843", L"00000409",
L"1251", L"866", L"10007", L"Uzbek",
enUSPages, enUSErrorEntries, enUSStrings, CP1251Fonts },
- {L"0000042A", L"0000042A", L"00000409",
L"1258", L"1258",L"10000", L"Vietnamese",
enUSPages, enUSErrorEntries, enUSStrings, CP1258Fonts },
+ /* Lang ID, ANSI CP, OEM CP, MAC CP, Language Name, page
strgs,error strings, other strings, fonts, kb layouts */
+ {L"0000041C", L"1250", L"852", L"10029",
L"Albanian", enUSPages, enUSErrorEntries, enUSStrings,
CP1250Fonts, enUSLayouts },
+ {L"00000401", L"1256", L"720", L"10004",
L"Arabic (Saudi Arabia)", enUSPages, enUSErrorEntries, enUSStrings,
CP1256Fonts, enUSLayouts },
+ {L"00000801", L"1256", L"720", L"10004",
L"Arabic (Iraq)", enUSPages, enUSErrorEntries, enUSStrings,
CP1256Fonts, enUSLayouts },
+ {L"00000C01", L"1256", L"720", L"10004",
L"Arabic (Egypt)", enUSPages, enUSErrorEntries, enUSStrings,
CP1256Fonts, enUSLayouts },
+ {L"00001001", L"1256", L"720", L"10004",
L"Arabic (Libya)", enUSPages, enUSErrorEntries, enUSStrings,
CP1256Fonts, enUSLayouts },
+ {L"00001401", L"1256", L"720", L"10004",
L"Arabic (Algeria)", enUSPages, enUSErrorEntries, enUSStrings,
CP1256Fonts, enUSLayouts },
+ {L"0000042B", L"0", L"1", L"2",
L"Armenian Eastern", enUSPages, enUSErrorEntries, enUSStrings,
UnicodeFonts,enUSLayouts },
+ {L"0000082C", L"1251", L"866", L"10007",
L"Azeri (Cyrillic)", enUSPages, enUSErrorEntries, enUSStrings,
CP1251Fonts, enUSLayouts },
+ {L"0000042C", L"1254", L"857", L"10081",
L"Azeri (Latin)", enUSPages, enUSErrorEntries, enUSStrings,
CP1254Fonts, enUSLayouts },
+ {L"00000423", L"1251", L"866", L"10007",
L"Belarusian", enUSPages, enUSErrorEntries, enUSStrings,
CP1251Fonts, enUSLayouts },
+ {L"00000813", L"1252", L"850", L"10000",
L"Belgian (Dutch)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000080C", L"1252", L"850", L"10000",
L"Belgian (French)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000416", L"1252", L"850", L"10000",
L"Brazilian", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000402", L"1251", L"866", L"10007",
L"Bulgarian", bgBGPages, bgBGErrorEntries, bgBGStrings,
CP1251Fonts, bgBGLayouts },
+ {L"00000455", L"0", L"1", L"2",
L"Burmese", enUSPages, enUSErrorEntries, enUSStrings,
UnicodeFonts,enUSLayouts },
+ {L"00000C0C", L"1252", L"850", L"10000",
L"Canadian (French)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000403", L"1252", L"850", L"10000",
L"Catalan", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000404", L"950", L"950", L"10008",
L"Chinese (Taiwan)", enUSPages, enUSErrorEntries, enUSStrings,
CP950Fonts, enUSLayouts },
+ {L"00000804", L"936", L"936", L"10008",
L"Chinese (PRC)", enUSPages, enUSErrorEntries, enUSStrings,
CP936Fonts, enUSLayouts },
+ {L"00000C04", L"950", L"950", L"10008",
L"Chinese (Hong Kong S.A.R.)", enUSPages, enUSErrorEntries, enUSStrings,
CP950Fonts, enUSLayouts },
+ {L"00001004", L"936", L"936", L"10008",
L"Chinese (Singapore)", enUSPages, enUSErrorEntries, enUSStrings,
CP936Fonts, enUSLayouts },
+ {L"00000405", L"1250", L"852", L"10029",
L"Czech", csCZPages, csCZErrorEntries, csCZStrings,
CP1250Fonts, csCZLayouts },
+ {L"00000406", L"1252", L"850", L"10000",
L"Danish", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000413", L"1252", L"850", L"10000",
L"Dutch", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000409", L"1252", L"437", L"10000",
L"English (United States)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000809", L"1252", L"850", L"10000",
L"English (United Kingdom)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000C09", L"1252", L"850", L"10000",
L"English (Australia)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00001009", L"1252", L"850", L"10000",
L"English (Canada)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00001409", L"1252", L"850", L"10000",
L"English (New Zealand)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00001809", L"1252", L"850", L"10000",
L"English (Ireland)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00001C09", L"1252", L"437", L"10000",
L"English (South Africa)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00002009", L"1252", L"850", L"10000",
L"English (Jamaica)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00002409", L"1252", L"850", L"10000",
L"English (Caribbean)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00002809", L"1252", L"850", L"10000",
L"English (Belize)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00002C09", L"1252", L"850", L"10000",
L"English (Trinidad)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00003009", L"1252", L"437", L"10000",
L"English (Zimbabwe)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00003409", L"1252", L"437", L"10000",
L"English (Philippines)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000425", L"1257", L"775", L"10029",
L"Estonian", enUSPages, enUSErrorEntries, enUSStrings,
CP1257Fonts, enUSLayouts },
+ {L"0000040B", L"1252", L"850", L"10000",
L"Finnish", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000040C", L"1252", L"850", L"10000",
L"French", frFRPages, frFRErrorEntries, frFRStrings,
CP1252Fonts, frFRLayouts },
+ {L"00000437", L"0", L"1", L"2",
L"Georgian", enUSPages, enUSErrorEntries, enUSStrings,
UnicodeFonts,enUSLayouts },
+ {L"00000407", L"1252", L"850", L"10000",
L"German (Germany)", deDEPages, deDEErrorEntries, deDEStrings,
CP1252Fonts, deDELayouts },
+ {L"00000408", L"1253", L"737", L"10006",
L"Greek", elGRPages, elGRErrorEntries, elGRStrings,
CP1253Fonts, elGRLayouts },
+ {L"0000040D", L"1255", L"862", L"10005",
L"Hebrew", enUSPages, enUSErrorEntries, enUSStrings,
CP1255Fonts, enUSLayouts },
+ {L"0000040E", L"1250", L"852", L"10029",
L"Hungarian", enUSPages, enUSErrorEntries, enUSStrings,
CP1250Fonts, enUSLayouts },
+ {L"0000040F", L"1252", L"850", L"10079",
L"Icelandic", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000410", L"1252", L"850", L"10000",
L"Italian (Italy)", itITPages, itITErrorEntries, itITStrings,
CP1252Fonts, itITLayouts },
+ {L"00000411", L"932", L"932", L"10001",
L"Japanese", enUSPages, enUSErrorEntries, enUSStrings,
CP932Fonts, enUSLayouts },
+ {L"0000043F", L"1251", L"866", L"10007",
L"Kazakh", enUSPages, enUSErrorEntries, enUSStrings,
CP1251Fonts, enUSLayouts },
+ {L"00000412", L"949", L"949", L"10003",
L"Korean", enUSPages, enUSErrorEntries, enUSStrings,
CP949Fonts, enUSLayouts },
+ {L"00000426", L"1257", L"775", L"10029",
L"Latvian", enUSPages, enUSErrorEntries, enUSStrings,
CP1257Fonts, enUSLayouts },
+ {L"00000427", L"1257", L"775", L"10029",
L"Lithuanian", ltLTPages, ltLTErrorEntries, ltLTStrings,
CP1257Fonts, ltLTLayouts },
+ {L"0000042F", L"1251", L"866", L"10007",
L"Macedonian", enUSPages, enUSErrorEntries, enUSStrings,
CP1251Fonts, enUSLayouts },
+ {L"00000414", L"1252", L"850", L"10000",
L"Norwegian", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000418", L"1250", L"852", L"10029",
L"Romanian", enUSPages, enUSErrorEntries, enUSStrings,
CP1250Fonts, enUSLayouts },
+ {L"00000419", L"1251", L"866", L"10007",
L"Russkij", ruRUPages, ruRUErrorEntries, ruRUStrings,
CP1251Fonts, ruRULayouts },
+ {L"00000415", L"1250", L"852", L"10029",
L"Polski", plPLPages, plPLErrorEntries, plPLStrings,
CP1250Fonts, plPLLayouts },
+ {L"00000816", L"1252", L"850", L"10000",
L"Portuguese", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000C1A", L"1251", L"855", L"10007",
L"Serbian (Cyrillic)", enUSPages, enUSErrorEntries, enUSStrings,
CP1251Fonts, enUSLayouts },
+ {L"0000081A", L"1250", L"852", L"10029",
L"Serbian (Latin)", enUSPages, enUSErrorEntries, enUSStrings,
CP1250Fonts, enUSLayouts },
+ {L"0000041B", L"1250", L"852", L"10029",
L"Slovak", skSKPages, skSKErrorEntries, skSKStrings,
CP1250Fonts, skSKLayouts },
+ {L"0000040A", L"1252", L"850", L"10000",
L"Spanish (Traditional Sort)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, esESLayouts },
+ {L"0000080A", L"1252", L"850", L"10000",
L"Spanish (Mexico)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000C0A", L"1252", L"850", L"10000",
L"Spanish (International Sort)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000100A", L"1252", L"850", L"10000",
L"Spanish (Guatemala)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000140A", L"1252", L"850", L"10000",
L"Spanish (Costa Rica)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000180A", L"1252", L"850", L"10000",
L"Spanish (Panama)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"00001C0A", L"1252", L"850", L"10000",
L"Spanish (Dominican Republic)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000200A", L"1252", L"850", L"10000",
L"Spanish (Venezuela)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000240A", L"1252", L"850", L"10000",
L"Spanish (Colombia)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000280A", L"1252", L"850", L"10000",
L"Spanish (Peru)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"00002C0A", L"1252", L"850", L"10000",
L"Spanish (Argentina)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000300A", L"1252", L"850", L"10000",
L"Spanish (Ecuador)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000340A", L"1252", L"850", L"10000",
L"Spanish (Chile)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000380A", L"1252", L"850", L"10000",
L"Spanish (Uruguay)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"00003C0A", L"1252", L"850", L"10000",
L"Spanish (Paraguay)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000400A", L"1252", L"850", L"10000",
L"Spanish (Bolivia)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000440A", L"1252", L"850", L"10000",
L"Spanish (El Salvador)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000480A", L"1252", L"850", L"10000",
L"Spanish (Honduras)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"00004C0A", L"1252", L"850", L"10000",
L"Spanish (Nicaragua)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000500A", L"1252", L"850", L"10000",
L"Spanish (Puerto Rico)", esESPages, esESErrorEntries, esESStrings,
CP1252Fonts, enUSLayouts },
+ {L"00000807", L"1252", L"850", L"10000",
L"Swiss (German)", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
+ {L"0000041D", L"1252", L"850", L"10000",
L"Swedish", svSEPages, svSEErrorEntries, svSEStrings,
CP1252Fonts, svSELayouts },
+ {L"00000444", L"1251", L"866", L"10007",
L"Tatar", enUSPages, enUSErrorEntries, enUSStrings,
CP1251Fonts, enUSLayouts },
+ {L"0000041E", L"874", L"874", L"10021",
L"Thai", enUSPages, enUSErrorEntries, enUSStrings,
CP874Fonts, enUSLayouts },
+ {L"0000041F", L"1254", L"857", L"10081",
L"Turkish", enUSPages, enUSErrorEntries, enUSStrings,
CP1254Fonts, enUSLayouts },
+ {L"00000422", L"1251", L"866", L"10017",
L"Ukrainian", ukUAPages, ukUAErrorEntries, ukUAStrings,
CP1251Fonts, ukUALayouts },
+ {L"00000843", L"1251", L"866", L"10007",
L"Uzbek", enUSPages, enUSErrorEntries, enUSStrings,
CP1251Fonts, enUSLayouts },
+ {L"0000042A", L"1258", L"1258",L"10000",
L"Vietnamese", enUSPages, enUSErrorEntries, enUSStrings,
CP1258Fonts, enUSLayouts },
+ {L"00000435", L"1252", L"850", L"10000",
L"Zulu", enUSPages, enUSErrorEntries, enUSStrings,
CP1252Fonts, enUSLayouts },
{NULL, NULL, NULL, NULL, NULL, NULL}
};
Modified: trunk/reactos/base/setup/usetup/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/settings…
==============================================================================
--- trunk/reactos/base/setup/usetup/settings.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/settings.c [iso-8859-1] Sun Jun 1 07:52:18 2008
@@ -811,6 +811,8 @@
PWCHAR KeyName;
PWCHAR KeyValue;
PWCHAR UserData;
+ const MUI_LAYOUTS * LayoutsList;
+ ULONG uIndex = 0;
/* Get default layout id */
if (!SetupFindFirstLineW (InfFile, L"NLS", L"DefaultLayout",
&Context))
@@ -825,163 +827,97 @@
if (List == NULL)
return NULL;
- if (!SetupFindFirstLineW (InfFile, L"KeyboardLayout", NULL, &Context))
- {
- DestroyGenericList(List, FALSE);
- return NULL;
- }
+ LayoutsList = MUIGetLayoutsList();
do
{
- if (!INF_GetData (&Context, &KeyName, &KeyValue))
- {
- /* FIXME: Handle error! */
- DPRINT("INF_GetData() failed\n");
+ if (!SetupFindFirstLineW(InfFile, L"KeyboardLayout", NULL,
&Context))
+ {
DestroyGenericList(List, FALSE);
- break;
- }
-
- UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
- 0,
- (wcslen(KeyName) + 1) * sizeof(WCHAR));
-
- if (UserData == NULL)
- {
- /* FIXME: Handle error! */
- }
-
- wcscpy(UserData, KeyName);
-
- sprintf(Buffer, "%S", KeyValue);
- AppendGenericListEntry(List,
- Buffer,
- UserData,
- _wcsicmp(KeyName, DefaultKBLayout) ? FALSE : TRUE);
- } while (SetupFindNextLine(&Context, &Context));
+ return NULL;
+ }
+
+ do
+ {
+ if (!INF_GetData (&Context, &KeyName, &KeyValue))
+ {
+ /* FIXME: Handle error! */
+ DPRINT("INF_GetData() failed\n");
+ DestroyGenericList(List, FALSE);
+ break;
+ }
+
+ if (_wcsicmp(LayoutsList[uIndex].LayoutID, KeyName) == 0)
+ {
+ UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
+ 0,
+ (wcslen(KeyName) + 1) * sizeof(WCHAR));
+
+ if (UserData == NULL)
+ {
+ /* FIXME: Handle error! */
+ }
+
+ wcscpy(UserData, KeyName);
+
+ sprintf(Buffer, "%S", KeyValue);
+ AppendGenericListEntry(List,
+ Buffer,
+ UserData,
+ _wcsicmp(KeyName, DefaultKBLayout) ? FALSE :
TRUE);
+ }
+
+ } while (SetupFindNextLine(&Context, &Context));
+
+ uIndex++;
+
+ } while (LayoutsList[uIndex].LangID != NULL);
return List;
}
-
BOOLEAN
ProcessKeyboardLayoutRegistry(PGENERIC_LIST List)
{
PGENERIC_LIST_ENTRY Entry;
- PWCHAR LanguageId;
- WCHAR CurrentLangId[8 + 1];
- OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING KeyName;
- UNICODE_STRING ValueName;
- ULONG ResLength, Length;
- HANDLE KeyHandle;
- NTSTATUS Status;
- PKEY_VALUE_PARTIAL_INFORMATION ValueInfo;
+ PWCHAR LayoutId;
+ const MUI_LAYOUTS * LayoutsList;
+ MUI_LAYOUTS NewLayoutsList[20];
+ ULONG uIndex = 0;
+ ULONG uOldPos = 0;
Entry = GetCurrentListEntry(List);
if (Entry == NULL)
return FALSE;
- LanguageId = (PWCHAR)GetListEntryUserData(Entry);
- if (LanguageId == NULL)
- return FALSE;
-
- RtlInitUnicodeString(&KeyName, L"\\Registry\\User\\.DEFAULT\\Keyboard
Layout\\Preload");
-
- InitializeObjectAttributes(&ObjectAttributes,
- &KeyName,
- OBJ_CASE_INSENSITIVE,
- NULL,
- NULL);
-
- Status = NtOpenKey(&KeyHandle,
- KEY_ALL_ACCESS,
- &ObjectAttributes);
-
- if(!NT_SUCCESS(Status))
- {
- DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
- NtClose(KeyHandle);
- return FALSE;
- }
-
- /* Get current keyboard layout */
- RtlInitUnicodeString(&ValueName,
- L"1");
-
- Length = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + (8 + 1) * sizeof(WCHAR);
-
- ValueInfo = (KEY_VALUE_PARTIAL_INFORMATION*) RtlAllocateHeap(RtlGetProcessHeap(),
- 0,
- Length);
-
- if (ValueInfo == NULL)
- {
- DPRINT("RtlAllocateHeap() failed\n");
- NtClose(KeyHandle);
- return FALSE;
- }
-
- Status = NtQueryValueKey(KeyHandle,
- &ValueName,
- KeyValuePartialInformation,
- ValueInfo,
- Length,
- &ResLength);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("NtQueryValueKey() failed (Status %lx)\n", Status);
- NtClose(KeyHandle);
- return FALSE;
- }
-
- RtlCopyMemory(CurrentLangId,
- ValueInfo->Data,
- (8 + 1) * sizeof(WCHAR));
-
- CurrentLangId[8 + 1] = 0;
-
- RtlFreeHeap(RtlGetProcessHeap(),
- 0,
- ValueInfo);
-
- if (wcscmp(CurrentLangId, LanguageId) != 0)
- {
- RtlInitUnicodeString(&ValueName,
- L"1");
-
- Status = NtSetValueKey(KeyHandle,
- &ValueName,
- 0,
- REG_SZ,
- (PVOID)LanguageId,
- (8 + 1) * sizeof(WCHAR));
-
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
- NtClose(KeyHandle);
- return FALSE;
- }
-
- RtlInitUnicodeString(&ValueName,
- L"2");
-
- Status = NtSetValueKey(KeyHandle,
- &ValueName,
- 0,
- REG_SZ,
- (PVOID)CurrentLangId,
- (8 + 1) * sizeof(WCHAR));
-
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
- NtClose(KeyHandle);
- return FALSE;
- }
- }
-
- NtClose(KeyHandle);
+ LayoutId = (PWCHAR)GetListEntryUserData(Entry);
+ if (LayoutId == NULL)
+ return FALSE;
+
+ LayoutsList = MUIGetLayoutsList();
+
+ if (_wcsicmp(LayoutsList[0].LayoutID, LayoutId) != 0)
+ {
+ do
+ {
+ if (_wcsicmp(LayoutsList[uIndex].LayoutID, LayoutId) == 0)
+ {
+ uOldPos = uIndex;
+ }
+
+ uIndex++;
+
+ } while (LayoutsList[uIndex].LangID != NULL);
+
+ NewLayoutsList[uIndex].LangID = NULL;
+ NewLayoutsList[uIndex].LayoutID = NULL;
+ NewLayoutsList[uOldPos].LangID = LayoutsList[0].LangID;
+ NewLayoutsList[uOldPos].LayoutID = LayoutsList[0].LayoutID;
+ NewLayoutsList[0].LangID = LayoutsList[uOldPos].LangID;
+ NewLayoutsList[0].LayoutID = LayoutsList[uOldPos].LayoutID;
+
+ return AddKbLayoutsToRegistry(NewLayoutsList);
+ }
return TRUE;
}