Author: dgorbachev
Date: Thu Dec 18 06:26:47 2008
New Revision: 38169
URL:
http://svn.reactos.org/svn/reactos?rev=38169&view=rev
Log:
Fix some keyboard layout related stuff in USetup.
Added:
trunk/reactos/base/setup/usetup/lang/my-MM.h (with props)
Modified:
trunk/reactos/base/setup/usetup/lang/hy-AM.h
trunk/reactos/base/setup/usetup/mui.c
trunk/reactos/base/setup/usetup/muilanguages.h
trunk/reactos/base/setup/usetup/settings.c
Modified: trunk/reactos/base/setup/usetup/lang/hy-AM.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/hy-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/hy-AM.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/hy-AM.h [iso-8859-1] Thu Dec 18 06:26:47 2008
@@ -3,9 +3,10 @@
MUI_LAYOUTS hyAMLayouts[] =
{
- { L"042b", L"0000042b" },
+ { L"042B", L"0000042B" },
+ { L"042B", L"0001042B" },
+ { L"0419", L"00000419" },
{ L"0409", L"00000409" },
- { L"0419", L"00000419" },
{ NULL, NULL }
};
Added: trunk/reactos/base/setup/usetup/lang/my-MM.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/my-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/my-MM.h (added)
+++ trunk/reactos/base/setup/usetup/lang/my-MM.h [iso-8859-1] Thu Dec 18 06:26:47 2008
@@ -1,0 +1,11 @@
+#ifndef LANG_MY_MM_H__
+#define LANG_MY_MM_H__
+
+MUI_LAYOUTS myMMLayouts[] =
+{
+ { L"0455", L"00000455" },
+ { L"0409", L"00000409" },
+ { NULL, NULL }
+};
+
+#endif
Propchange: trunk/reactos/base/setup/usetup/lang/my-MM.h
------------------------------------------------------------------------------
svn:eol-style = native
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] Thu Dec 18 06:26:47 2008
@@ -391,12 +391,12 @@
{
if (uIndex > 19) break;
- swprintf(szValueName, L"%d", uIndex + 1);
+ swprintf(szValueName, L"%u", uIndex + 1);
RtlInitUnicodeString(&ValueName, szValueName);
swprintf(szLangID, L"0000%s", MuiLayouts[uIndex].LangID);
- if (wcscmp(szLangID, MuiLayouts[uIndex].LayoutID) == 0)
+ if (_wcsicmp(szLangID, MuiLayouts[uIndex].LayoutID) == 0)
{
Status = NtSetValueKey(KeyHandle,
&ValueName,
@@ -414,7 +414,7 @@
}
else
{
- swprintf(szLangID, L"d%03d%s", uCount, MuiLayouts[uIndex].LangID);
+ swprintf(szLangID, L"d%03u%s", uCount, MuiLayouts[uIndex].LangID);
Status = NtSetValueKey(KeyHandle,
&ValueName,
0,
@@ -439,7 +439,7 @@
(wcslen(MuiLayouts[uIndex].LayoutID)+1) *
sizeof(WCHAR));
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n",
Status, uIndex);
+ DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %u)\n",
Status, uIndex);
NtClose(SubKeyHandle);
NtClose(KeyHandle);
return FALSE;
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] Thu Dec 18 06:26:47 2008
@@ -99,6 +99,7 @@
#include "lang/mr-IN.h"
#include "lang/ms-BN.h"
#include "lang/ms-MY.h"
+#include "lang/my-MM.h"
#include "lang/nl-BE.h"
#include "lang/nl-NL.h"
#include "lang/nn-NO.h"
@@ -159,7 +160,7 @@
{L"0000042D", L"1252", L"850", L"10000",
L"Basque", enUSPages, enUSErrorEntries, enUSStrings,
LatinFonts, euESLayouts },
{L"00000423", L"1251", L"866", L"10007",
L"Belarusian", enUSPages, enUSErrorEntries, enUSStrings,
CyrillicFonts, beBYLayouts },
{L"00000402", L"1251", L"866", L"10007",
L"Bulgarian", bgBGPages, bgBGErrorEntries, bgBGStrings,
CyrillicFonts, bgBGLayouts },
- {L"00000455", L"0", L"1", L"2",
L"Burmese", enUSPages, enUSErrorEntries, enUSStrings,
UnicodeFonts, enUSLayouts },
+ {L"00000455", L"0", L"1", L"2",
L"Burmese", enUSPages, enUSErrorEntries, enUSStrings,
UnicodeFonts, myMMLayouts },
{L"00000403", L"1252", L"850", L"10000",
L"Catalan", enUSPages, enUSErrorEntries, enUSStrings,
LatinFonts, caESLayouts },
{L"00000404", L"950", L"950", L"10008",
L"Chinese (Taiwan)", enUSPages, enUSErrorEntries, enUSStrings,
UnicodeFonts, zhTWLayouts },
{L"00000804", L"936", L"936", L"10008",
L"Chinese (PRC)", enUSPages, enUSErrorEntries, enUSStrings,
UnicodeFonts, zhCNLayouts },
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] Thu Dec 18 06:26:47 2008
@@ -895,7 +895,7 @@
PWCHAR LayoutId;
const MUI_LAYOUTS * LayoutsList;
MUI_LAYOUTS NewLayoutsList[20];
- ULONG uIndex = 0;
+ ULONG uIndex;
ULONG uOldPos = 0;
Entry = GetCurrentListEntry(List);
@@ -910,16 +910,17 @@
if (_wcsicmp(LayoutsList[0].LayoutID, LayoutId) != 0)
{
- do
+ for (uIndex = 1; LayoutsList[uIndex].LangID != NULL; uIndex++)
{
if (_wcsicmp(LayoutsList[uIndex].LayoutID, LayoutId) == 0)
{
uOldPos = uIndex;
+ continue;
}
- uIndex++;
-
- } while (LayoutsList[uIndex].LangID != NULL);
+ NewLayoutsList[uIndex].LangID = LayoutsList[uIndex].LangID;
+ NewLayoutsList[uIndex].LayoutID = LayoutsList[uIndex].LayoutID;
+ }
NewLayoutsList[uIndex].LangID = NULL;
NewLayoutsList[uIndex].LayoutID = NULL;