ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2023
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
139 discussions
Start a n
N
ew thread
[reactos] 01/01: [NOTEPAD][OSK] Improve/Add Portuguese (Brazilian pt-BR and Portugal pt-PT) translations (#5124)
by valmorflores
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2687c1b41549bc1bbe22f…
commit 2687c1b41549bc1bbe22f620ac396eee9f6f7a16 Author: valmorflores <valmorflores(a)gmail.com> AuthorDate: Thu Mar 30 20:37:45 2023 -0300 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Mar 31 01:37:45 2023 +0200 [NOTEPAD][OSK] Improve/Add Portuguese (Brazilian pt-BR and Portugal pt-PT) translations (#5124) Co-authored-by: Julen Urizar Compains <julenuri(a)hotmail.com> --- base/applications/notepad/lang/pt-BR.rc | 6 +-- base/applications/notepad/rsrc.rc | 6 +-- base/applications/osk/lang/pt-BR.rc | 82 +++++++++++++++++++++++++++++++++ base/applications/osk/lang/pt-PT.rc | 82 +++++++++++++++++++++++++++++++++ base/applications/osk/osk.rc | 6 +++ 5 files changed, 176 insertions(+), 6 deletions(-) diff --git a/base/applications/notepad/lang/pt-BR.rc b/base/applications/notepad/lang/pt-BR.rc index 51bf82ec1c4..81f0419d96a 100644 --- a/base/applications/notepad/lang/pt-BR.rc +++ b/base/applications/notepad/lang/pt-BR.rc @@ -25,7 +25,7 @@ BEGIN POPUP "&Arquivo" BEGIN MENUITEM "&Novo\tCtrl+N", CMD_NEW - MENUITEM "New &Window\tCtrl+Shift+N", CMD_NEW_WINDOW + MENUITEM "Nova &Janela\tCtrl+Shift+N", CMD_NEW_WINDOW MENUITEM "A&brir\tCtrl+O", CMD_OPEN MENUITEM "&Salvar\tCtrl+S", CMD_SAVE MENUITEM "Salvar &como...", CMD_SAVE_AS @@ -46,7 +46,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "&Localizar...", CMD_SEARCH MENUITEM "Localizar &próxima\tF3", CMD_SEARCH_NEXT - MENUITEM "Replace...\tCtrl+H", CMD_REPLACE + MENUITEM "Substituir...\tCtrl+H", CMD_REPLACE MENUITEM "Ir Para...\tCtrl+G", CMD_GOTO MENUITEM SEPARATOR MENUITEM "Selecionar &tudo", CMD_SELECT_ALL @@ -65,7 +65,7 @@ BEGIN BEGIN MENUITEM "&Conteúdo", CMD_HELP_CONTENTS MENUITEM SEPARATOR - MENUITEM "&About Notepad", CMD_HELP_ABOUT_NOTEPAD + MENUITEM "&Sobre o Notepad", CMD_HELP_ABOUT_NOTEPAD END END diff --git a/base/applications/notepad/rsrc.rc b/base/applications/notepad/rsrc.rc index 4d18985f8bf..00b65b0889b 100644 --- a/base/applications/notepad/rsrc.rc +++ b/base/applications/notepad/rsrc.rc @@ -96,12 +96,12 @@ IDI_NPICON ICON "res/notepad.ico" #ifdef LANGUAGE_PL_PL #include "lang/pl-PL.rc" #endif +#ifdef LANGUAGE_PT_BR + #include "lang/pt-BR.rc" +#endif #ifdef LANGUAGE_PT_PT #include "lang/pt-PT.rc" #endif -#ifdef LANGUAGE_PT_PB - #include "lang/pt-BR.rc" -#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif diff --git a/base/applications/osk/lang/pt-BR.rc b/base/applications/osk/lang/pt-BR.rc new file mode 100644 index 00000000000..f49446e288f --- /dev/null +++ b/base/applications/osk/lang/pt-BR.rc @@ -0,0 +1,82 @@ +/* + * PROJECT: ReactOS On-Screen-Keyboard + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: Portuguese (Brazilian) resource file + * TRANSLATOR: Copyright 2023 Valmor Flores <valmorflores(a)gmail.com> + */ + +LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN + +IDR_OSK_MENU MENU DISCARDABLE +BEGIN + POPUP "Arquivo" + BEGIN + MENUITEM "&Sair", IDM_EXIT + END + + POPUP "Teclado" + BEGIN + MENUITEM "Teclado extendido", IDM_ENHANCED_KB, CHECKED + MENUITEM "Teclado simples", IDM_STANDARD_KB + MENUITEM SEPARATOR + MENUITEM "Layout padrão", IDM_REG_LAYOUT, CHECKED, GRAYED + MENUITEM "Bloquear layout", IDM_BLOCK_LAYOUT, GRAYED + MENUITEM SEPARATOR + MENUITEM "101 teclas", IDM_101_KEYS, CHECKED, GRAYED + MENUITEM "102 teclas", IDM_102_KEYS, GRAYED + MENUITEM "106 teclas", IDM_106_KEYS, GRAYED + END + + POPUP "Configurações" + BEGIN + MENUITEM "Sempre no topo", IDM_ON_TOP, CHECKED + MENUITEM SEPARATOR + MENUITEM "&Ativar som de clique", IDM_CLICK_SOUND + MENUITEM SEPARATOR + MENUITEM "&Modo digitação...", IDM_TYPE_MODE, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Fonte...", IDM_FONT + END + + POPUP "Ajuda" + BEGIN + MENUITEM "&Tópicos de ajuda", IDM_HELP_TOPICS, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Sobre Teclado Virtual...", IDM_ABOUT + END +END + +IDD_WARNINGDIALOG_OSK DIALOGEX 0, 0, 250, 97 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "Teclado Virtual" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK", IDOK, 193, 76, 50, 14 + ICON IDI_OSK, IDC_STATIC, 7, 17, 20, 20 + LTEXT "O Teclado Virtual fornece um nível de funcionalidade para usuários com necessidades especiais. Usuários com dificuldades motoras necessitam de um software para uso diário.", IDC_STATIC, 36, 7, 207, 33 + CONTROL "Não exibir esta mensagem novamente", IDC_SHOWWARNINGCHECK, "Button", + BS_AUTOCHECKBOX | WS_TABSTOP, 43, 80, 137, 10 +END + +STRINGTABLE +BEGIN + IDS_OSK "Teclado Virtual" + IDS_AUTHORS "Copyright Denis Robert" + IDS_NUMLOCK "Num" + IDS_CAPSLOCK "Caps" + IDS_SCROLLLOCK "Scroll" + /* Make sure the text fits onto the buttons */ + IDS_ESCAPE "Esc" + IDS_PRN "Prn" + IDS_STOP "Stop" + IDS_ATTN "Attn" + IDS_INSERT "ins" + IDS_NUMLOCKKEY "nlk" + IDS_DELETE "del" + IDS_END "end" + IDS_CTRL "ctrl" + IDS_LEFTALT "alt" + IDS_RIGHTALT "alt" +END + +/* EOF */ diff --git a/base/applications/osk/lang/pt-PT.rc b/base/applications/osk/lang/pt-PT.rc new file mode 100644 index 00000000000..71b5c1511de --- /dev/null +++ b/base/applications/osk/lang/pt-PT.rc @@ -0,0 +1,82 @@ +/* + * PROJECT: ReactOS On-Screen-Keyboard + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: Portuguese (Portugal) resource file + * TRANSLATOR: Copyright 2023 Valmor Flores <valmorflores(a)gmail.com> + */ + +LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL + +IDR_OSK_MENU MENU DISCARDABLE +BEGIN + POPUP "Ficheiro" + BEGIN + MENUITEM "&Sair", IDM_EXIT + END + + POPUP "Teclado" + BEGIN + MENUITEM "Teclado extendido", IDM_ENHANCED_KB, CHECKED + MENUITEM "Teclado simples", IDM_STANDARD_KB + MENUITEM SEPARATOR + MENUITEM "Estilo padrão", IDM_REG_LAYOUT, CHECKED, GRAYED + MENUITEM "Bloquear estilo", IDM_BLOCK_LAYOUT, GRAYED + MENUITEM SEPARATOR + MENUITEM "101 teclas", IDM_101_KEYS, CHECKED, GRAYED + MENUITEM "102 teclas", IDM_102_KEYS, GRAYED + MENUITEM "106 teclas", IDM_106_KEYS, GRAYED + END + + POPUP "Definições" + BEGIN + MENUITEM "Sempre no topo", IDM_ON_TOP, CHECKED + MENUITEM SEPARATOR + MENUITEM "&Activar som de clique", IDM_CLICK_SOUND + MENUITEM SEPARATOR + MENUITEM "&Modo digitação...", IDM_TYPE_MODE, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Tipo de letra...", IDM_FONT + END + + POPUP "Ajuda" + BEGIN + MENUITEM "&Tópicos de ajuda", IDM_HELP_TOPICS, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Sobre Teclado Virtual...", IDM_ABOUT + END +END + +IDD_WARNINGDIALOG_OSK DIALOGEX 0, 0, 250, 97 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "Teclado Virtual" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK", IDOK, 193, 76, 50, 14 + ICON IDI_OSK, IDC_STATIC, 7, 17, 20, 20 + LTEXT "O Teclado Virtual fornece um nível de funcionalidades para utilizadores com necessidades especiais. Utilizadores com dificuldades motoras necessitam de um software para uso diário.", IDC_STATIC, 36, 7, 207, 33 + CONTROL "Não mostrar esta mensagem novamente", IDC_SHOWWARNINGCHECK, "Button", + BS_AUTOCHECKBOX | WS_TABSTOP, 43, 80, 137, 10 +END + +STRINGTABLE +BEGIN + IDS_OSK "Teclado Virtual" + IDS_AUTHORS "Copyright Denis Robert" + IDS_NUMLOCK "Num" + IDS_CAPSLOCK "Caps" + IDS_SCROLLLOCK "Scroll" + /* Make sure the text fits onto the buttons */ + IDS_ESCAPE "Esc" + IDS_PRN "Prn" + IDS_STOP "Stop" + IDS_ATTN "Attn" + IDS_INSERT "ins" + IDS_NUMLOCKKEY "nlk" + IDS_DELETE "del" + IDS_END "end" + IDS_CTRL "ctrl" + IDS_LEFTALT "alt" + IDS_RIGHTALT "alt" +END + +/* EOF */ diff --git a/base/applications/osk/osk.rc b/base/applications/osk/osk.rc index b9d0291e65f..a599e616184 100644 --- a/base/applications/osk/osk.rc +++ b/base/applications/osk/osk.rc @@ -76,6 +76,12 @@ IDI_BOTTOM ICON "res/bottom.ico" #ifdef LANGUAGE_PL_PL #include "lang/pl-PL.rc" #endif +#ifdef LANGUAGE_PT_BR + #include "lang/pt-BR.rc" +#endif +#ifdef LANGUAGE_PT_PT + #include "lang/pt-PT.rc" +#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif
1 year, 9 months
1
0
0
0
[reactos] 01/01: [SHELL32_APITESTS] Add ROS.ico test file. Improve shell32:ExtractIconEx tests (#5169)
by Doug Lyons
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c8fc8264fea8558ded4a8…
commit c8fc8264fea8558ded4a8ab89bfded5c367f61cb Author: Doug Lyons <douglyons(a)douglyons.com> AuthorDate: Thu Mar 30 06:31:13 2023 -0500 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Mar 30 13:31:13 2023 +0200 [SHELL32_APITESTS] Add ROS.ico test file. Improve shell32:ExtractIconEx tests (#5169) Improve shell32:ExtractIconEx tests by updating it and adding more test files and 1 new icon file. JIRA issue: ROSTESTS-381 Add new ROS.ico file which has both a normal icon and a PNG one. Update testing to test for count of icons in file and separately extract the 0th one. Add tests for sysicon.ico, explorer.exe and the new ROS.ico files. --- .../rostests/apitests/shell32/ExtractIconEx.cpp | 95 ++++++++++++++++++++- modules/rostests/apitests/shell32/ROS.ico | Bin 0 -> 10526 bytes modules/rostests/apitests/shell32/resource.rc | 2 + modules/rostests/apitests/shell32/sysicon.ico | Bin 0 -> 22486 bytes 4 files changed, 93 insertions(+), 4 deletions(-) diff --git a/modules/rostests/apitests/shell32/ExtractIconEx.cpp b/modules/rostests/apitests/shell32/ExtractIconEx.cpp index e32f3ac34d2..244081199f3 100644 --- a/modules/rostests/apitests/shell32/ExtractIconEx.cpp +++ b/modules/rostests/apitests/shell32/ExtractIconEx.cpp @@ -3,9 +3,11 @@ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Tests for ExtractIconEx routine * COPYRIGHT: Copyright 2019 George Bișoc (george.bisoc(a)reactos.org) + * Copyright 2023 Doug Lyons (douglyons(a)douglyons.com) */ #include "shelltest.h" +#include <stdio.h> typedef struct { @@ -13,6 +15,64 @@ typedef struct UINT nIcons; } EXTRACTICONTESTS; +BOOL FileExists(LPCSTR FileName) +{ + FILE *fp = NULL; + bool exists = FALSE; + + fp = fopen(FileName, "r"); + if (fp != NULL) + { + exists = TRUE; + fclose(fp); + } + return exists; +} + +BOOL ResourceToFile(INT i, LPCSTR FileName) +{ + FILE *fout; + HGLOBAL hData; + HRSRC hRes; + LPVOID lpResLock; + UINT iSize; + + if (FileExists(FileName)) + { + skip("'%s' already exists. Exiting now\n", FileName); + return FALSE; + } + + hRes = FindResourceW(NULL, MAKEINTRESOURCEW(i), MAKEINTRESOURCEW(RT_RCDATA)); + if (hRes == NULL) + { + skip("Could not locate resource (%d). Exiting now\n", i); + return FALSE; + } + + iSize = SizeofResource(NULL, hRes); + + hData = LoadResource(NULL, hRes); + if (hData == NULL) + { + skip("Could not load resource (%d). Exiting now\n", i); + return FALSE; + } + + // Lock the resource into global memory. + lpResLock = LockResource(hData); + if (lpResLock == NULL) + { + skip("Could not lock resource (%d). Exiting now\n", i); + return FALSE; + } + + fout = fopen(FileName, "wb"); + fwrite(lpResLock, iSize, 1, fout); + fclose(fout); + return TRUE; +} + EXTRACTICONTESTS IconTests[] = { /* Executable file with icon */ @@ -22,16 +82,43 @@ EXTRACTICONTESTS IconTests[] = {L"%SystemRoot%\\System32\\autochk.exe", 0}, /* Non-existing files */ - {L"%SystemRoot%\\non-existent-file.sdf", 0} + {L"%SystemRoot%\\non-existent-file.sdf", 0}, + + /* Multiple icons in the same EXE file (18 icons) */ + {L"%SystemRoot%\\explorer.exe", 18}, + + /* Multiple icons in the same ICO file (6 icons) + * Per MS: If the file is an .ico file, the return value is 1. */ + {L"sysicon.ico", 1}, + + /* ICO file with both normal and PNG icons */ + {L"ROS.ico", 0} }; START_TEST(ExtractIconEx) { - UINT i, nReturnedIcons; + UINT i, nReturnedIcons, nExtractedIcons; + CHAR FileName[2][13] = { "ROS.ico", "sysicon.ico" }; + + if (!ResourceToFile(2, FileName[0])) + return; + if (!ResourceToFile(3, FileName[1])) + return; + + /* Check count of icons returned */ + for (i = 0; i < _countof(IconTests); ++i) + { + nReturnedIcons = ExtractIconExW(IconTests[i].pszFilePath, -1, NULL, NULL, 0); + ok(nReturnedIcons == IconTests[i].nIcons, "ExtractIconExW(%u): Expects %u icons, got %u\n", i, IconTests[i].nIcons, nReturnedIcons); + } + /* Check if the 0th icon can be extracted successfully */ for (i = 0; i < _countof(IconTests); ++i) { - nReturnedIcons = ExtractIconExW(IconTests[i].pszFilePath, 0, NULL, NULL, IconTests[i].nIcons); - ok(nReturnedIcons == IconTests[i].nIcons, "ExtractIconExW(%u): Expected %u icons, got %u\n", i, IconTests[i].nIcons, nReturnedIcons); + nExtractedIcons = ExtractIconExW(IconTests[i].pszFilePath, 0, NULL, NULL, 1); + ok(nExtractedIcons == IconTests[i].nIcons, "ExtractIconExW(%u): Expects %u icons, got %u\n", i, IconTests[i].nIcons, nExtractedIcons); } + + DeleteFileA(FileName[0]); + DeleteFileA(FileName[1]); } diff --git a/modules/rostests/apitests/shell32/ROS.ico b/modules/rostests/apitests/shell32/ROS.ico new file mode 100644 index 00000000000..587992b6eea Binary files /dev/null and b/modules/rostests/apitests/shell32/ROS.ico differ diff --git a/modules/rostests/apitests/shell32/resource.rc b/modules/rostests/apitests/shell32/resource.rc index f57af647e3d..177ef5b3f03 100644 --- a/modules/rostests/apitests/shell32/resource.rc +++ b/modules/rostests/apitests/shell32/resource.rc @@ -5,6 +5,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 1 ICON "1.ico" +2 RCDATA "ROS.ico" +3 RCDATA "sysicon.ico" SHLIMIT DIALOG 0, 0, 122, 84 CAPTION "SHLIMIT" diff --git a/modules/rostests/apitests/shell32/sysicon.ico b/modules/rostests/apitests/shell32/sysicon.ico new file mode 100644 index 00000000000..2c32fdf0022 Binary files /dev/null and b/modules/rostests/apitests/shell32/sysicon.ico differ
1 year, 9 months
1
0
0
0
[reactos] 01/01: [NTOS:KD] Fix build, addendum to commit f3dd7133.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1bb41672112b3fb34a2ec…
commit 1bb41672112b3fb34a2ec4903959343ec265a8a5 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Mar 29 03:36:24 2023 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Wed Mar 29 03:36:24 2023 +0200 [NTOS:KD] Fix build, addendum to commit f3dd7133. This one was more subtle because the prompt (KdIoReadLine) functionality makes a call-back to KDBG own command history getter function KdbGetHistoryEntry. It is planned for this to become a registered optional callback pointer. --- ntoskrnl/kd/kdprompt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ntoskrnl/kd/kdprompt.c b/ntoskrnl/kd/kdprompt.c index 3743ca2b3b2..ec4d7134616 100644 --- a/ntoskrnl/kd/kdprompt.c +++ b/ntoskrnl/kd/kdprompt.c @@ -13,6 +13,24 @@ #include "kd.h" #include "kdterminal.h" +/* In kdb.h only when KDBG defined */ +#ifdef KDBG +extern PCSTR +KdbGetHistoryEntry( + _Inout_ PLONG NextIndex, + _In_ BOOLEAN Next); +#else +PCSTR +KdbGetHistoryEntry( + _Inout_ PLONG NextIndex, + _In_ BOOLEAN Next) +{ + /* Dummy function */ + return NULL; +} +#endif + + /* FUNCTIONS *****************************************************************/ /**
1 year, 9 months
1
0
0
0
[reactos] 01/01: Fix build, addendum to commit 35180b3a
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3c0ba6b22c19f737854d2…
commit 3c0ba6b22c19f737854d26701c41376242f42a20 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Mar 29 02:55:06 2023 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Wed Mar 29 02:55:06 2023 +0200 Fix build, addendum to commit 35180b3a --- ntoskrnl/kd/kdprompt.c | 1 + ntoskrnl/kd/kdterminal.c | 1 + 2 files changed, 2 insertions(+) diff --git a/ntoskrnl/kd/kdprompt.c b/ntoskrnl/kd/kdprompt.c index 8c93eb413de..3743ca2b3b2 100644 --- a/ntoskrnl/kd/kdprompt.c +++ b/ntoskrnl/kd/kdprompt.c @@ -10,6 +10,7 @@ /* INCLUDES ******************************************************************/ #include <ntoskrnl.h> +#include "kd.h" #include "kdterminal.h" /* FUNCTIONS *****************************************************************/ diff --git a/ntoskrnl/kd/kdterminal.c b/ntoskrnl/kd/kdterminal.c index 00888230f1e..5b1db7436e5 100644 --- a/ntoskrnl/kd/kdterminal.c +++ b/ntoskrnl/kd/kdterminal.c @@ -9,6 +9,7 @@ /* INCLUDES ******************************************************************/ #include <ntoskrnl.h> +#include "kd.h" #include "kdterminal.h" #define KdbpGetCharKeyboard(ScanCode) KdbpTryGetCharKeyboard((ScanCode), 0)
1 year, 9 months
1
0
0
0
[reactos] 01/01: [NTOS:KDBG] Isolate terminal and input-related routines from the rest of KDBG. (#5188)
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=35180b3ad23e5ac357b7e…
commit 35180b3ad23e5ac357b7e7c7495d29cf13f7bd74 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Mar 29 02:06:35 2023 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Wed Mar 29 02:42:31 2023 +0200 [NTOS:KDBG] Isolate terminal and input-related routines from the rest of KDBG. (#5188) This is done in preparation for moving all this functionality in a separate KDTERM "KD Terminal Driver" DLL. Additionally: - Flush the terminal input before sending ANSI escape sequences. - In KDBG pager, always use the correct reading-key function (the same used also for reading keys for a line of user input), and not the simplistic two-call KdbpGetCharSerial + KdbpTryGetCharSerial that would split the \r \n across calls. - Call KdbpGetCommandLineSettings() in KdbInitialize() at BootPhase 0, which is indirectly called by KdDebuggerInitialize0(). And fix its command-line parsing too. --- ntoskrnl/kd/kd.h | 5 + ntoskrnl/kd/kdmain.c | 36 ++++++- ntoskrnl/kd/kdprompt.c | 59 +--------- ntoskrnl/kd/kdterminal.c | 276 +++++++++++++++++++++++++++++++++++++++++++++++ ntoskrnl/kd/kdterminal.h | 39 ++++++- ntoskrnl/kdbg/kdb.c | 24 ++--- ntoskrnl/kdbg/kdb.h | 24 +---- ntoskrnl/kdbg/kdb_cli.c | 207 ++++++++--------------------------- ntoskrnl/ntos.cmake | 3 +- 9 files changed, 407 insertions(+), 266 deletions(-) diff --git a/ntoskrnl/kd/kd.h b/ntoskrnl/kd/kd.h index 4440b183626..0e10f0c90b0 100644 --- a/ntoskrnl/kd/kd.h +++ b/ntoskrnl/kd/kd.h @@ -26,6 +26,11 @@ KdIoPrintf( _In_ PCSTR Format, ...); +SIZE_T +KdIoReadLine( + _Out_ PCHAR Buffer, + _In_ SIZE_T Size); + /* INIT ROUTINES *************************************************************/ diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c index aaed45432db..8120ab52e5d 100644 --- a/ntoskrnl/kd/kdmain.c +++ b/ntoskrnl/kd/kdmain.c @@ -9,14 +9,42 @@ #include <ntoskrnl.h> #include "kd.h" +#include "kdterminal.h" #define NDEBUG #include <debug.h> /* PUBLIC FUNCTIONS *********************************************************/ +static VOID +KdpGetTerminalSettings( + _In_ PCSTR p1) +{ +#define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]) - 1) + + while (p1 && *p1) + { + /* Skip leading whitespace */ + while (*p1 == ' ') ++p1; + + if (!_strnicmp(p1, "KDSERIAL", CONST_STR_LEN("KDSERIAL"))) + { + p1 += CONST_STR_LEN("KDSERIAL"); + KdbDebugState |= KD_DEBUG_KDSERIAL; + KdpDebugMode.Serial = TRUE; + } + else if (!_strnicmp(p1, "KDNOECHO", CONST_STR_LEN("KDNOECHO"))) + { + p1 += CONST_STR_LEN("KDNOECHO"); + KdbDebugState |= KD_DEBUG_KDNOECHO; + } + + /* Move on to the next option */ + p1 = strchr(p1, ' '); + } +} + static PCHAR -NTAPI KdpGetDebugMode( _In_ PCHAR Currentp2) { @@ -95,10 +123,8 @@ KdDebuggerInitialize0( /* Upcase it */ _strupr(CommandLine); -#ifdef KDBG - /* Get the KDBG Settings */ - KdbpGetCommandLineSettings(CommandLine); -#endif + /* Get terminal settings */ + KdpGetTerminalSettings(CommandLine); /* Get the port */ Port = strstr(CommandLine, "DEBUGPORT"); diff --git a/ntoskrnl/kd/kdprompt.c b/ntoskrnl/kd/kdprompt.c index f9ac04f6d03..8c93eb413de 100644 --- a/ntoskrnl/kd/kdprompt.c +++ b/ntoskrnl/kd/kdprompt.c @@ -36,72 +36,23 @@ KdIoReadLine( PCHAR Orig = Buffer; ULONG ScanCode = 0; CHAR Key; - static CHAR NextKey = ANSI_NULL; - BOOLEAN EchoOn; + BOOLEAN EchoOn = !(KdbDebugState & KD_DEBUG_KDNOECHO); LONG CmdHistIndex = -1; // Start at end of history. + /* Flush the input buffer */ + KdpFlushTerminalInput(); + /* Bail out if the buffer is zero-sized */ if (Size == 0) return 0; - EchoOn = ((KdbDebugState & KD_DEBUG_KDNOECHO) == 0); - for (;;) { - ScanCode = 0; - if (KdbDebugState & KD_DEBUG_KDSERIAL) - { - Key = (!NextKey ? KdbpGetCharSerial() : NextKey); - NextKey = ANSI_NULL; - if (Key == KEY_ESC) /* ESC */ - { - Key = KdbpGetCharSerial(); - if (Key == '[') - { - Key = KdbpGetCharSerial(); - - switch (Key) - { - case 'A': - ScanCode = KEY_SCAN_UP; - break; - case 'B': - ScanCode = KEY_SCAN_DOWN; - break; - case 'C': - break; - case 'D': - break; - } - } - } - } - else - { - Key = (!NextKey ? KdbpGetCharKeyboard(&ScanCode) : NextKey); - NextKey = ANSI_NULL; - } + Key = KdpReadTermKey(&ScanCode); /* Check for return or newline */ if ((Key == '\r') || (Key == '\n')) { - if (Key == '\r') - { - /* - * We might need to discard the next '\n' which most clients - * should send after \r. Wait a bit to make sure we receive it. - */ - KeStallExecutionProcessor(100000); - - if (KdbDebugState & KD_DEBUG_KDSERIAL) - NextKey = KdbpTryGetCharSerial(5); - else - NextKey = KdbpTryGetCharKeyboard(&ScanCode, 5); - - if (NextKey == '\n' || NextKey == -1) /* \n or no response at all */ - NextKey = ANSI_NULL; - } - *Buffer = ANSI_NULL; KdIoPuts("\n"); return (SIZE_T)(Buffer - Orig); diff --git a/ntoskrnl/kd/kdterminal.c b/ntoskrnl/kd/kdterminal.c new file mode 100644 index 00000000000..00888230f1e --- /dev/null +++ b/ntoskrnl/kd/kdterminal.c @@ -0,0 +1,276 @@ +/* + * PROJECT: ReactOS KDBG Kernel Debugger Terminal Driver + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: KD Terminal Management + * COPYRIGHT: Copyright 2005 Gregor Anich <blight(a)blight.eu.org> + * Copyright 2022-2023 Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> + */ + +/* INCLUDES ******************************************************************/ + +#include <ntoskrnl.h> +#include "kdterminal.h" + +#define KdbpGetCharKeyboard(ScanCode) KdbpTryGetCharKeyboard((ScanCode), 0) +CHAR +KdbpTryGetCharKeyboard(PULONG ScanCode, ULONG Retry); + +#define KdbpGetCharSerial() KdbpTryGetCharSerial(0) +CHAR +KdbpTryGetCharSerial( + _In_ ULONG Retry); + +VOID +KdbpSendCommandSerial( + _In_ PCSTR Command); + + +/* GLOBALS *******************************************************************/ + +/* KD Controlling Terminal */ +ULONG KdbDebugState = 0; /* KDBG Settings (NOECHO, KDSERIAL) */ +SIZE KdTermSize = {0,0}; +BOOLEAN KdTermConnected = FALSE; +BOOLEAN KdTermSerial = FALSE; +BOOLEAN KdTermReportsSize = TRUE; + +static CHAR KdTermNextKey = ANSI_NULL; /* 1-character input queue buffer */ + + +/* FUNCTIONS *****************************************************************/ + +/** + * @brief Initializes the controlling terminal. + * + * @return + * TRUE if the controlling terminal is serial and detected + * as being connected, or FALSE if not. + **/ +BOOLEAN +KdpInitTerminal(VOID) +{ + /* Determine whether the controlling terminal is a serial terminal: + * serial output is enabled *and* KDSERIAL is set (i.e. user input + * through serial). */ + KdTermSerial = +#if 0 + // Old logic where KDSERIAL also enables serial output. + (KdbDebugState & KD_DEBUG_KDSERIAL) || + (KdpDebugMode.Serial && !KdpDebugMode.Screen); +#else + // New logic where KDSERIAL does not necessarily enable serial output. + KdpDebugMode.Serial && + ((KdbDebugState & KD_DEBUG_KDSERIAL) || !KdpDebugMode.Screen); +#endif + + /* Flush the input buffer */ + KdpFlushTerminalInput(); + + if (KdTermSerial) + { + ULONG Length; + + /* Enable line-wrap */ + KdbpSendCommandSerial("\x1b[?7h"); + + /* + * Query terminal type. + * Historically it was done with CTRL-E ('\x05'), however nowadays + * terminals respond to it with an empty (or a user-configurable) + * string. Instead, use the VT52-compatible 'ESC Z' sequence or the + * VT100-compatible 'ESC[c' one. + */ + KdbpSendCommandSerial("\x1b[c"); + KeStallExecutionProcessor(100000); + + Length = 0; + for (;;) + { + /* Verify we get an answer, but don't care about it */ + if (KdbpTryGetCharSerial(5000) == -1) + break; + ++Length; + } + + /* Terminal is connected (TRUE) or not connected (FALSE) */ + KdTermConnected = (Length > 0); + } + else + { + /* Terminal is not serial, assume it's *not* connected */ + KdTermConnected = FALSE; + } + return KdTermConnected; +} + +BOOLEAN +KdpUpdateTerminalSize( + _Out_ PSIZE TermSize) +{ + static CHAR Buffer[128]; + CHAR c; + LONG NumberOfCols = -1; // Or initialize to TermSize->cx ?? + LONG NumberOfRows = -1; // Or initialize to TermSize->cy ?? + + /* Retrieve the size of the controlling terminal only when it is serial */ + if (KdTermConnected && KdTermSerial && KdTermReportsSize) + { + /* Flush the input buffer */ + KdpFlushTerminalInput(); + + /* Try to query the terminal size. A reply looks like "\x1b[8;24;80t" */ + KdTermReportsSize = FALSE; + KdbpSendCommandSerial("\x1b[18t"); + KeStallExecutionProcessor(100000); + + c = KdbpTryGetCharSerial(5000); + if (c == KEY_ESC) + { + c = KdbpTryGetCharSerial(5000); + if (c == '[') + { + ULONG Length = 0; + for (;;) + { + c = KdbpTryGetCharSerial(5000); + if (c == -1) + break; + + Buffer[Length++] = c; + if (isalpha(c) || Length >= (sizeof(Buffer) - 1)) + break; + } + Buffer[Length] = ANSI_NULL; + + if (Buffer[0] == '8' && Buffer[1] == ';') + { + SIZE_T i; + for (i = 2; (i < Length) && (Buffer[i] != ';'); i++); + + if (Buffer[i] == ';') + { + Buffer[i++] = ANSI_NULL; + + /* Number of rows is now at Buffer + 2 + * and number of columns at Buffer + i */ + NumberOfRows = strtoul(Buffer + 2, NULL, 0); + NumberOfCols = strtoul(Buffer + i, NULL, 0); + KdTermReportsSize = TRUE; + } + } + } + /* Clear further characters */ + while (KdbpTryGetCharSerial(5000) != -1); + } + } + + if (NumberOfCols <= 0) + { + /* Set the number of columns to the default */ + if (KdpDebugMode.Screen && !KdTermSerial) + NumberOfCols = (SCREEN_WIDTH / 8 /*BOOTCHAR_WIDTH*/); + else + NumberOfCols = 80; + } + if (NumberOfRows <= 0) + { + /* Set the number of rows to the default */ + if (KdpDebugMode.Screen && !KdTermSerial) + NumberOfRows = (SCREEN_HEIGHT / (13 /*BOOTCHAR_HEIGHT*/ + 1)); + else + NumberOfRows = 24; + } + + TermSize->cx = NumberOfCols; + TermSize->cy = NumberOfRows; + + // KdIoPrintf("Cols/Rows: %dx%d\n", TermSize->cx, TermSize->cy); + + return KdTermReportsSize; +} + +/** + * @brief Flushes terminal input (either serial or PS/2). + **/ +VOID +KdpFlushTerminalInput(VOID) +{ + KdTermNextKey = ANSI_NULL; + if (KdbDebugState & KD_DEBUG_KDSERIAL) + { + while (KdbpTryGetCharSerial(1) != -1); + } + else + { + ULONG ScanCode; + while (KdbpTryGetCharKeyboard(&ScanCode, 1) != -1); + } +} + +/** + * @brief + * Reads one character from the terminal. This function returns + * a scan code even when reading is done from a serial terminal. + **/ +CHAR +KdpReadTermKey( + _Out_ PULONG ScanCode) +{ + CHAR Key; + + *ScanCode = 0; + + if (KdbDebugState & KD_DEBUG_KDSERIAL) + { + Key = (!KdTermNextKey ? KdbpGetCharSerial() : KdTermNextKey); + KdTermNextKey = ANSI_NULL; + if (Key == KEY_ESC) /* ESC */ + { + Key = KdbpGetCharSerial(); + if (Key == '[') + { + Key = KdbpGetCharSerial(); + switch (Key) + { + case 'A': + *ScanCode = KEY_SCAN_UP; + break; + case 'B': + *ScanCode = KEY_SCAN_DOWN; + break; + case 'C': + break; + case 'D': + break; + } + } + } + } + else + { + Key = (!KdTermNextKey ? KdbpGetCharKeyboard(ScanCode) : KdTermNextKey); + KdTermNextKey = ANSI_NULL; + } + + /* Check for return */ + if (Key == '\r') + { + /* + * We might need to discard the next '\n' which most clients + * should send after \r. Wait a bit to make sure we receive it. + */ + KeStallExecutionProcessor(100000); + + if (KdbDebugState & KD_DEBUG_KDSERIAL) + KdTermNextKey = KdbpTryGetCharSerial(5); + else + KdTermNextKey = KdbpTryGetCharKeyboard(ScanCode, 5); + + if (KdTermNextKey == '\n' || KdTermNextKey == -1) /* \n or no response at all */ + KdTermNextKey = ANSI_NULL; + } + + return Key; +} + +/* EOF */ diff --git a/ntoskrnl/kd/kdterminal.h b/ntoskrnl/kd/kdterminal.h index d5aab3fe48c..d930ff7ae98 100644 --- a/ntoskrnl/kd/kdterminal.h +++ b/ntoskrnl/kd/kdterminal.h @@ -21,9 +21,40 @@ #define KEYSC_HOME 0x0047 #define KEYSC_ARROWUP 0x0048 // == KEY_SCAN_UP -SIZE_T -KdIoReadLine( - _Out_ PCHAR Buffer, - _In_ SIZE_T Size); + +typedef struct _SIZE +{ + LONG cx; + LONG cy; +} SIZE, *PSIZE; + +/* KD Controlling Terminal */ + +/* These values MUST be nonzero, they're used as bit masks */ +typedef enum _KDB_OUTPUT_SETTINGS +{ + KD_DEBUG_KDSERIAL = 1, + KD_DEBUG_KDNOECHO = 2 +} KDB_OUTPUT_SETTINGS; + +extern ULONG KdbDebugState; +extern SIZE KdTermSize; +extern BOOLEAN KdTermConnected; +extern BOOLEAN KdTermSerial; +extern BOOLEAN KdTermReportsSize; + +BOOLEAN +KdpInitTerminal(VOID); + +BOOLEAN +KdpUpdateTerminalSize( + _Out_ PSIZE TermSize); + +VOID +KdpFlushTerminalInput(VOID); + +CHAR +KdpReadTermKey( + _Out_ PULONG ScanCode); /* EOF */ diff --git a/ntoskrnl/kdbg/kdb.c b/ntoskrnl/kdbg/kdb.c index 1b03f692ec5..8fd5b6675d8 100644 --- a/ntoskrnl/kdbg/kdb.c +++ b/ntoskrnl/kdbg/kdb.c @@ -49,7 +49,6 @@ static BOOLEAN KdbpEvenThoughWeHaveABreakPointToReenableWeAlsoHaveARealSingleSte LONG KdbLastBreakPointNr = -1; /* Index of the breakpoint which cause KDB to be entered */ ULONG KdbNumSingleSteps = 0; /* How many single steps to do */ BOOLEAN KdbSingleStepOver = FALSE; /* Whether to step over calls/reps. */ -ULONG KdbDebugState = 0; /* KDBG Settings (NOECHO, KDSERIAL) */ static BOOLEAN KdbEnteredOnSingleStep = FALSE; /* Set to true when KDB was entered because of single step */ PEPROCESS KdbCurrentProcess = NULL; /* The current process context in which KDB runs */ PEPROCESS KdbOriginalProcess = NULL; /* The process in whichs context KDB was intered */ @@ -1624,33 +1623,24 @@ continue_execution: } VOID -NTAPI KdbpGetCommandLineSettings( - PCHAR p1) + _In_ PCSTR p1) { #define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]) - 1) - while (p1 && (p1 = strchr(p1, ' '))) + while (p1 && *p1) { - /* Skip other spaces */ + /* Skip leading whitespace */ while (*p1 == ' ') ++p1; - if (!_strnicmp(p1, "KDSERIAL", CONST_STR_LEN("KDSERIAL"))) - { - p1 += CONST_STR_LEN("KDSERIAL"); - KdbDebugState |= KD_DEBUG_KDSERIAL; - KdpDebugMode.Serial = TRUE; - } - else if (!_strnicmp(p1, "KDNOECHO", CONST_STR_LEN("KDNOECHO"))) - { - p1 += CONST_STR_LEN("KDNOECHO"); - KdbDebugState |= KD_DEBUG_KDNOECHO; - } - else if (!_strnicmp(p1, "FIRSTCHANCE", CONST_STR_LEN("FIRSTCHANCE"))) + if (!_strnicmp(p1, "FIRSTCHANCE", CONST_STR_LEN("FIRSTCHANCE"))) { p1 += CONST_STR_LEN("FIRSTCHANCE"); KdbpSetEnterCondition(-1, TRUE, KdbEnterAlways); } + + /* Move on to the next option */ + p1 = strchr(p1, ' '); } } diff --git a/ntoskrnl/kdbg/kdb.h b/ntoskrnl/kdbg/kdb.h index 26c79577030..4e2c04e7e3c 100644 --- a/ntoskrnl/kdbg/kdb.h +++ b/ntoskrnl/kdbg/kdb.h @@ -51,12 +51,6 @@ typedef enum _KDB_ENTER_CONDITION KdbEnterFromUmode } KDB_ENTER_CONDITION; -/* These values MUST be nonzero. They're used as bit masks. */ -typedef enum _KDB_OUTPUT_SETTINGS -{ - KD_DEBUG_KDSERIAL = 1, - KD_DEBUG_KDNOECHO = 2 -} KDB_OUTPUT_SETTINGS; /* FUNCTIONS *****************************************************************/ @@ -187,7 +181,6 @@ extern LONG KdbLastBreakPointNr; extern ULONG KdbNumSingleSteps; extern BOOLEAN KdbSingleStepOver; extern PKDB_KTRAP_FRAME KdbCurrentTrapFrame; -extern ULONG KdbDebugState; LONG KdbpGetNextBreakPointNr( @@ -252,8 +245,8 @@ KdbpAttachToProcess( PVOID ProcessId); VOID -NTAPI -KdbpGetCommandLineSettings(PCHAR p1); +KdbpGetCommandLineSettings( + _In_ PCSTR p1); KD_CONTINUE_TYPE KdbEnterDebuggerException(IN PEXCEPTION_RECORD64 ExceptionRecord, @@ -289,19 +282,6 @@ KdbpSafeWriteMemory(OUT PVOID Dest, IN PVOID Src, IN ULONG Bytes); -#define KdbpGetCharKeyboard(ScanCode) KdbpTryGetCharKeyboard((ScanCode), 0) -CHAR -KdbpTryGetCharKeyboard(PULONG ScanCode, ULONG Retry); - -#define KdbpGetCharSerial() KdbpTryGetCharSerial(0) -CHAR -KdbpTryGetCharSerial( - _In_ ULONG Retry); - -VOID -KdbpSendCommandSerial( - _In_ PCSTR Command); - VOID KbdDisableMouse(VOID); diff --git a/ntoskrnl/kdbg/kdb_cli.c b/ntoskrnl/kdbg/kdb_cli.c index f909fecdfc7..f889bd850a7 100644 --- a/ntoskrnl/kdbg/kdb_cli.c +++ b/ntoskrnl/kdbg/kdb_cli.c @@ -131,8 +131,6 @@ static ULONG KdbNumberOfRowsPrinted = 0; static ULONG KdbNumberOfColsPrinted = 0; static BOOLEAN KdbOutputAborted = FALSE; static BOOLEAN KdbRepeatLastCommand = FALSE; -static LONG KdbNumberOfRowsTerminal = -1; -static LONG KdbNumberOfColsTerminal = -1; PCHAR KdbInitFileBuffer = NULL; /* Buffer where KDBinit file is loaded into during initialization */ BOOLEAN KdbpBugCheckRequested = FALSE; @@ -2786,26 +2784,35 @@ memrchr(const void *s, int c, size_t n) return NULL; } -/*!\brief Calculate pointer position for N lines upper of current position. +/** + * @brief Calculate pointer position for N lines above the current position. * - * \param Buffer Characters buffer to operate on. - * \param BufLength Buffer size. + * Calculate pointer position for N lines above the current displaying + * position within the given buffer. Used by KdbpPager(). * - * \note Calculate pointer position for N lines upper of current displaying - * position within the given buffer. + * @param[in] Buffer + * Character buffer to operate on. * - * Used by KdbpPager(). - * Now N lines count is hardcoded to KdbNumberOfRowsTerminal. - */ + * @param[in] BufLength + * Size of the buffer. + * + * @param[in] pCurPos + * Current position within the buffer. + * + * @return Beginning of the previous page of text. + * + * @note N lines count is hardcoded to the terminal's number of rows. + **/ static PCHAR CountOnePageUp( _In_ PCCH Buffer, _In_ ULONG BufLength, - _In_ PCCH pCurPos) + _In_ PCCH pCurPos, + _In_ const SIZE* TermSize) { PCCH p; // p0 is initial guess of Page Start - ULONG p0len = KdbNumberOfRowsTerminal * KdbNumberOfColsTerminal; + ULONG p0len = TermSize->cx * TermSize->cy; PCCH p0 = pCurPos - p0len; PCCH prev_p = p0, p1; ULONG j; @@ -2817,7 +2824,7 @@ CountOnePageUp( p = memrchr(p0, '\n', p0len); if (!p) p = p0; - for (j = KdbNumberOfRowsTerminal; j--; ) + for (j = TermSize->cy; j--; ) { int linesCnt; p1 = memrchr(p0, '\n', p-p0); @@ -2830,7 +2837,7 @@ CountOnePageUp( p = p0; break; } - linesCnt = (KdbNumberOfColsTerminal+prev_p-p-2) / KdbNumberOfColsTerminal; + linesCnt = (TermSize->cx+prev_p-p-2) / TermSize->cx; if (linesCnt > 1) j -= linesCnt-1; } @@ -2874,27 +2881,23 @@ KdpFilterEscapes( * Maximum length of buffer is limited only by memory size. * Uses KdpDprintf internally (NOT DbgPrint!). Callers must already hold the debugger lock. * - * Note: BufLength should be greater then (KdbNumberOfRowsTerminal * KdbNumberOfColsTerminal). + * Note: BufLength should be greater than (KdTermSize.cx * KdTermSize.cy). */ -VOID +static VOID KdbpPagerInternal( _In_ PCHAR Buffer, _In_ ULONG BufLength, _In_ BOOLEAN DoPage) { - static CHAR InBuffer[128]; static BOOLEAN TerminalInitialized = FALSE; - static BOOLEAN TerminalConnected = FALSE; - static BOOLEAN TerminalReportsSize = TRUE; CHAR c; ULONG ScanCode; PCHAR p; - ULONG Length; SIZE_T i; LONG RowsPrintedByTerminal; if (BufLength == 0) - return; + return; /* Check if the user has aborted output of the current command */ if (KdbOutputAborted) @@ -2904,117 +2907,13 @@ KdbpPagerInternal( if (!TerminalInitialized) { TerminalInitialized = TRUE; - - /* Enable line-wrap */ - KdbpSendCommandSerial("\x1b[?7h"); - - /* - * Query terminal type. - * Historically it was done with CTRL-E ('\x05'), however nowadays - * terminals respond to it with an empty (or a user-configurable) - * string. Instead, use the VT52-compatible 'ESC Z' sequence or the - * VT100-compatible 'ESC[c' one. - */ - KdbpSendCommandSerial("\x1b[c"); - KeStallExecutionProcessor(100000); - - Length = 0; - for (;;) - { - /* Verify we get an answer, but don't care about it */ - c = KdbpTryGetCharSerial(5000); - if (c == -1) - break; - ++Length; - } - if (Length > 0) - TerminalConnected = TRUE; + KdpInitTerminal(); } - /* Get number of rows and columns in terminal */ - if ((KdbNumberOfRowsTerminal < 0) || (KdbNumberOfColsTerminal < 0) || - /* Refresh terminal size each time when number of rows printed is 0 */ - (KdbNumberOfRowsPrinted) == 0) + /* Refresh terminal size each time when number of rows printed is 0 */ + if (KdbNumberOfRowsPrinted == 0) { - /* Retrieve the size of the serial terminal only when it is the - * controlling terminal: serial output is enabled *and* KDSERIAL - * is set (i.e. user input through serial). */ - BOOLEAN SerialTerminal = -#if 0 - // Old logic where KDSERIAL also enables serial output. - (KdbDebugState & KD_DEBUG_KDSERIAL) || - (KdpDebugMode.Serial && !KdpDebugMode.Screen); -#else - // New logic where KDSERIAL does not necessarily enable serial output. - KdpDebugMode.Serial && - ((KdbDebugState & KD_DEBUG_KDSERIAL) || !KdpDebugMode.Screen); -#endif - - if (SerialTerminal && TerminalConnected && TerminalReportsSize) - { - /* Try to query number of rows from terminal. A reply looks like "\x1b[8;24;80t" */ - TerminalReportsSize = FALSE; - KdbpSendCommandSerial("\x1b[18t"); - KeStallExecutionProcessor(100000); - - c = KdbpTryGetCharSerial(5000); - if (c == KEY_ESC) - { - c = KdbpTryGetCharSerial(5000); - if (c == '[') - { - Length = 0; - for (;;) - { - c = KdbpTryGetCharSerial(5000); - if (c == -1) - break; - - InBuffer[Length++] = c; - if (isalpha(c) || Length >= (sizeof(InBuffer) - 1)) - break; - } - InBuffer[Length] = '\0'; - - if (InBuffer[0] == '8' && InBuffer[1] == ';') - { - for (i = 2; (i < Length) && (InBuffer[i] != ';'); i++); - - if (InBuffer[i] == ';') - { - InBuffer[i++] = '\0'; - - /* Number of rows is now at Buffer + 2 and number of cols at Buffer + i */ - KdbNumberOfRowsTerminal = strtoul(InBuffer + 2, NULL, 0); - KdbNumberOfColsTerminal = strtoul(InBuffer + i, NULL, 0); - TerminalReportsSize = TRUE; - } - } - } - /* Clear further characters */ - while ((c = KdbpTryGetCharSerial(5000)) != -1); - } - } - - if (KdbNumberOfRowsTerminal <= 0) - { - /* Set number of rows to the default */ - if (KdpDebugMode.Screen && !SerialTerminal) - KdbNumberOfRowsTerminal = (SCREEN_HEIGHT / (13 /*BOOTCHAR_HEIGHT*/ + 1)); - else - KdbNumberOfRowsTerminal = 24; - } - if (KdbNumberOfColsTerminal <= 0) - { - /* Set number of cols to the default */ - if (KdpDebugMode.Screen && !SerialTerminal) - KdbNumberOfColsTerminal = (SCREEN_WIDTH / 8 /*BOOTCHAR_WIDTH*/); - else - KdbNumberOfColsTerminal = 80; - } - - // KdpDprintf("Cols/Rows: %dx%d\n", - // KdbNumberOfColsTerminal, KdbNumberOfRowsTerminal); + KdpUpdateTerminalSize(&KdTermSize); } /* Loop through the strings */ @@ -3041,7 +2940,7 @@ KdbpPagerInternal( /* Calculate the number of lines which will be printed in * the terminal when outputting the current line. */ if (i > 0) - RowsPrintedByTerminal = (i + KdbNumberOfColsPrinted - 1) / KdbNumberOfColsTerminal; + RowsPrintedByTerminal = (i + KdbNumberOfColsPrinted - 1) / KdTermSize.cx; else RowsPrintedByTerminal = 0; @@ -3051,9 +2950,10 @@ KdbpPagerInternal( //KdpDprintf("!%d!%d!%d!%d!", KdbNumberOfRowsPrinted, KdbNumberOfColsPrinted, i, RowsPrintedByTerminal); /* Display a prompt if we printed one screen full of text */ - if (KdbNumberOfRowsTerminal > 0 && - (LONG)(KdbNumberOfRowsPrinted + RowsPrintedByTerminal) >= KdbNumberOfRowsTerminal) + if (KdTermSize.cy > 0 && + (LONG)(KdbNumberOfRowsPrinted + RowsPrintedByTerminal) >= KdTermSize.cy) { + /* Disable the repetition of previous command with long many-page output */ KdbRepeatLastCommand = FALSE; if (KdbNumberOfColsPrinted > 0) @@ -3069,21 +2969,7 @@ KdbpPagerInternal( } RowsPrintedByTerminal++; - if (KdbDebugState & KD_DEBUG_KDSERIAL) - c = KdbpGetCharSerial(); - else - c = KdbpGetCharKeyboard(&ScanCode); - - if (c == '\r') - { - /* Try to read '\n' which might follow '\r' - if \n is not received here - * it will be interpreted as "return" when the next command should be read. - */ - if (KdbDebugState & KD_DEBUG_KDSERIAL) - c = KdbpTryGetCharSerial(5); - else - c = KdbpTryGetCharKeyboard(&ScanCode, 5); - } + c = KdpReadTermKey(&ScanCode); if (DoPage) { @@ -3106,13 +2992,13 @@ KdbpPagerInternal( if (ScanCode == KEYSC_END || c == 'e') { PCHAR pBufEnd = Buffer + BufLength; - p = CountOnePageUp(Buffer, BufLength, pBufEnd); + p = CountOnePageUp(Buffer, BufLength, pBufEnd, &KdTermSize); i = strcspn(p, "\n"); } else if (ScanCode == KEYSC_PAGEUP || ScanCode == KEYSC_ARROWUP || c == 'u') { - p = CountOnePageUp(Buffer, BufLength, p); + p = CountOnePageUp(Buffer, BufLength, p, &KdTermSize); i = strcspn(p, "\n"); } else if (ScanCode == KEYSC_HOME || c == 'h') @@ -3139,11 +3025,10 @@ KdbpPagerInternal( /* Remove escape sequences from the line if there is no terminal connected */ // FIXME: Dangerous operation since we modify the source string!! - if (!TerminalConnected) + if (!KdTermConnected) KdpFilterEscapes(p); /* Print the current line */ - // KdpDprintf(p); KdpDprintf("%s", p); /* Restore not null char with saved */ @@ -3178,7 +3063,7 @@ KdbpPagerInternal( * Maximum length of buffer is limited only by memory size. * Uses KdpDprintf internally (NOT DbgPrint!). Callers must already hold the debugger lock. * - * Note: BufLength should be greater then (KdbNumberOfRowsTerminal * KdbNumberOfColsTerminal). + * Note: BufLength should be greater than (KdTermSize.cx * KdTermSize.cy). */ VOID KdbpPager( @@ -3408,17 +3293,6 @@ KdbpCliMainLoop( KdbpPrint("\n"); } - /* Flush the input buffer */ - if (KdbDebugState & KD_DEBUG_KDSERIAL) - { - while (KdbpTryGetCharSerial(1) != -1); - } - else - { - ULONG ScanCode; - while (KdbpTryGetCharKeyboard(&ScanCode, 1) != -1); - } - /* Main loop */ do { @@ -3687,6 +3561,13 @@ KdbInitialize( /* Write out the functions that we support for now */ DispatchTable->KdpPrintRoutine = KdbDebugPrint; + /* Check if we have a command line */ + if (KeLoaderBlock && KeLoaderBlock->LoadOptions) + { + /* Get the KDBG Settings */ + KdbpGetCommandLineSettings(KeLoaderBlock->LoadOptions); + } + /* Register for BootPhase 1 initialization and as a Provider */ DispatchTable->KdpInitRoutine = KdbInitialize; InsertTailList(&KdProviders, &DispatchTable->KdProvidersList); diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake index 8df4eacccc3..8f3b6c8abbf 100644 --- a/ntoskrnl/ntos.cmake +++ b/ntoskrnl/ntos.cmake @@ -415,7 +415,8 @@ if(NOT _WINKD_) ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdmain.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdprompt.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdps2kbd.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdserial.c) + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdserial.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdterminal.c) else() add_definitions(-D_WINKD_)
1 year, 9 months
1
0
0
0
[reactos] 01/01: [SYSSETUP] Tweak IDD_COMPUTERPAGE positioning (#5198)
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=56bf3969cd88aa9028f99…
commit 56bf3969cd88aa9028f9961355c56f72ece13207 Author: Joachim Henze <joachim.henze(a)reactos.org> AuthorDate: Wed Mar 29 01:23:00 2023 +0200 Commit: GitHub <noreply(a)github.com> CommitDate: Wed Mar 29 01:23:00 2023 +0200 [SYSSETUP] Tweak IDD_COMPUTERPAGE positioning (#5198) - make all 3 input boxes IDC_COMPUTERNAME, IDC_ADMINPASSWORD1, IDC_ADMINPASSWORD2 on this page the same length for all languages and start and end at same x-coord, e.g. sk-SK.rc, uk-UA.rc - let the input boxes end at the same x as the edits in the previous dlg IDD_OWNERPAGE - respect the right margin of the dialog with all controls for all languages, makes it look more harmonic to previous and next dlg, see video: - make the input fields as wide as possible, but not wider, depending on what the language allowed I used width of 139, 148, 163 (163 is same as the EDITs in IDD_OWNERPAGE used) - fix too small x offset for some controls in some languages like bg-BG.rc, that looked very off - in zh-CN.rc fix the maximum allowed length for computer name from 63 to 15 - ja-JP.rc 15 is max chars for computer name, not 63 - Fix it-IT text truncation "Organizzazione" in IDD_OWNERPAGE - pl-PL.rc Steal some wisdom from 0.4.9 to better stick with en-US.rc dimensions. --- dll/win32/syssetup/lang/bg-BG.rc | 18 +++++++++--------- dll/win32/syssetup/lang/cs-CZ.rc | 10 +++++----- dll/win32/syssetup/lang/da-DK.rc | 16 ++++++++-------- dll/win32/syssetup/lang/de-DE.rc | 12 ++++++------ dll/win32/syssetup/lang/el-GR.rc | 10 +++++----- dll/win32/syssetup/lang/en-GB.rc | 16 ++++++++-------- dll/win32/syssetup/lang/en-US.rc | 16 ++++++++-------- dll/win32/syssetup/lang/es-ES.rc | 22 +++++++++++----------- dll/win32/syssetup/lang/et-EE.rc | 16 ++++++++-------- dll/win32/syssetup/lang/eu-ES.rc | 22 +++++++++++----------- dll/win32/syssetup/lang/fr-FR.rc | 16 ++++++++-------- dll/win32/syssetup/lang/he-IL.rc | 16 ++++++++-------- dll/win32/syssetup/lang/hi-IN.rc | 17 ++++++++--------- dll/win32/syssetup/lang/hr-HR.rc | 18 +++++++++--------- dll/win32/syssetup/lang/hu-HU.rc | 10 +++++----- dll/win32/syssetup/lang/id-ID.rc | 16 ++++++++-------- dll/win32/syssetup/lang/it-IT.rc | 22 +++++++++++----------- dll/win32/syssetup/lang/ja-JP.rc | 16 ++++++++-------- dll/win32/syssetup/lang/nl-NL.rc | 16 ++++++++-------- dll/win32/syssetup/lang/no-NO.rc | 10 +++++----- dll/win32/syssetup/lang/pl-PL.rc | 38 +++++++++++++++++++------------------- dll/win32/syssetup/lang/pt-BR.rc | 16 ++++++++-------- dll/win32/syssetup/lang/pt-PT.rc | 16 ++++++++-------- dll/win32/syssetup/lang/ro-RO.rc | 16 ++++++++-------- dll/win32/syssetup/lang/ru-RU.rc | 16 ++++++++-------- dll/win32/syssetup/lang/sk-SK.rc | 10 +++++----- dll/win32/syssetup/lang/sq-AL.rc | 16 ++++++++-------- dll/win32/syssetup/lang/sv-SE.rc | 16 ++++++++-------- dll/win32/syssetup/lang/th-TH.rc | 16 ++++++++-------- dll/win32/syssetup/lang/tr-TR.rc | 16 ++++++++-------- dll/win32/syssetup/lang/uk-UA.rc | 16 ++++++++-------- dll/win32/syssetup/lang/zh-CN.rc | 10 +++++----- dll/win32/syssetup/lang/zh-HK.rc | 16 ++++++++-------- dll/win32/syssetup/lang/zh-TW.rc | 16 ++++++++-------- 34 files changed, 274 insertions(+), 275 deletions(-) diff --git a/dll/win32/syssetup/lang/bg-BG.rc b/dll/win32/syssetup/lang/bg-BG.rc index 216d3fb38b5..6905bb1f86a 100644 --- a/dll/win32/syssetup/lang/bg-BG.rc +++ b/dll/win32/syssetup/lang/bg-BG.rc @@ -55,16 +55,16 @@ CAPTION "Настройка на РеактОС" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Напишете ненадвишаващо 15 знака име на компютъра. Ако сте в мрежа, никой друг компютър не трябва да има същото име.", IDC_STATIC, 45, 7, 250, 24 - LTEXT "Име на &компютъра:", IDC_STATIC, 45, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + LTEXT "Напишете ненадвишаващо 15 знака име на компютъра. Ако сте в мрежа, никой друг компютър не трябва да има същото име.", IDC_STATIC, 54, 7, 241, 24 + LTEXT "Име на &компютъра:", IDC_STATIC, 54, 38, 75, 8 + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Настройката ще създаде потребителска сметка, под името „Administrator“. Можете да използвате тази сметка, за да получите пълен достъп до компютъра.", IDC_STATIC, 45, 57, 250, 25 - LTEXT "Напишете парола за „Administrator“, не по- дълга от 127 знака.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Парола за „Administrator“:", IDC_STATIC, 45, 104, 95, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "По&твърдете паролата:", IDC_STATIC, 45, 123, 95, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Настройката ще създаде потребителска сметка, под името „Administrator“. Можете да използвате тази сметка, за да получите пълен достъп до компютъра.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Напишете парола за „Administrator“, не по- дълга от 127 знака.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Парола за „Administrator“:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "По&твърдете паролата:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/cs-CZ.rc b/dll/win32/syssetup/lang/cs-CZ.rc index d41f7a3c3b3..6920c7a3960 100644 --- a/dll/win32/syssetup/lang/cs-CZ.rc +++ b/dll/win32/syssetup/lang/cs-CZ.rc @@ -63,16 +63,16 @@ CAPTION "ReactOS Instalátor" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Napište jméno Vašeho počítače o délce 15 znaků nebo méně. Pokud je počítač připojen k síti, musí být jeho jméno unikátní.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Napište jméno Vašeho počítače o délce 15 znaků nebo méně. Pokud je počítač připojen k síti, musí být jeho jméno unikátní.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Jméno počítače:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Instalátor vytvoří uživatelský účet nazvaný Administrator. Můžete tento účet použít, pokud budete potřebovat úplný přístup k Vašemu počítači.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Zadejte heslo účtu Administrator o délce 127 znaků nebo méně.", IDC_STATIC, 54, 87, 250, 8 + LTEXT "Instalátor vytvoří uživatelský účet nazvaný Administrator. Můžete tento účet použít, pokud budete potřebovat úplný přístup k Vašemu počítači.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Zadejte heslo účtu Administrator o délce 127 znaků nebo méně.", IDC_STATIC, 54, 87, 241, 8 LTEXT "&Heslo:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD LTEXT "&Potvrdit heslo:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/da-DK.rc b/dll/win32/syssetup/lang/da-DK.rc index 9bf69780f95..98077b91e47 100644 --- a/dll/win32/syssetup/lang/da-DK.rc +++ b/dll/win32/syssetup/lang/da-DK.rc @@ -63,16 +63,16 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Computer Name:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/de-DE.rc b/dll/win32/syssetup/lang/de-DE.rc index 64984bbd617..0691b49fdf7 100644 --- a/dll/win32/syssetup/lang/de-DE.rc +++ b/dll/win32/syssetup/lang/de-DE.rc @@ -55,16 +55,16 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Bitte geben Sie einen Computernamen maximal 15 Zeichen ein. Wenn Sie im Netzwerk sind, muss dieser Name einmalig sein.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Bitte geben Sie einen Computernamen maximal 15 Zeichen ein. Wenn Sie im Netzwerk sind, muss dieser Name einmalig sein.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Computername:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 132, 35, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Das Installationsprogramm wird ein Administratorkonto erstellen. Benutzen Sie es, wenn Sie vollen Zugriff auf Ihren Computer benötigen.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Geben Sie ein Passwort für das Administratorkonto mit max. 127 Zeichen ein.", IDC_STATIC, 54, 87, 250, 8 + LTEXT "Das Installationsprogramm wird ein Administratorkonto erstellen. Benutzen Sie es, wenn Sie vollen Zugriff auf Ihren Computer benötigen.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Geben Sie ein Passwort für das Administratorkonto ein. (max. 127 Zeichen)", IDC_STATIC, 54, 87, 241, 8 LTEXT "&Administratorpasswort:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD LTEXT "&Passwort bestätigen:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/el-GR.rc b/dll/win32/syssetup/lang/el-GR.rc index 6c7414eef7c..e024d61bb7f 100644 --- a/dll/win32/syssetup/lang/el-GR.rc +++ b/dll/win32/syssetup/lang/el-GR.rc @@ -55,16 +55,16 @@ CAPTION "Εγκατάσταση του ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Εισάγετε το όνομα του υπολογιστή σας, το οποίο δεν πρέπει να ξεπερνά τους 15 χαρακτήρες. Άν ο υπολογιστής ανήκει σε κάποιο δίκτυο, το όνομά του πρέπει να είναι μοναδικό.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Εισάγετε το όνομα του υπολογιστή σας, το οποίο δεν πρέπει να ξεπερνά τους 15 χαρακτήρες. Άν ο υπολογιστής ανήκει σε κάποιο δίκτυο, το όνομά του πρέπει να είναι μοναδικό.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Όνομα υπολογιστή:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Η εγκατάσταση θα δημιουργήσει ένα λογαριαρισμό διαχειριστή στον υπολογιστή σας με το όνομα Administrator. Με το λογιαριασμό διαχειριστή μπορείτε να αποκτήσετε τον πλήρη έλεγχο του υπολογιστή.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Εισάγετε παρακάτω τον κωδικό πρόσβασης διαχειριστή ο οποίος δεν πρέπει να ξεπερνά τους 127 χαρακτήρες.", IDC_STATIC, 54, 83, 250, 16 + LTEXT "Η εγκατάσταση θα δημιουργήσει ένα λογαριαρισμό διαχειριστή στον υπολογιστή σας με το όνομα Administrator.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Εισάγετε παρακάτω τον κωδικό πρόσβασης διαχειριστή ο οποίος δεν πρέπει να ξεπερνά τους 127 χαρακτήρες.", IDC_STATIC, 54, 83, 241, 16 LTEXT "&Κωδικός πρόσβασης:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD LTEXT "&Επιβεβαίωση κωδικού:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/en-GB.rc b/dll/win32/syssetup/lang/en-GB.rc index 2db95470d24..39a10e9ba78 100644 --- a/dll/win32/syssetup/lang/en-GB.rc +++ b/dll/win32/syssetup/lang/en-GB.rc @@ -55,16 +55,16 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Computer Name:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/en-US.rc b/dll/win32/syssetup/lang/en-US.rc index 469674558c0..5b9e0d7ca03 100644 --- a/dll/win32/syssetup/lang/en-US.rc +++ b/dll/win32/syssetup/lang/en-US.rc @@ -63,16 +63,16 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Computer Name:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/es-ES.rc b/dll/win32/syssetup/lang/es-ES.rc index 7d2032e6372..ca055087c4f 100644 --- a/dll/win32/syssetup/lang/es-ES.rc +++ b/dll/win32/syssetup/lang/es-ES.rc @@ -52,9 +52,9 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON2, IDC_STATIC, 21, 7, 20, 20 LTEXT "Escriba su nombre completo y el nombre de su compañia u organización.", IDC_STATIC, 54, 7, 242, 21 - LTEXT "&Nombre:", IDC_STATIC, 83, 37, 44, 8, SS_RIGHT + LTEXT "&Nombre:", IDC_STATIC, 54, 37, 44, 8 EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "&Organización:", IDC_STATIC, 83, 57, 44, 8, SS_RIGHT + LTEXT "&Organización:", IDC_STATIC, 54, 57, 44, 8 EDITTEXT IDC_OWNERORGANIZATION, 132, 55, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL END @@ -64,16 +64,16 @@ CAPTION "Instalación de ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Escriba un nombre para su equipo que sea de 15 caracteres o menos. Si se encuentra conectado a una red, el nombre tiene que ser único.", IDC_STATIC, 54, 7, 250, 24 - LTEXT "Nombre del &equipo:", IDC_STATIC, 53, 38, 75, 8, SS_RIGHT - EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + LTEXT "Escriba un nombre para su equipo que sea de 15 caracteres o menos. Si se encuentra conectado a una red, el nombre tiene que ser único.", IDC_STATIC, 54, 7, 241, 24 + LTEXT "Nombre del &equipo:", IDC_STATIC, 54, 38, 75, 8 + EDITTEXT IDC_COMPUTERNAME, 156, 35, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "El instalador creará un perfil de usuario en su equipo llamado Administrador. Puede utilizar este perfil si necesita acceso completo a su equipo.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Escriba una contraseña para este perfil de 127 caracteres o menos.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "Contraseña de &Administrador:", IDC_STATIC, 25, 104, 104, 8, SS_RIGHT - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "&Repita la contraseña:", IDC_STATIC, 54, 123, 75, 8, SS_RIGHT - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "El instalador creará un perfil de usuario en su equipo llamado Administrador. Puede utilizar este perfil si necesita acceso completo a su equipo.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Escriba una contraseña para este perfil de 127 caracteres o menos.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "Contraseña de &Administrador:", IDC_STATIC, 54, 104, 99, 8 + EDITTEXT IDC_ADMINPASSWORD1, 156, 101, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "&Repita la contraseña:", IDC_STATIC, 54, 123, 99, 8 + EDITTEXT IDC_ADMINPASSWORD2, 156, 120, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/et-EE.rc b/dll/win32/syssetup/lang/et-EE.rc index a197c6263bb..b78a7beea7b 100644 --- a/dll/win32/syssetup/lang/et-EE.rc +++ b/dll/win32/syssetup/lang/et-EE.rc @@ -55,16 +55,16 @@ CAPTION "ReactOS'i paigaldus" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Andke oma arvutile nimi. See ei tohi olla pikem kui 15 tähemärki. Arvuti nimi peab võrgus olema unikaalne.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Andke oma arvutile nimi. See ei tohi olla pikem kui 15 tähemärki. Arvuti nimi peab võrgus olema unikaalne.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Arvuti nimi:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Arvuti täielikuks haldamiseks luuakse administraatori konto (Administrator). ", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Sisestage administraatori parool, mille pikkus on maksimaalselt 127 tähemärki.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "A&dministraatori parool:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "&Kinnita parool:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Arvuti täielikuks haldamiseks luuakse administraatori konto (Administrator).", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Sisestage administraatori parool, mis on kuni 127 tähemärki.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "A&dministraatori parool:", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "&Kinnita parool:", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/eu-ES.rc b/dll/win32/syssetup/lang/eu-ES.rc index f3dc7b259f0..a83f1bd54c2 100644 --- a/dll/win32/syssetup/lang/eu-ES.rc +++ b/dll/win32/syssetup/lang/eu-ES.rc @@ -50,9 +50,9 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON2, IDC_STATIC, 21, 7, 20, 20 LTEXT "Sartu zure erabiltzaile-izena eta zure enpresa edo erakundearen izena.", IDC_STATIC, 54, 7, 242, 21 - LTEXT "&Izena:", IDC_STATIC, 83, 37, 44, 8, SS_RIGHT + LTEXT "&Izena:", IDC_STATIC, 54, 37, 44, 8 EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "&Erakundea:", IDC_STATIC, 83, 57, 44, 8, SS_RIGHT + LTEXT "&Erakundea:", IDC_STATIC, 54, 57, 44, 8 EDITTEXT IDC_OWNERORGANIZATION, 132, 55, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL END @@ -62,16 +62,16 @@ CAPTION "ReactOS-aren Instalazioa" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Sartu zure taldearen izena 15 karaktere edo gutxiagokoa. Sare batera konektatuta bazaude, izenak bakarra izan behar du.", IDC_STATIC, 54, 7, 250, 24 - LTEXT "O&rdenagailuaren izena:", IDC_STATIC, 53, 38, 75, 8, SS_RIGHT - EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + LTEXT "Sartu zure taldearen izena 15 karaktere edo gutxiagokoa. Sare batera konektatuta bazaude, izenak bakarra izan behar du.", IDC_STATIC, 54, 7, 241, 24 + LTEXT "O&rdenagailuaren izena:", IDC_STATIC, 54, 38, 75, 8 + EDITTEXT IDC_COMPUTERNAME, 156, 35, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Instalatzaileak erabiltzaile-profil bat sortuko du zure ordenagailuan Administrator izenekoa. Profil hau erabil dezakezu zure ordenagailurako sarbide osoa behar baduzu.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Sartu 127 karaktere edo gutxiagoko profil honen pasahitza.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "Administratzailearen &pasahitza:", IDC_STATIC, 25, 104, 104, 8, SS_RIGHT - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "&Errepikatu pasahitza:", IDC_STATIC, 54, 123, 75, 8, SS_RIGHT - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Instalatzaileak erabiltzaile-profil bat sortuko du zure ordenagailuan Administrator izenekoa. Profil hau erabil dezakezu zure ordenagailurako sarbide osoa behar baduzu.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Sartu 127 karaktere edo gutxiagoko profil honen pasahitza.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "Administratzailearen &pasahitza:", IDC_STATIC, 54, 104, 99, 8 + EDITTEXT IDC_ADMINPASSWORD1, 156, 101, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "&Errepikatu pasahitza:", IDC_STATIC, 54, 123, 99, 8 + EDITTEXT IDC_ADMINPASSWORD2, 156, 120, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/fr-FR.rc b/dll/win32/syssetup/lang/fr-FR.rc index b88606343f1..3269acc5a83 100644 --- a/dll/win32/syssetup/lang/fr-FR.rc +++ b/dll/win32/syssetup/lang/fr-FR.rc @@ -55,16 +55,16 @@ CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Entrez un nom pour votre ordinateur d'au plus 15 caractères. Si vous êtes sur un réseau, le nom saisi doit être unique.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Entrez un nom pour votre ordinateur d'au plus 15 caractères. Si vous êtes sur un réseau, le nom saisi doit être unique.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Nom de l'ordinateur :", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "L'assistant va créer un compte utilisateur sur votre ordinateur appelé Administrateur. Vous pourrez utiliser ce compte pour avoir un accès complet à votre ordinateur.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Entrez le mot de passe Administrateur (127 caractères ou moins).", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Mot de passe :", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "Confirmation :", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "L'assistant va créer un compte utilisateur sur votre ordinateur appelé Administrateur. Vous pourrez utiliser ce compte pour avoir un accès complet à votre ordinateur.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Entrez le mot de passe Administrateur (127 caractères ou moins).", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Mot de passe :", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Confirmation :", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/he-IL.rc b/dll/win32/syssetup/lang/he-IL.rc index 72de93e5b18..f6645eeb5b5 100644 --- a/dll/win32/syssetup/lang/he-IL.rc +++ b/dll/win32/syssetup/lang/he-IL.rc @@ -55,16 +55,16 @@ CAPTION "התקנת ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "הקלד שם עבור מחשבך שהינו באורך 15 תווים או פחות. אם הינך נמצא ברשת, שם המחשב חייב להיות ייחודי.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "הקלד שם עבור מחשבך שהינו באורך 15 תווים או פחות. אם הינך נמצא ברשת, שם המחשב חייב להיות ייחודי.", IDC_STATIC, 54, 7, 241, 24 LTEXT "שם המחשב:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "סיסמת מנהל:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "אישור סיסמה:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "סיסמת מנהל:", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "אישור סיסמה:", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/hi-IN.rc b/dll/win32/syssetup/lang/hi-IN.rc index 3ae65fa361a..53af1f83330 100644 --- a/dll/win32/syssetup/lang/hi-IN.rc +++ b/dll/win32/syssetup/lang/hi-IN.rc @@ -62,16 +62,16 @@ CAPTION "रिऐक्ट ओएस सेटअप" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "अपने कंप्यूटर के लिए एक नाम लिखें जो १५ वर्ण या उससे कम का हो। यदि आप नेटवर्क पर हैं, तो आपके कंप्यूटर का नाम अद्वितीय होना चाहिए।", IDC_STATIC, 54, 7, 250, 24 + LTEXT "अपने कंप्यूटर के लिए एक नाम लिखें जो १५ वर्ण या उससे कम का हो। यदि आप नेटवर्क पर हैं, तो आपके कंप्यूटर का नाम अद्वितीय होना चाहिए।", IDC_STATIC, 54, 7, 241, 24 LTEXT "&कंप्यूटर का नाम:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "सेटअप आपके कंप्यूटर पर एक उपयोगकर्ता खाता बनाएगा जिसे एडमिनिस्ट्रेटर कहा जाता है। यदि आपको अपने कंप्यूटर पर पूर्ण पहुंच की आवश्यकता है तो आप इस खाते का उपयोग कर सकते हैं।", IDC_STATIC, 54, 57, 250, 25 - LTEXT "एक एडमिनिस्ट्रेटर पासवर्ड टाइप करें जो १२७ वर्ण या उससे कम का हो।", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&एडमिनिस्ट्रेटर पासवर्ड:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "पासवर्ड की &पुष्टि कीजिये:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "सेटअप आपके कंप्यूटर पर एक उपयोगकर्ता खाता बनाएगा जिसे एडमिनिस्ट्रेटर कहा जाता है। यदि आपको अपने कंप्यूटर पर पूर्ण पहुंच की आवश्यकता है तो आप इस खाते का उपयोग कर सकते हैं।", IDC_STATIC, 54, 57, 241, 25 + LTEXT "एक एडमिनिस्ट्रेटर पासवर्ड टाइप करें जो १२७ वर्ण या उससे कम का हो।", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&एडमिनिस्ट्रेटर पासवर्ड:", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "पासवर्ड की &पुष्टि कीजिये:", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 @@ -193,7 +193,6 @@ BEGIN IDS_PROCESSSUBTITLE "Please wait while Setup completes the final steps." IDS_THEMESELECTIONTITLE "दिखावट" IDS_THEMESELECTIONSUBTITLE "अपनी पसंद का थीम चुनें।" - END STRINGTABLE diff --git a/dll/win32/syssetup/lang/hr-HR.rc b/dll/win32/syssetup/lang/hr-HR.rc index 4579c40a465..7cac236162b 100644 --- a/dll/win32/syssetup/lang/hr-HR.rc +++ b/dll/win32/syssetup/lang/hr-HR.rc @@ -26,7 +26,7 @@ BEGIN LISTBOX IDC_PROJECTS, 15, 30, 286, 75, LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL LTEXT "ReactOS je licenciran pod GPL-om, pa ako ga želite ponovno koristiti ili redistribuirati (dijelove) morate poštivati GPL.", IDC_STATIC, 15, 110, 227, 19 PUSHBUTTON "&Vidi GPL...", IDC_VIEWGPL, 251, 110, 50, 19 - LTEXT "Klikinite Napred da biste nastavili..", IDC_STATIC, 15, 136, 195, 17 + LTEXT "Klikinite Napred da biste nastavili.", IDC_STATIC, 15, 136, 195, 17 END IDD_PRODUCT DIALOGEX 0, 0, 317, 143 @@ -62,16 +62,16 @@ CAPTION "ReactOS Instalacija" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Unesite naziv za svoje računalo koji ima 15 znakova ili manje. Ako ste na mreži, naziv vašeg računala treba biti jedinstven.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Unesite naziv za svoje računalo koji ima 15 znakova ili manje. Ako ste na mreži, naziv vašeg računala treba biti jedinstven.", IDC_STATIC, 54, 7, 241, 24 LTEXT "Naz&iv računala:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Postavljanje će stvoriti korisnički račun na vašem računalu pod nazivom Administrator. Možete koristiti ovaj račun ako trebate puni pristup svom računalu.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Upišite administratorsku lozinku koja ima 127 znakova ili manje.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Administratorska lozinka:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "&Potvrdi lozinku:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Postavljanje će stvoriti korisnički račun na vašem računalu pod nazivom Administrator. Možete koristiti ovaj račun ako trebate puni pristup svom računalu.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Upišite administratorsku lozinku koja ima 127 znakova ili manje.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Administratorska lozinka:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "&Potvrdi lozinku:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/hu-HU.rc b/dll/win32/syssetup/lang/hu-HU.rc index 871fa65bc4a..a4ec724c254 100644 --- a/dll/win32/syssetup/lang/hu-HU.rc +++ b/dll/win32/syssetup/lang/hu-HU.rc @@ -55,16 +55,16 @@ CAPTION "ReactOS telepítő" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Adjon egy nevet a számítógépnek, ami nem több mint 15 betű. Ha hálózaton van, akkor ennek a névnek egyedinek kell lennie.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Adjon egy nevet a számítógépnek, ami nem több mint 15 betű. Ha hálózaton van, akkor ennek a névnek egyedinek kell lennie.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Számítógépnév:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "A telepítő létrehoz egy felhasználói fiókot, a Rendszergazdát. Ezzel a fiókkal teljes joga van a számítógépe felett.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Adjon meg egy jelszót, ami nem több mint 127 karakter.", IDC_STATIC, 54, 87, 250, 8 + LTEXT "A telepítő létrehoz egy felhasználói fiókot, a Rendszergazdát. Ezzel a fiókkal teljes joga van a számítógépe felett.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Adjon meg egy jelszót, ami nem több mint 127 karakter.", IDC_STATIC, 54, 87, 241, 8 LTEXT "&Jelszó:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD LTEXT "&Megerősítés:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/id-ID.rc b/dll/win32/syssetup/lang/id-ID.rc index 5fe2428acf5..ddc9d909b9f 100644 --- a/dll/win32/syssetup/lang/id-ID.rc +++ b/dll/win32/syssetup/lang/id-ID.rc @@ -55,16 +55,16 @@ CAPTION "Penyetelan ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Ketikkan nama komputer anda maksimal 15 karakter. Jika anda berada dalam jaringan, nama komputer anda haruslah unik.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Ketikkan nama komputer anda maksimal 15 karakter. Jika anda berada dalam jaringan, nama komputer anda haruslah unik.", IDC_STATIC, 54, 7, 241, 24 LTEXT "Nama &Komputer:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Penyetel ini akan membuat akun pengguna yang dinamai dengan Administrator. Jadi anda bisa menggunakan akun ini ketika membutuhkan akses penuh pada komputer anda.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Ketikkan Kata Sandi Administrator maksimal 127.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "Kata Sandi &Administrator:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "Konfir&masi Kata Sandi:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Penyetel ini akan membuat akun pengguna yang dinamai dengan Administrator. Jadi anda bisa menggunakan akun ini ketika membutuhkan akses penuh pada komputer anda.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Ketikkan Kata Sandi Administrator maksimal 127.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "Kata Sandi &Administrator:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Konfir&masi Kata Sandi:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/it-IT.rc b/dll/win32/syssetup/lang/it-IT.rc index 2b1e3759634..e106a21b846 100644 --- a/dll/win32/syssetup/lang/it-IT.rc +++ b/dll/win32/syssetup/lang/it-IT.rc @@ -43,9 +43,9 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON2, IDC_STATIC, 21, 7, 20, 20 LTEXT "Scrivere il proprio nome completo e il nome della propria ditta o organizzazione.", IDC_STATIC, 54, 7, 242, 21 - LTEXT "No&me:", IDC_STATIC, 26, 39, 90, 8 + LTEXT "No&me:", IDC_STATIC, 54, 37, 44, 8 EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "&Organizzazione:", IDC_STATIC, 26, 59, 90, 8 + LTEXT "&Organizzazione:", IDC_STATIC, 54, 57, 70, 8 EDITTEXT IDC_OWNERORGANIZATION, 132, 55, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL END @@ -55,16 +55,16 @@ CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Scrivere un nome per il computer che sia lungo al massimo 15 caratteri.\nSe si è in rete, il nome del computer deve essere univoco.", IDC_STATIC, 54, 7, 250, 24 - LTEXT "Nome del &computer:", IDC_STATIC, 29, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 140, 35, 160, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + LTEXT "Scrivere un nome per il computer che sia lungo al massimo 15 caratteri.\nSe si è in rete, il nome del computer deve essere univoco.", IDC_STATIC, 54, 7, 241, 24 + LTEXT "Nome del &computer:", IDC_STATIC, 54, 38, 75, 8 + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Questa procedura creerà su questo computer un account utente chiamato Administrator. Si potrà usare questo account se si necessita l'accesso completo al computer.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Scrivere una password per Administrator che sia lunga al massimo 127 caratteri.", IDC_STATIC, 26, 87, 280, 8 - LTEXT "Password per &Administrator:", IDC_STATIC, 29, 105, 95, 8 - EDITTEXT IDC_ADMINPASSWORD1, 140, 100, 160, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfermare la password:", IDC_STATIC, 29, 125, 95, 8 - EDITTEXT IDC_ADMINPASSWORD2, 140, 120, 160, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Questa procedura creerà su questo computer un account utente chiamato Administrator. Si potrà usare questo account se si necessita l'accesso completo al computer.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Scrivere una password per Administrator di massimo 127 caratteri.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "Password per &Administrator:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfermare la password:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/ja-JP.rc b/dll/win32/syssetup/lang/ja-JP.rc index b59e5ee9034..960a72d36cd 100644 --- a/dll/win32/syssetup/lang/ja-JP.rc +++ b/dll/win32/syssetup/lang/ja-JP.rc @@ -55,16 +55,16 @@ CAPTION "ReactOS セットアップ" FONT 9, "MS UI Gothic" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "コンピュータ名を半角 63 文字以内で入力して下さい。コンピュータがネットワーク上にある場合は、名前が重複しないようにして下さい。", IDC_STATIC, 54, 7, 250, 24 + LTEXT "コンピュータ名を半角 15 文字以内で入力して下さい。コンピュータがネットワーク上にある場合は、名前が重複しないようにして下さい。", IDC_STATIC, 54, 7, 241, 24 LTEXT "コンピュータ名(&C):", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 156, 35, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Administrator と呼ばれるユーザー アカウントを作成します。コンピュータにフルアクセスが必要なとき、このアカウントを使用します。", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Administrator のパスワードを半角 127 文字以内で入力して下さい。", IDC_STATIC, 54, 87, 250, 8 - LTEXT "Administrator のパスワード(&A):", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "パスワードの確認入力(&O):", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Administrator と呼ばれるユーザー アカウントを作成します。コンピュータにフルアクセスが必要なとき、このアカウントを使用します。", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Administrator のパスワードを半角 127 文字以内で入力して下さい。", IDC_STATIC, 54, 87, 241, 8 + LTEXT "Administrator のパスワード(&A):", IDC_STATIC, 54, 104, 99, 8 + EDITTEXT IDC_ADMINPASSWORD1, 156, 101, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "パスワードの確認入力(&O):", IDC_STATIC, 54, 123, 99, 8 + EDITTEXT IDC_ADMINPASSWORD2, 156, 120, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/nl-NL.rc b/dll/win32/syssetup/lang/nl-NL.rc index 6ee368434bc..54f8d43a232 100644 --- a/dll/win32/syssetup/lang/nl-NL.rc +++ b/dll/win32/syssetup/lang/nl-NL.rc @@ -55,16 +55,16 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Geef een naam in voor de computer. In een netwerk moet je een unieke naam kiezen.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Geef een naam in voor de computer. In een netwerk moet je een unieke naam kiezen.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Computernaam:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/no-NO.rc b/dll/win32/syssetup/lang/no-NO.rc index 88320f8bfd2..b28136bcf63 100644 --- a/dll/win32/syssetup/lang/no-NO.rc +++ b/dll/win32/syssetup/lang/no-NO.rc @@ -55,16 +55,16 @@ CAPTION "ReactOS installasjon" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Skriv inn et navn for din datamaskin som er 15 karakterer eller mindre. Hvis du er på et nettverk, så må ditt datamaskin navn være unikt.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Skriv inn et navn for din datamaskin som er 15 karakterer eller mindre. Hvis du er på et nettverk, så må ditt datamaskin navn være unikt.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Datamaskin navn:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Installasjonen vil lage en brukerkonto som blir kalt Administrator. Du kan bruke denne kontoen hvis du trenger full adgang til din datamaskin.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Skriv inn et Administrator passord som er 127 karakterer eller mindre.", IDC_STATIC, 54, 87, 250, 8 + LTEXT "Installasjonen vil lage en brukerkonto som blir kalt Administrator. Du kan bruke denne kontoen hvis du trenger full adgang til din datamaskin.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Skriv inn et Administrator passord som er 127 karakterer eller mindre.", IDC_STATIC, 54, 87, 241, 8 LTEXT "&Administrator passord:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD LTEXT "B&ekreft passord:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/pl-PL.rc b/dll/win32/syssetup/lang/pl-PL.rc index b702155f2f9..7adda97c3bd 100644 --- a/dll/win32/syssetup/lang/pl-PL.rc +++ b/dll/win32/syssetup/lang/pl-PL.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_WELCOMEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator systemu ReactOS" +CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Witamy w Kreatorze instalacji systemu ReactOS", IDC_WELCOMETITLE, 115, 8, 195, 24 @@ -12,18 +12,18 @@ END IDD_ACKPAGE DIALOGEX 0, 0, 317, 145 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator systemu ReactOS" +CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Twórcy systemu ReactOS chcieliby podziękować następującym projektom Open Source, których to fragmenty zostały wykorzystane do stworzenia systemu ReactOS:", IDC_STATIC, 15, 7, 286, 19 + LTEXT "Twórcy ReactOS chcieliby podziękować następującym projektom Open Source, których to fragmenty zostały wykorzystane do stworzenia ReactOS:", IDC_STATIC, 15, 7, 286, 19 LISTBOX IDC_PROJECTS, 15, 30, 286, 75, LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "System ReactOS oparty jest na licencji GPL, więc by w całości lub częściowo wykorzystać źródła systemu ReactOS, musisz przestrzegać postanowień licencji.", IDC_STATIC, 15, 110, 230, 28 + LTEXT "ReactOS oparty jest na licencji GPL, więc by w całości lub częściowo wykorzystać źródła ReactOS, musisz przestrzegać postanowień licencji.", IDC_STATIC, 15, 110, 227, 19 PUSHBUTTON "Pokaż &GPL..", IDC_VIEWGPL, 251, 110, 50, 19 - LTEXT "Kliknij Dalej, by kontynuować.", IDC_STATIC, 15, 135, 195, 17 + LTEXT "Kliknij Dalej, by kontynuować.", IDC_STATIC, 15, 136, 195, 17 END IDD_PRODUCT DIALOGEX 0, 0, 317, 143 -CAPTION "Instalator systemu ReactOS" +CAPTION "Instalator ReactOS" STYLE DS_MODALFRAME | DS_SHELLFONT | WS_POPUPWINDOW | WS_CAPTION | WS_VISIBLE FONT 8, "MS Shell Dlg" BEGIN @@ -38,7 +38,7 @@ END IDD_OWNERPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator systemu ReactOS" +CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON2, IDC_STATIC, 21, 7, 20, 20 @@ -51,25 +51,25 @@ END IDD_COMPUTERPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator systemu ReactOS" +CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Podaj nazwę komputera, nie dłuższą niż 15 znaków. Jeśli chcesz pracować w sieci, nazwa musi pozostać unikalna.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Podaj nazwę komputera, nie dłuższą niż 15 znaków. Jeśli chcesz pracować w sieci, nazwa musi pozostać unikalna.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Nazwa komputera:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Instalator utworzy konto o nazwie Administrator. Używaj tego konta, jeżeli potrzebujesz pełnego dostępu do komputera.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Wprowadź hasło administratora. Hasło nie może być dłuższe niż 127 znaków.", IDC_STATIC, 54, 87, 250, 8 + LTEXT "Instalator utworzy konto o nazwie Administrator. Używaj tego konta, jeżeli potrzebujesz pełnego dostępu do komputera.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Podaj hasło administratora, nie dłuższe niż 127 znaków.", IDC_STATIC, 54, 87, 241, 8 LTEXT "&Hasło administratora:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD LTEXT "&Potwierdź hasło:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator systemu ReactOS" +CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 @@ -86,7 +86,7 @@ END IDD_DATETIMEPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator systemu ReactOS" +CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON3, IDC_STATIC, 21, 10, 20, 20 @@ -100,7 +100,7 @@ END IDD_THEMEPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator systemu ReactOS" +CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_THEMEPICKER, "SysListView32", LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_TABSTOP, 18, 8, 288, 130 @@ -108,7 +108,7 @@ END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalator systemu ReactOS" +CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Rejestracja składników", IDC_TASKTEXT1, 65, 27, 232, 8 @@ -121,7 +121,7 @@ END IDD_FINISHPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kończenie instalacji systemu ReactOS" +CAPTION "Kończenie instalacji ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Kończenie pracy Kreatora instalacji systemu ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 @@ -190,7 +190,7 @@ END STRINGTABLE BEGIN - IDS_REACTOS_SETUP "Instalator systemu ReactOS" + IDS_REACTOS_SETUP "Instalator ReactOS" IDS_UNKNOWN_ERROR "Nieznany błąd" IDS_LOADLIBRARY_FAILED "Funkcja LoadLibrary napotkała problem: " IDS_GETPROCADDR_FAILED "Funkcja GetProcAddr napotkała problem: " diff --git a/dll/win32/syssetup/lang/pt-BR.rc b/dll/win32/syssetup/lang/pt-BR.rc index 01fc23f3b01..cf67f09e71e 100644 --- a/dll/win32/syssetup/lang/pt-BR.rc +++ b/dll/win32/syssetup/lang/pt-BR.rc @@ -55,16 +55,16 @@ CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Digite um nome para o seu computador com 15 caracteres ou menos. Se você está em uma rede, o nome do computador deve ser exclusivo.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Digite um nome para o seu computador com 15 caracteres ou menos. Se você está em uma rede, o nome do computador deve ser exclusivo.", IDC_STATIC, 54, 7, 241, 24 LTEXT "Nome do &Computador:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "A instalação vai criar uma conta no seu computador chamada Administrator. Você pode usar esta conta se precisar de acesso total ao seu computador.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Digite uma senha para o administrador com 127 caracteres ou menos.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "Senha do &Administrador:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfirma Senha:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "A instalação vai criar uma conta no seu computador chamada Administrator. Você pode usar esta conta se precisar de acesso total ao seu computador.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Digite uma senha para o administrador com 127 caracteres ou menos.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "Senha do &Administrador:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfirma Senha:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/pt-PT.rc b/dll/win32/syssetup/lang/pt-PT.rc index c10b791c079..23b99c28d6e 100644 --- a/dll/win32/syssetup/lang/pt-PT.rc +++ b/dll/win32/syssetup/lang/pt-PT.rc @@ -55,16 +55,16 @@ CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Digite um nome para o seu computador com 15 caracteres ou menos. Se está numa rede, o nome do computador terá de ser exclusivo.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Digite um nome para o seu computador com 15 caracteres ou menos. Se está numa rede, o nome do computador terá de ser exclusivo.", IDC_STATIC, 54, 7, 241, 24 LTEXT "Nome do &Computador:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "A instalação vai criar uma conta chamada Administrador. Pode usar esta conta se precisar de acesso total ao seu computador.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Digite uma palavra-passe para o administrador com 127 caracteres ou menos.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "Palavra-passe do &Administrador:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfirme a palavra-passe:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "A instalação vai criar uma conta chamada Administrador. Pode usar esta conta se precisar de acesso total ao seu computador.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Digite uma senha de administrador com 127 caracteres ou menos.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "Senha do &Administrador:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfirme sua senha:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/ro-RO.rc b/dll/win32/syssetup/lang/ro-RO.rc index 91a43e9b08b..fbe859b94d6 100644 --- a/dll/win32/syssetup/lang/ro-RO.rc +++ b/dll/win32/syssetup/lang/ro-RO.rc @@ -64,16 +64,16 @@ CAPTION "Asistent de instalare ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Scrieți un nume pentru calculator de maxim 15 de caractere. Dacă sunteți într-o rețea, numele calculatorului trebuie să fie unic în acea rețea.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Scrieți un nume pentru calculator de maxim 15 de caractere. Dacă sunteți într-o rețea, numele calculatorului trebuie să fie unic în acea rețea.", IDC_STATIC, 54, 7, 241, 24 LTEXT "N&ume calculator:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Asistentul va crea un cont de utilizator cu numele Administrator. Îl puteți folosi când veți avea nevoie de control complet asupra calculatorului.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Introduceți o parolă pentru contul Administrator de maxim 127 caractere.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Parolă Administrator:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "&Confirmare parolă:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Asistentul va crea un cont de utilizator cu numele Administrator. Îl puteți folosi când veți avea nevoie de control complet asupra calculatorului.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Introduceți o parolă pentru contul Administrator de maxim 127 caractere.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Parolă Administrator:", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "&Confirmare parolă:", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/ru-RU.rc b/dll/win32/syssetup/lang/ru-RU.rc index 03e07368777..63b2ff9ac7d 100644 --- a/dll/win32/syssetup/lang/ru-RU.rc +++ b/dll/win32/syssetup/lang/ru-RU.rc @@ -63,16 +63,16 @@ CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Введите имя вашего компьютера (не более 15 символов). Если ваш компьютер подключен к сети, то его имя должно быть уникально.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Введите имя вашего компьютера (не более 15 символов). Если ваш компьютер подключен к сети, то его имя должно быть уникально.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Имя компьютера:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "При установке будет создан профиль пользователя с именем Администратор. Вы можете использовать этот профиль, если вам нужно получить права администратора.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Введите пароль администратора (не более 127 символов).", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Пароль администратора:", IDC_STATIC, 54, 104, 96, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "П&овторите пароль:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "При установке будет создан профиль пользователя с именем Администратор. Вы можете использовать этот профиль, если вам нужно получить права администратора.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Введите пароль администратора (не более 127 символов).", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Пароль администратора:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "П&овторите пароль:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/sk-SK.rc b/dll/win32/syssetup/lang/sk-SK.rc index 285e5d35cf1..f0201ff3c2d 100644 --- a/dll/win32/syssetup/lang/sk-SK.rc +++ b/dll/win32/syssetup/lang/sk-SK.rc @@ -62,16 +62,16 @@ CAPTION "Inštalátor systému ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Napíšte názov Vášho počítača v dĺžke 15 znakov alebo menej. Ak je počítač pripojený k sieti, musí býť jeho názov unikátny.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Napíšte názov Vášho počítača v dĺžke 15 znakov alebo menej. Ak je počítač pripojený k sieti, musí býť jeho názov unikátny.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Názov počítača:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Inštalátor vytvorí na počítači používateľský účet nazvaný Administrator. Tento účet môžete použiť, keď budete potrebovať plný prístup k Vášmu počítaču.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Zadajte heslo účtu Administrator v dĺžke 127 znakov alebo menej.", IDC_STATIC, 54, 87, 250, 8 + LTEXT "Inštalátor vytvorí na počítači používateľský účet nazvaný Administrator. Tento účet môžete použiť, keď budete potrebovať plný prístup k Vášmu počítaču.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Zadajte heslo účtu Administrator v dĺžke 127 znakov alebo menej.", IDC_STATIC, 54, 87, 241, 8 LTEXT "&Heslo:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD LTEXT "&Potvrdiť heslo:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/sq-AL.rc b/dll/win32/syssetup/lang/sq-AL.rc index 43087340c53..56800eaab40 100644 --- a/dll/win32/syssetup/lang/sq-AL.rc +++ b/dll/win32/syssetup/lang/sq-AL.rc @@ -63,16 +63,16 @@ CAPTION "Ndërto ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Shkruani një emër për kompjuterin tuaj që është 15 karaktere ose më pak. Nëse ju jeni në një rrjet, emri kompjuterit tuaj duhet të jetë unik.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Shkruani një emër për kompjuterin tuaj që është 15 karaktere ose më pak. Nëse ju jeni në një rrjet, emri kompjuterit tuaj duhet të jetë unik.", IDC_STATIC, 54, 7, 241, 24 LTEXT "Emri &Kompjuterit:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Ndërtuesi do të krijojë një llogari përdoruesi në kompjuterin tuaj të quajtur Administrator. Ju mund të përdorni këtë llogari në qoftë se keni nevojë për akses të plotë në kompjuterin tuaj.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Shkruani një fjalëkalim Administratori që është 127 karaktere ose më pak.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "Fjalëkalimi &Administratorit:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "K&onfirmo Fjalëkalimin:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Ndërtuesi do të krijojë një llogari përdoruesi në kompjuterin tuaj të quajtur Administrator. Ju mund të përdorni këtë llogari në qoftë se keni nevojë për akses të plotë në kompjuterin tuaj.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Shkruani një fjalëkalim Administratori që është 127 karaktere ose më pak.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "Fjalëkalimi &Administratorit:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "K&onfirmo Fjalëkalimin:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/sv-SE.rc b/dll/win32/syssetup/lang/sv-SE.rc index 964086a63a0..6b2d38fab85 100644 --- a/dll/win32/syssetup/lang/sv-SE.rc +++ b/dll/win32/syssetup/lang/sv-SE.rc @@ -63,16 +63,16 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Computer Name:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/th-TH.rc b/dll/win32/syssetup/lang/th-TH.rc index 82d4c7ba4b4..cfbba08e160 100644 --- a/dll/win32/syssetup/lang/th-TH.rc +++ b/dll/win32/syssetup/lang/th-TH.rc @@ -63,16 +63,16 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Computer Name:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 147, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Type an Administrator Password that is 127 characters or less.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Administrator Password:", IDC_STATIC, 54, 104, 90, 8 + EDITTEXT IDC_ADMINPASSWORD1, 147, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "C&onfirm Password:", IDC_STATIC, 54, 123, 90, 8 + EDITTEXT IDC_ADMINPASSWORD2, 147, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/tr-TR.rc b/dll/win32/syssetup/lang/tr-TR.rc index a504f2cce5a..6720b6bec57 100644 --- a/dll/win32/syssetup/lang/tr-TR.rc +++ b/dll/win32/syssetup/lang/tr-TR.rc @@ -64,16 +64,16 @@ CAPTION "ReactOS Kur" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Bilgisayarınız için 15 ya da daha az karakterlik bir ad yazınız. Bir ağ üzerindeyseniz bilgisayarınızın adı eşsiz olmalıdır.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Bilgisayarınız için 15 ya da daha az karakterlik bir ad yazınız. Bir ağ üzerindeyseniz bilgisayarınızın adı eşsiz olmalıdır.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Bilgisayar Adı:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Kur, bilgisayarınızda Yönetici adlı bir kullanıcı hesabı oluşturacaktır. Bilgisayarınıza tam erişime gerek duyarsanız bu hesabı kullanabilirsiniz.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "127 ya da daha az karakterlik bir Yönetici şifresi yazınız.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Yönetici Şifresi:", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "&Şifreyi Doğrula:", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Kur, bilgisayarınızda Yönetici adlı bir kullanıcı hesabı oluşturacaktır. Bilgisayarınıza tam erişime gerek duyarsanız bu hesabı kullanabilirsiniz.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "127 ya da daha az karakterlik bir Yönetici şifresi yazınız.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Yönetici Şifresi:", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "&Şifreyi Doğrula:", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/uk-UA.rc b/dll/win32/syssetup/lang/uk-UA.rc index 41dac4e1872..6ee0d62a035 100644 --- a/dll/win32/syssetup/lang/uk-UA.rc +++ b/dll/win32/syssetup/lang/uk-UA.rc @@ -64,16 +64,16 @@ CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Введіть ім'я Вашого комп'ютера довжиною до 15 символів. Якщо Ви працюєте в мережі, ім'я Вашого комп'ютера має бути унікальним.", IDC_STATIC, 54, 7, 250, 24 + LTEXT "Введіть ім'я Вашого комп'ютера довжиною до 15 символів. Якщо Ви працюєте в мережі, ім'я Вашого комп'ютера має бути унікальним.", IDC_STATIC, 54, 7, 241, 24 LTEXT "&Ім'я комп'ютера:", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 156, 35, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Програма встановлення створить обліковий запис користувача 'Адміністратор', який дає повні права доступу до Вашого комп'ютера.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Введіть пароль адміністратора довжиною до 127 символів.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Пароль адміністратора:", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "Пі&дтвердження:", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Програма встановлення створить обліковий запис користувача 'Адміністратор', який дає повні права доступу до Вашого комп'ютера.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "Введіть пароль адміністратора довжиною до 127 символів.", IDC_STATIC, 54, 87, 241, 8 + LTEXT "&Пароль адміністратора:", IDC_STATIC, 54, 104, 99, 8 + EDITTEXT IDC_ADMINPASSWORD1, 156, 101, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "Пі&дтвердження:", IDC_STATIC, 54, 123, 99, 8 + EDITTEXT IDC_ADMINPASSWORD2, 156, 120, 139, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/zh-CN.rc b/dll/win32/syssetup/lang/zh-CN.rc index c2ab72e03ba..cb75d164b0a 100644 --- a/dll/win32/syssetup/lang/zh-CN.rc +++ b/dll/win32/syssetup/lang/zh-CN.rc @@ -63,16 +63,16 @@ CAPTION "ReactOS 安装程序" FONT 9, "宋体" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "请输入不超过 63 个字符的计算机名。每个在您网络上的计算机都必须有一个唯一的名称。", IDC_STATIC, 54, 7, 250, 24 + LTEXT "请输入不超过 15 个字符的计算机名。每个在您网络上的计算机都必须有一个唯一的名称。", IDC_STATIC, 54, 7, 241, 24 LTEXT "计算机名(&C):", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "安装程序会创建一个称为 Administrator(系统管理员)的用户帐户。需要完全控制计算机时,可以使用这个帐户。", IDC_STATIC, 54, 57, 250, 25 - LTEXT "请键入不超过 127 个字符的系统管理员密码。", IDC_STATIC, 54, 87, 250, 8 + LTEXT "安装程序会创建一个称为 Administrator(系统管理员)的用户帐户。需要完全控制计算机时,可以使用这个帐户。", IDC_STATIC, 54, 57, 241, 25 + LTEXT "请键入不超过 127 个字符的系统管理员密码。", IDC_STATIC, 54, 87, 241, 8 LTEXT "系统管理员密码(&A):", IDC_STATIC, 54, 104, 75, 8 - EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD LTEXT "确认密码(&O):", IDC_STATIC, 54, 123, 75, 8 - EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/zh-HK.rc b/dll/win32/syssetup/lang/zh-HK.rc index c4619d2673e..39728a33f49 100644 --- a/dll/win32/syssetup/lang/zh-HK.rc +++ b/dll/win32/syssetup/lang/zh-HK.rc @@ -63,16 +63,16 @@ CAPTION "ReactOS 安裝程式" FONT 9, "新細明體" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "請輸入不超過 15 個字元的電腦名稱。每一個在您的網絡上的電腦都必須有一個獨一無二的名稱。", IDC_STATIC, 54, 7, 250, 24 + LTEXT "請輸入不超過 15 個字元的電腦名稱。每一個在您的網絡上的電腦都必須有一個獨一無二的名稱。", IDC_STATIC, 54, 7, 241, 24 LTEXT "電腦名稱(&C):", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "安裝程式會建立一個稱為 Administrator(系統管理員)的帳户。當需要完全控制電腦時,就可以使用這個帳户。", IDC_STATIC, 54, 57, 250, 25 - LTEXT "請輸入不超過 127 個字元的系統管理員密碼。", IDC_STATIC, 54, 87, 250, 8 - LTEXT "系統管理員密碼(&A):", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "確認密碼(&O):", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "安裝程式會建立一個稱為 Administrator(系統管理員)的帳户。當需要完全控制電腦時,就可以使用這個帳户。", IDC_STATIC, 54, 57, 241, 25 + LTEXT "請輸入不超過 127 個字元的系統管理員密碼。", IDC_STATIC, 54, 87, 241, 8 + LTEXT "系統管理員密碼(&A):", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "確認密碼(&O):", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143 diff --git a/dll/win32/syssetup/lang/zh-TW.rc b/dll/win32/syssetup/lang/zh-TW.rc index c0c6672d528..f813fd289c7 100644 --- a/dll/win32/syssetup/lang/zh-TW.rc +++ b/dll/win32/syssetup/lang/zh-TW.rc @@ -64,16 +64,16 @@ CAPTION "ReactOS 安裝程式" FONT 9, "新細明體" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "請輸入不超過 15 個字元的電腦名稱。每一個在您網路上的電腦都必須有一個獨一無二的名稱。", IDC_STATIC, 54, 7, 250, 24 + LTEXT "請輸入不超過 15 個字元的電腦名稱。每一個在您網路上的電腦都必須有一個獨一無二的名稱。", IDC_STATIC, 54, 7, 241, 24 LTEXT "電腦名稱(&C)︰", IDC_STATIC, 54, 38, 75, 8 - EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE + EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "安裝程式會建立一個稱為 Administrator (系統管理員) 的帳戶。當需要完全控制電腦時,可以使用這個帳戶。.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "請輸入不超過 127 個字元的系統管理員密碼。", IDC_STATIC, 54, 87, 250, 8 - LTEXT "系統管理員密碼(&A)︰", IDC_STATIC, 54, 104, 105, 8 - EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "確認密碼(&O)︰", IDC_STATIC, 54, 123, 105, 8 - EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "安裝程式會建立一個稱為 Administrator (系統管理員) 的帳戶。當需要完全控制電腦時,可以使用這個帳戶。.", IDC_STATIC, 54, 57, 241, 25 + LTEXT "請輸入不超過 127 個字元的系統管理員密碼。", IDC_STATIC, 54, 87, 241, 8 + LTEXT "系統管理員密碼(&A)︰", IDC_STATIC, 54, 104, 75, 8 + EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD + LTEXT "確認密碼(&O)︰", IDC_STATIC, 54, 123, 75, 8 + EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX 0, 0, 317, 143
1 year, 9 months
1
0
0
0
[reactos] 02/02: [NTOS:KD:KDBG] Isolate the read-line (prompt) functionality in a separate file.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f3dd7133823a298596605…
commit f3dd7133823a2985966059e52630e08ef4849cf5 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Mar 20 17:49:15 2023 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Tue Mar 28 16:14:40 2023 +0200 [NTOS:KD:KDBG] Isolate the read-line (prompt) functionality in a separate file. Rename KdbpReadCommand as KdIoReadLine. Extract the last-command repetition functionality out of KdIoReadLine and put it where it belongs: only in the KDBG command main loop KdbpCliMainLoop. --- ntoskrnl/kd/kdio.c | 5 +- ntoskrnl/kd/kdmain.c | 1 + ntoskrnl/kd/kdprompt.c | 166 +++++++++++++++++++++++++++++++++++++ ntoskrnl/kd/kdserial.c | 2 + ntoskrnl/kd/kdterminal.h | 29 +++++++ ntoskrnl/kdbg/kdb.h | 5 -- ntoskrnl/kdbg/kdb_cli.c | 209 ++++++----------------------------------------- ntoskrnl/ntos.cmake | 1 + 8 files changed, 226 insertions(+), 192 deletions(-) diff --git a/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c index f9e7b38abe1..a196b905113 100644 --- a/ntoskrnl/kd/kdio.c +++ b/ntoskrnl/kd/kdio.c @@ -12,6 +12,7 @@ #include <ntoskrnl.h> #include <reactos/buildno.h> #include "kd.h" +#include "kdterminal.h" #define NDEBUG #include <debug.h> @@ -779,8 +780,8 @@ KdReceivePacket( * in which case the string is simply truncated without NULL-termination. */ ResponseString.Length = - (USHORT)KdbpReadCommand(ResponseString.Buffer, - ResponseString.MaximumLength); + (USHORT)KdIoReadLine(ResponseString.Buffer, + ResponseString.MaximumLength); if (!(KdbDebugState & KD_DEBUG_KDSERIAL)) KbdEnableMouse(); diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c index de341bad204..aaed45432db 100644 --- a/ntoskrnl/kd/kdmain.c +++ b/ntoskrnl/kd/kdmain.c @@ -9,6 +9,7 @@ #include <ntoskrnl.h> #include "kd.h" + #define NDEBUG #include <debug.h> diff --git a/ntoskrnl/kd/kdprompt.c b/ntoskrnl/kd/kdprompt.c new file mode 100644 index 00000000000..f9ac04f6d03 --- /dev/null +++ b/ntoskrnl/kd/kdprompt.c @@ -0,0 +1,166 @@ +/* + * PROJECT: ReactOS KDBG Kernel Debugger Terminal Driver + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: Terminal line-editing (Prompt) interface + * COPYRIGHT: Copyright 2001-2004 David Welch <welch(a)cwcom.net> + * Copyright 2004-2005 Gregor Anich <blight(a)blight.eu.org> + * Copyright 2022-2023 Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> + */ + +/* INCLUDES ******************************************************************/ + +#include <ntoskrnl.h> +#include "kdterminal.h" + +/* FUNCTIONS *****************************************************************/ + +/** + * @brief Reads a line of user input from the terminal. + * + * @param[out] Buffer + * Buffer where to store the input. Trailing newlines are removed. + * + * @param[in] Size + * Size of @p Buffer. + * + * @return + * Returns the number of characters stored, not counting the NULL terminator. + * + * @note Accepts only \n newlines, \r is ignored. + **/ +SIZE_T +KdIoReadLine( + _Out_ PCHAR Buffer, + _In_ SIZE_T Size) +{ + PCHAR Orig = Buffer; + ULONG ScanCode = 0; + CHAR Key; + static CHAR NextKey = ANSI_NULL; + BOOLEAN EchoOn; + LONG CmdHistIndex = -1; // Start at end of history. + + /* Bail out if the buffer is zero-sized */ + if (Size == 0) + return 0; + + EchoOn = ((KdbDebugState & KD_DEBUG_KDNOECHO) == 0); + + for (;;) + { + ScanCode = 0; + if (KdbDebugState & KD_DEBUG_KDSERIAL) + { + Key = (!NextKey ? KdbpGetCharSerial() : NextKey); + NextKey = ANSI_NULL; + if (Key == KEY_ESC) /* ESC */ + { + Key = KdbpGetCharSerial(); + if (Key == '[') + { + Key = KdbpGetCharSerial(); + + switch (Key) + { + case 'A': + ScanCode = KEY_SCAN_UP; + break; + case 'B': + ScanCode = KEY_SCAN_DOWN; + break; + case 'C': + break; + case 'D': + break; + } + } + } + } + else + { + Key = (!NextKey ? KdbpGetCharKeyboard(&ScanCode) : NextKey); + NextKey = ANSI_NULL; + } + + /* Check for return or newline */ + if ((Key == '\r') || (Key == '\n')) + { + if (Key == '\r') + { + /* + * We might need to discard the next '\n' which most clients + * should send after \r. Wait a bit to make sure we receive it. + */ + KeStallExecutionProcessor(100000); + + if (KdbDebugState & KD_DEBUG_KDSERIAL) + NextKey = KdbpTryGetCharSerial(5); + else + NextKey = KdbpTryGetCharKeyboard(&ScanCode, 5); + + if (NextKey == '\n' || NextKey == -1) /* \n or no response at all */ + NextKey = ANSI_NULL; + } + + *Buffer = ANSI_NULL; + KdIoPuts("\n"); + return (SIZE_T)(Buffer - Orig); + } + else if (Key == KEY_BS || Key == KEY_DEL) + { + /* Erase the last character */ + if (Buffer > Orig) + { + Buffer--; + *Buffer = ANSI_NULL; + + if (EchoOn) + KdIoPrintf("%c %c", KEY_BS, KEY_BS); + else + KdIoPrintf(" %c", KEY_BS); + } + } + else if (ScanCode == KEY_SCAN_UP || ScanCode == KEY_SCAN_DOWN) + { + PCSTR CmdHistory = KdbGetHistoryEntry(&CmdHistIndex, + (ScanCode == KEY_SCAN_DOWN)); + if (CmdHistory) + { + SIZE_T i; + + /* Erase the whole line */ + while (Buffer > Orig) + { + Buffer--; + *Buffer = ANSI_NULL; + + if (EchoOn) + KdIoPrintf("%c %c", KEY_BS, KEY_BS); + else + KdIoPrintf(" %c", KEY_BS); + } + + /* Copy and display the history entry */ + i = min(strlen(CmdHistory), Size - 1); + memcpy(Orig, CmdHistory, i); + Orig[i] = ANSI_NULL; + Buffer = Orig + i; + KdIoPuts(Orig); + } + } + else + { + /* Do not accept characters anymore if the buffer is full */ + if ((SIZE_T)(Buffer - Orig) >= (Size - 1)) + continue; + + if (EchoOn) + KdIoPrintf("%c", Key); + + *Buffer = Key; + Buffer++; + } + } +} + +/* EOF */ diff --git a/ntoskrnl/kd/kdserial.c b/ntoskrnl/kd/kdserial.c index d36b7abe559..d854d92aca2 100644 --- a/ntoskrnl/kd/kdserial.c +++ b/ntoskrnl/kd/kdserial.c @@ -34,3 +34,5 @@ KdbpTryGetCharSerial( return Result; } + +/* EOF */ diff --git a/ntoskrnl/kd/kdterminal.h b/ntoskrnl/kd/kdterminal.h new file mode 100644 index 00000000000..d5aab3fe48c --- /dev/null +++ b/ntoskrnl/kd/kdterminal.h @@ -0,0 +1,29 @@ +/* + * PROJECT: ReactOS KDBG Kernel Debugger Terminal Driver + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: KD Terminal Driver public header + * COPYRIGHT: Copyright 2023 Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> + */ + +#pragma once + +#define KEY_BS 8 +#define KEY_ESC 27 +#define KEY_DEL 127 + +#define KEY_SCAN_UP 72 +#define KEY_SCAN_DOWN 80 + +/* Scan codes of keyboard keys */ +#define KEYSC_END 0x004f +#define KEYSC_PAGEUP 0x0049 +#define KEYSC_PAGEDOWN 0x0051 +#define KEYSC_HOME 0x0047 +#define KEYSC_ARROWUP 0x0048 // == KEY_SCAN_UP + +SIZE_T +KdIoReadLine( + _Out_ PCHAR Buffer, + _In_ SIZE_T Size); + +/* EOF */ diff --git a/ntoskrnl/kdbg/kdb.h b/ntoskrnl/kdbg/kdb.h index bf8a47e5ec1..26c79577030 100644 --- a/ntoskrnl/kdbg/kdb.h +++ b/ntoskrnl/kdbg/kdb.h @@ -113,11 +113,6 @@ KdbGetHistoryEntry( _Inout_ PLONG NextIndex, _In_ BOOLEAN Next); -SIZE_T -KdbpReadCommand( - _Out_ PCHAR Buffer, - _In_ SIZE_T Size); - VOID KdbpPager( _In_ PCHAR Buffer, diff --git a/ntoskrnl/kdbg/kdb_cli.c b/ntoskrnl/kdbg/kdb_cli.c index ad28412fd91..f909fecdfc7 100644 --- a/ntoskrnl/kdbg/kdb_cli.c +++ b/ntoskrnl/kdbg/kdb_cli.c @@ -29,26 +29,13 @@ /* INCLUDES ******************************************************************/ #include <ntoskrnl.h> +#include "../kd/kdterminal.h" #define NDEBUG #include <debug.h> /* DEFINES *******************************************************************/ -#define KEY_BS 8 -#define KEY_ESC 27 -#define KEY_DEL 127 - -#define KEY_SCAN_UP 72 -#define KEY_SCAN_DOWN 80 - -/* Scan codes of keyboard keys: */ -#define KEYSC_END 0x004f -#define KEYSC_PAGEUP 0x0049 -#define KEYSC_PAGEDOWN 0x0051 -#define KEYSC_HOME 0x0047 -#define KEYSC_ARROWUP 0x0048 - #define KDB_ENTER_CONDITION_TO_STRING(cond) \ ((cond) == KdbDoNotEnter ? "never" : \ ((cond) == KdbEnterAlways ? "always" : \ @@ -3253,172 +3240,6 @@ KdbpPrintUnicodeString( } -/** - * @brief Reads a line of user input from the terminal. - * - * @param[out] Buffer - * Buffer where to store the input. Trailing newlines are removed. - * - * @param[in] Size - * Size of \a Buffer. - * - * @return - * Returns the number of characters stored, not counting the NULL terminator. - * - * @note Accepts only \n newlines, \r is ignored. - **/ -SIZE_T -KdbpReadCommand( - _Out_ PCHAR Buffer, - _In_ SIZE_T Size) -{ - PCHAR Orig = Buffer; - ULONG ScanCode = 0; - CHAR Key; - BOOLEAN EchoOn; - static CHAR LastCommand[1024]; - static CHAR NextKey = '\0'; - LONG CmdHistIndex = -1; // Start at end of history. - - /* Bail out if the buffer is zero-sized */ - if (Size == 0) - return 0; - - EchoOn = ((KdbDebugState & KD_DEBUG_KDNOECHO) == 0); - - for (;;) - { - if (KdbDebugState & KD_DEBUG_KDSERIAL) - { - Key = (NextKey == '\0') ? KdbpGetCharSerial() : NextKey; - NextKey = '\0'; - ScanCode = 0; - if (Key == KEY_ESC) /* ESC */ - { - Key = KdbpGetCharSerial(); - if (Key == '[') - { - Key = KdbpGetCharSerial(); - - switch (Key) - { - case 'A': - ScanCode = KEY_SCAN_UP; - break; - case 'B': - ScanCode = KEY_SCAN_DOWN; - break; - case 'C': - break; - case 'D': - break; - } - } - } - } - else - { - ScanCode = 0; - Key = (NextKey == '\0') ? KdbpGetCharKeyboard(&ScanCode) : NextKey; - NextKey = '\0'; - } - - /* Check for return or newline */ - if ((Key == '\r') || (Key == '\n')) - { - if (Key == '\r') - { - /* - * We might need to discard the next '\n' which most clients - * should send after \r. Wait a bit to make sure we receive it. - */ - KeStallExecutionProcessor(100000); - - if (KdbDebugState & KD_DEBUG_KDSERIAL) - NextKey = KdbpTryGetCharSerial(5); - else - NextKey = KdbpTryGetCharKeyboard(&ScanCode, 5); - - if (NextKey == '\n' || NextKey == -1) /* \n or no response at all */ - NextKey = '\0'; - } - - KdpDprintf("\n"); - - /* - * Repeat the last command if the user presses enter. Reduces the - * risk of RSI when single-stepping. - */ - if (Buffer != Orig) - { - KdbRepeatLastCommand = TRUE; - *Buffer = '\0'; - RtlStringCbCopyA(LastCommand, sizeof(LastCommand), Orig); - } - else if (KdbRepeatLastCommand) - RtlStringCbCopyA(Buffer, Size, LastCommand); - else - *Buffer = '\0'; - - return (SIZE_T)(Buffer - Orig); - } - else if (Key == KEY_BS || Key == KEY_DEL) - { - /* Erase the last character */ - if (Buffer > Orig) - { - Buffer--; - *Buffer = '\0'; - - if (EchoOn) - KdpDprintf("%c %c", KEY_BS, KEY_BS); - else - KdpDprintf(" %c", KEY_BS); - } - } - else if (ScanCode == KEY_SCAN_UP || ScanCode == KEY_SCAN_DOWN) - { - PCSTR CmdHistory = KdbGetHistoryEntry(&CmdHistIndex, - (ScanCode == KEY_SCAN_DOWN)); - if (CmdHistory) - { - SIZE_T i; - - /* Erase the whole line */ - while (Buffer > Orig) - { - Buffer--; - *Buffer = '\0'; - - if (EchoOn) - KdpDprintf("%c %c", KEY_BS, KEY_BS); - else - KdpDprintf(" %c", KEY_BS); - } - - i = min(strlen(CmdHistory), Size - 1); - memcpy(Orig, CmdHistory, i); - Orig[i] = '\0'; - Buffer = Orig + i; - KdpDprintf("%s", Orig); - } - } - else - { - /* Don't accept any key if the buffer is full */ - if ((SIZE_T)(Buffer - Orig) >= (Size - 1)) - continue; - - if (EchoOn) - KdpDprintf("%c", Key); - - *Buffer = Key; - Buffer++; - } - } -} - - BOOLEAN NTAPI KdbRegisterCliCallback( @@ -3567,8 +3388,10 @@ VOID KdbpCliMainLoop( IN BOOLEAN EnteredOnSingleStep) { - static CHAR Command[1024]; BOOLEAN Continue; + SIZE_T CmdLen; + static CHAR Command[1024]; + static CHAR LastCommand[1024] = ""; if (EnteredOnSingleStep) { @@ -3603,11 +3426,27 @@ KdbpCliMainLoop( KdbNumberOfRowsPrinted = KdbNumberOfColsPrinted = 0; /* Print the prompt */ - KdbpPrint(KdbPromptString.Buffer); + KdpDprintf(KdbPromptString.Buffer); + + /* + * Read a command. Repeat the last one if the user pressed Enter. + * This reduces the risk of RSI when single-stepping! + */ + CmdLen = KdIoReadLine(Command, sizeof(Command)); + if (CmdLen > 0) // i.e. (*Command != ANSI_NULL) + { + /* Save this new last command */ + KdbRepeatLastCommand = TRUE; + RtlStringCbCopyA(LastCommand, sizeof(LastCommand), Command); - /* Read a command and remember it */ - KdbpReadCommand(Command, sizeof(Command)); - KdbpCommandHistoryAppend(Command); + /* Remember it */ + KdbpCommandHistoryAppend(Command); + } + else if (KdbRepeatLastCommand) + { + /* The user directly pressed Enter */ + RtlStringCbCopyA(Command, sizeof(Command), LastCommand); + } /* Reset the number of rows/cols printed and output aborted state */ KdbNumberOfRowsPrinted = KdbNumberOfColsPrinted = 0; diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake index 648de8faf6b..8df4eacccc3 100644 --- a/ntoskrnl/ntos.cmake +++ b/ntoskrnl/ntos.cmake @@ -413,6 +413,7 @@ if(NOT _WINKD_) list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdio.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdmain.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdprompt.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdps2kbd.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdserial.c)
1 year, 9 months
1
0
0
0
[reactos] 01/02: [NTOS:KDBG] Use KdbpSendCommandSerial() to send specific ANSI escape sequences.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=430d7ebb93b75df103d4e…
commit 430d7ebb93b75df103d4ebe2ab8ee3e6eac3ffe8 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Tue Mar 28 14:13:48 2023 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Tue Mar 28 16:14:39 2023 +0200 [NTOS:KDBG] Use KdbpSendCommandSerial() to send specific ANSI escape sequences. Use this function instead of KdpDprintf(), otherwise, we send them to **ALL** the display providers, including for example dmesg. Replaying the listing with dmesg would then cause the terminal to misbehave later. For example, it would send the answer of a "Query Device Attributes" command, as the response to a query for terminal size... --- ntoskrnl/kd/kdserial.c | 11 ++++++++++- ntoskrnl/kdbg/kdb.h | 9 +++++++-- ntoskrnl/kdbg/kdb_cli.c | 14 +++++--------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/ntoskrnl/kd/kdserial.c b/ntoskrnl/kd/kdserial.c index bedfcde159c..d36b7abe559 100644 --- a/ntoskrnl/kd/kdserial.c +++ b/ntoskrnl/kd/kdserial.c @@ -13,8 +13,17 @@ /* FUNCTIONS *****************************************************************/ +VOID +KdbpSendCommandSerial( + _In_ PCSTR Command) +{ + while (*Command) + KdPortPutByteEx(&SerialPortInfo, *Command++); +} + CHAR -KdbpTryGetCharSerial(ULONG Retry) +KdbpTryGetCharSerial( + _In_ ULONG Retry) { CHAR Result = -1; diff --git a/ntoskrnl/kdbg/kdb.h b/ntoskrnl/kdbg/kdb.h index ac3f8b13004..bf8a47e5ec1 100644 --- a/ntoskrnl/kdbg/kdb.h +++ b/ntoskrnl/kdbg/kdb.h @@ -294,13 +294,18 @@ KdbpSafeWriteMemory(OUT PVOID Dest, IN PVOID Src, IN ULONG Bytes); -#define KdbpGetCharKeyboard(ScanCode) KdbpTryGetCharKeyboard(ScanCode, 0) +#define KdbpGetCharKeyboard(ScanCode) KdbpTryGetCharKeyboard((ScanCode), 0) CHAR KdbpTryGetCharKeyboard(PULONG ScanCode, ULONG Retry); #define KdbpGetCharSerial() KdbpTryGetCharSerial(0) CHAR -KdbpTryGetCharSerial(ULONG Retry); +KdbpTryGetCharSerial( + _In_ ULONG Retry); + +VOID +KdbpSendCommandSerial( + _In_ PCSTR Command); VOID KbdDisableMouse(VOID); diff --git a/ntoskrnl/kdbg/kdb_cli.c b/ntoskrnl/kdbg/kdb_cli.c index bbfca348fe2..ad28412fd91 100644 --- a/ntoskrnl/kdbg/kdb_cli.c +++ b/ntoskrnl/kdbg/kdb_cli.c @@ -2919,7 +2919,7 @@ KdbpPagerInternal( TerminalInitialized = TRUE; /* Enable line-wrap */ - KdpDprintf("\x1b[?7h"); + KdbpSendCommandSerial("\x1b[?7h"); /* * Query terminal type. @@ -2928,7 +2928,7 @@ KdbpPagerInternal( * string. Instead, use the VT52-compatible 'ESC Z' sequence or the * VT100-compatible 'ESC[c' one. */ - KdpDprintf("\x1b[c"); + KdbpSendCommandSerial("\x1b[c"); KeStallExecutionProcessor(100000); Length = 0; @@ -2967,7 +2967,7 @@ KdbpPagerInternal( { /* Try to query number of rows from terminal. A reply looks like "\x1b[8;24;80t" */ TerminalReportsSize = FALSE; - KdpDprintf("\x1b[18t"); + KdbpSendCommandSerial("\x1b[18t"); KeStallExecutionProcessor(100000); c = KdbpTryGetCharSerial(5000); @@ -3122,7 +3122,8 @@ KdbpPagerInternal( p = CountOnePageUp(Buffer, BufLength, pBufEnd); i = strcspn(p, "\n"); } - else if (ScanCode == KEYSC_PAGEUP || c == 'u') + else if (ScanCode == KEYSC_PAGEUP || + ScanCode == KEYSC_ARROWUP || c == 'u') { p = CountOnePageUp(Buffer, BufLength, p); i = strcspn(p, "\n"); @@ -3132,11 +3133,6 @@ KdbpPagerInternal( p = Buffer; i = strcspn(p, "\n"); } - else if (ScanCode == KEYSC_ARROWUP) - { - p = CountOnePageUp(Buffer, BufLength, p); - i = strcspn(p, "\n"); - } } KdbNumberOfRowsPrinted = 0;
1 year, 9 months
1
0
0
0
[reactos] 01/01: [MSPAINT][ATL] Encapsulation: mainWindow (#5178)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=29e147beca5610149ed99…
commit 29e147beca5610149ed99a367b8e6abcceb4681f Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Mar 28 22:31:26 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Mar 28 22:31:26 2023 +0900 [MSPAINT][ATL] Encapsulation: mainWindow (#5178) - Add DoCreate methods to CFullscreenWindow, CMiniatureWindow, and CMainWindow classes. - Do encapsulation around mainWindow and _tWinMain. - Add GetOpenFileName, GetSaveFileName, and ChooseColor helper methods to CMainWindow class. - Move some code in WinMain into CMainWindow::OnCreate. - Delay creation of CFullscreenWindow and CMiniatureWindow. - Extend ATL CImage class as CImageDx in newly-created atlimagedx.h of mspaint. CORE-18867 --- base/applications/mspaint/atlimagedx.h | 141 ++++++++++++ base/applications/mspaint/canvas.cpp | 4 +- base/applications/mspaint/common.h | 36 ++- base/applications/mspaint/dialogs.cpp | 18 +- base/applications/mspaint/dib.cpp | 39 ++-- base/applications/mspaint/dib.h | 2 + base/applications/mspaint/fullscreen.cpp | 13 +- base/applications/mspaint/fullscreen.h | 3 + base/applications/mspaint/globalvar.h | 74 ++---- base/applications/mspaint/history.cpp | 4 +- base/applications/mspaint/imgarea.cpp | 2 + base/applications/mspaint/imgarea.h | 4 +- base/applications/mspaint/main.cpp | 329 +++++++++++---------------- base/applications/mspaint/miniature.cpp | 27 ++- base/applications/mspaint/miniature.h | 3 + base/applications/mspaint/palette.cpp | 16 +- base/applications/mspaint/palettemodel.cpp | 4 +- base/applications/mspaint/precomp.h | 32 +-- base/applications/mspaint/registry.cpp | 8 +- base/applications/mspaint/selection.cpp | 4 +- base/applications/mspaint/selectionmodel.cpp | 4 +- base/applications/mspaint/textedit.cpp | 4 +- base/applications/mspaint/toolbox.cpp | 4 +- base/applications/mspaint/toolsettings.cpp | 3 +- base/applications/mspaint/toolsmodel.cpp | 4 +- base/applications/mspaint/toolsmodel.h | 12 + base/applications/mspaint/winproc.cpp | 97 ++++++-- base/applications/mspaint/winproc.h | 9 + sdk/lib/atl/atlimage.h | 9 +- 29 files changed, 549 insertions(+), 360 deletions(-) diff --git a/base/applications/mspaint/atlimagedx.h b/base/applications/mspaint/atlimagedx.h new file mode 100644 index 00000000000..98ecb8612c7 --- /dev/null +++ b/base/applications/mspaint/atlimagedx.h @@ -0,0 +1,141 @@ +/* + * PROJECT: PAINT for ReactOS + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Loading/Saving an image file with getting/setting resolution + * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> + */ + +#pragma once + +class CImageDx : public CImage +{ +public: + CImageDx() : CImage() + { + GetImageHorizontalResolution = NULL; + GetImageVerticalResolution = NULL; + BitmapSetResolution = NULL; + } + + BOOL GetResolution(Gdiplus::GpImage *pImage, float *pxDpi, float *pyDpi) + { + *pxDpi = 96; + *pyDpi = 96; + + if (GetImageHorizontalResolution == NULL || GetImageVerticalResolution == NULL) + { + GetImageHorizontalResolution = + AddrOf<GETIMAGEHORIZONTALRESOLUTION>("GdipGetImageHorizontalResolution"); + GetImageVerticalResolution = + AddrOf<GETIMAGEVERTICALRESOLUTION>("GdipGetImageVerticalResolution"); + } + + if (GetImageHorizontalResolution == NULL || GetImageVerticalResolution == NULL) + return FALSE; + + GetImageHorizontalResolution(pImage, pxDpi); + GetImageVerticalResolution(pImage, pyDpi); + return TRUE; + } + + BOOL SetResolution(Gdiplus::GpBitmap *pBitmap, float xDpi, float yDpi) const + { + if (BitmapSetResolution == NULL) + BitmapSetResolution = AddrOf<BITMAPSETRESOLUTION>("GdipBitmapSetResolution"); + + if (BitmapSetResolution == NULL) + return FALSE; + + BitmapSetResolution(pBitmap, xDpi, yDpi); + return TRUE; + } + + HRESULT LoadDx(LPCTSTR pszFileName, float *pxDpi, float *pyDpi) throw() + { + // convert the file name string into Unicode + CStringW pszNameW(pszFileName); + + // create a GpBitmap object from file + using namespace Gdiplus; + GpBitmap *pBitmap = NULL; + if (GetCommon().CreateBitmapFromFile(pszNameW, &pBitmap) != Ok) + { + return E_FAIL; + } + + // get bitmap handle + HBITMAP hbm = NULL; + Color color(0xFF, 0xFF, 0xFF); + Gdiplus::Status status; + status = GetCommon().CreateHBITMAPFromBitmap(pBitmap, &hbm, color.GetValue()); + + // get the resolution + GetResolution((Gdiplus::GpImage*)pBitmap, pxDpi, pyDpi); + + // delete GpBitmap + GetCommon().DisposeImage(pBitmap); + + // attach it + if (status == Ok) + Attach(hbm); + return (status == Ok ? S_OK : E_FAIL); + } + + HRESULT SaveDx(LPCTSTR pszFileName, REFGUID guidFileType = GUID_NULL, + float xDpi = 0, float yDpi = 0) const throw() + { + using namespace Gdiplus; + ATLASSERT(m_hbm); + + // TODO & FIXME: set parameters (m_rgbTransColor etc.) + + // convert the file name string into Unicode + CStringW pszNameW(pszFileName); + + // if the file type is null, get the file type from extension + const GUID *FileType = &guidFileType; + if (IsGuidEqual(guidFileType, GUID_NULL)) + { + LPCWSTR pszExt = GetFileExtension(pszNameW); + FileType = FileTypeFromExtension(pszExt); + } + + // get CLSID from file type + CLSID clsid; + if (!GetClsidFromFileType(&clsid, FileType)) + return E_FAIL; + + // create a GpBitmap from HBITMAP + GpBitmap *pBitmap = NULL; + GetCommon().CreateBitmapFromHBITMAP(m_hbm, NULL, &pBitmap); + + // set the resolution + SetResolution(pBitmap, xDpi, yDpi); + + // save to file + Status status; + status = GetCommon().SaveImageToFile(pBitmap, pszNameW, &clsid, NULL); + + // destroy GpBitmap + GetCommon().DisposeImage(pBitmap); + + return (status == Ok ? S_OK : E_FAIL); + } + +protected: + // get procedure address of the DLL + template <typename TYPE> + TYPE AddrOf(const char *name) const + { + FARPROC proc = ::GetProcAddress(GetCommon().hinstGdiPlus, name); + return reinterpret_cast<TYPE>(proc); + } + + typedef St (WINGDIPAPI *GETIMAGEHORIZONTALRESOLUTION)(Im *, float*); + typedef St (WINGDIPAPI *GETIMAGEVERTICALRESOLUTION)(Im *, float*); + typedef St (WINGDIPAPI *BITMAPSETRESOLUTION)(Bm *, float, float); + + GETIMAGEHORIZONTALRESOLUTION GetImageHorizontalResolution; + GETIMAGEVERTICALRESOLUTION GetImageVerticalResolution; + mutable BITMAPSETRESOLUTION BitmapSetResolution; +}; diff --git a/base/applications/mspaint/canvas.cpp b/base/applications/mspaint/canvas.cpp index 591d1ba670b..d538925f39d 100644 --- a/base/applications/mspaint/canvas.cpp +++ b/base/applications/mspaint/canvas.cpp @@ -6,10 +6,10 @@ * PROGRAMMERS: Benedikt Freisen */ -/* INCLUDES *********************************************************/ - #include "precomp.h" +CCanvasWindow canvasWindow; + /* FUNCTIONS ********************************************************/ CCanvasWindow::CCanvasWindow() diff --git a/base/applications/mspaint/common.h b/base/applications/mspaint/common.h index af55873145f..619133fc550 100644 --- a/base/applications/mspaint/common.h +++ b/base/applications/mspaint/common.h @@ -14,6 +14,17 @@ #define MIN_ZOOM 125 #define MAX_ZOOM 8000 +#define MAX_LONG_PATH 512 + +#define WM_TOOLSMODELTOOLCHANGED (WM_APP + 0) +#define WM_TOOLSMODELSETTINGSCHANGED (WM_APP + 1) +#define WM_TOOLSMODELZOOMCHANGED (WM_APP + 2) +#define WM_PALETTEMODELCOLORCHANGED (WM_APP + 3) +#define WM_PALETTEMODELPALETTECHANGED (WM_APP + 4) +#define WM_IMAGEMODELDIMENSIONSCHANGED (WM_APP + 5) +#define WM_IMAGEMODELIMAGECHANGED (WM_APP + 6) +#define WM_SELECTIONMODELREFRESHNEEDED (WM_APP + 7) + /* width of the rectangle defined by a RECT structure */ #define RECT_WIDTH(a) ((a).right - (a).left) @@ -26,6 +37,21 @@ /* this simplifies enabling or graying menu items */ #define ENABLED_IF(a) ((a) ? (MF_ENABLED | MF_BYCOMMAND) : (MF_GRAYED | MF_BYCOMMAND)) +enum CANVAS_HITTEST // hit +{ + HIT_NONE = 0, // Nothing hit or outside + HIT_UPPER_LEFT, + HIT_UPPER_CENTER, + HIT_UPPER_RIGHT, + HIT_MIDDLE_LEFT, + HIT_MIDDLE_RIGHT, + HIT_LOWER_LEFT, + HIT_LOWER_CENTER, + HIT_LOWER_RIGHT, + HIT_BORDER, + HIT_INNER, +}; + /* FUNCTIONS ********************************************************/ BOOL zoomTo(int newZoom, int mouseX, int mouseY); @@ -33,13 +59,3 @@ BOOL nearlyEqualPoints(INT x0, INT y0, INT x1, INT y1); void placeSelWin(void); void updateStartAndLast(LONG x, LONG y); void updateLast(LONG x, LONG y); - -static inline int Zoomed(int xy) -{ - return xy * toolsModel.GetZoom() / 1000; -} - -static inline int UnZoomed(int xy) -{ - return xy * 1000 / toolsModel.GetZoom(); -} diff --git a/base/applications/mspaint/dialogs.cpp b/base/applications/mspaint/dialogs.cpp index 2b0798f7ef9..b59305810f0 100644 --- a/base/applications/mspaint/dialogs.cpp +++ b/base/applications/mspaint/dialogs.cpp @@ -99,7 +99,7 @@ LRESULT CAttributesDialog::OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, SetDlgItemText(IDD_ATTRIBUTESTEXT7, strSize); } CString strRes; - strRes.Format(IDS_PRINTRES, fileHPPM, fileVPPM); + strRes.Format(IDS_PRINTRES, (INT)PpmFromDpi(g_xDpi), (INT)PpmFromDpi(g_yDpi)); SetDlgItemText(IDD_ATTRIBUTESTEXT8, strRes); return 0; } @@ -136,9 +136,9 @@ LRESULT CAttributesDialog::OnDefault(WORD wNotifyCode, WORD wID, HWND hWndCtl, B LRESULT CAttributesDialog::OnRadioButton1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { CString strNum; - strNum.Format(_T("%.3lf"), newWidth / (0.0254 * fileHPPM)); + strNum.Format(_T("%.3lf"), newWidth / g_xDpi); SetDlgItemText(IDD_ATTRIBUTESEDIT1, strNum); - strNum.Format(_T("%.3lf"), newHeight / (0.0254 * fileVPPM)); + strNum.Format(_T("%.3lf"), newHeight / g_yDpi); SetDlgItemText(IDD_ATTRIBUTESEDIT2, strNum); return 0; } @@ -146,9 +146,9 @@ LRESULT CAttributesDialog::OnRadioButton1(WORD wNotifyCode, WORD wID, HWND hWndC LRESULT CAttributesDialog::OnRadioButton2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { CString strNum; - strNum.Format(_T("%.3lf"), newWidth * 100.0 / fileHPPM); + strNum.Format(_T("%.3lf"), newWidth * 100 / PpmFromDpi(g_xDpi)); SetDlgItemText(IDD_ATTRIBUTESEDIT1, strNum); - strNum.Format(_T("%.3lf"), newHeight * 100.0 / fileVPPM); + strNum.Format(_T("%.3lf"), newHeight * 100 / PpmFromDpi(g_yDpi)); SetDlgItemText(IDD_ATTRIBUTESEDIT2, strNum); return 0; } @@ -168,12 +168,12 @@ LRESULT CAttributesDialog::OnEdit1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOO if (IsDlgButtonChecked(IDD_ATTRIBUTESRB1)) { GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, _countof(tempS)); - newWidth = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM * 0.0254)); + newWidth = max(1, (int) (_tcstod(tempS, NULL) * g_xDpi)); } else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB2)) { GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, _countof(tempS)); - newWidth = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM / 100)); + newWidth = max(1, (int) (_tcstod(tempS, NULL) * PpmFromDpi(g_xDpi) / 100)); } else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB3)) { @@ -193,12 +193,12 @@ LRESULT CAttributesDialog::OnEdit2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOO if (IsDlgButtonChecked(IDD_ATTRIBUTESRB1)) { GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, _countof(tempS)); - newHeight = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM * 0.0254)); + newHeight = max(1, (int) (_tcstod(tempS, NULL) * g_yDpi)); } else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB2)) { GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, _countof(tempS)); - newHeight = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM / 100)); + newHeight = max(1, (int) (_tcstod(tempS, NULL) * PpmFromDpi(g_yDpi) / 100)); } else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB3)) { diff --git a/base/applications/mspaint/dib.cpp b/base/applications/mspaint/dib.cpp index 529d7c91ee4..96218a824a3 100644 --- a/base/applications/mspaint/dib.cpp +++ b/base/applications/mspaint/dib.cpp @@ -6,13 +6,22 @@ * PROGRAMMERS: Benedikt Freisen */ -/* INCLUDES *********************************************************/ - #include "precomp.h" #include <math.h> +INT fileSize = 0; +float g_xDpi = 96; +float g_yDpi = 96; +SYSTEMTIME fileTime; + /* FUNCTIONS ********************************************************/ +// Convert DPI (dots per inch) into PPM (pixels per meter) +float PpmFromDpi(float dpi) +{ + return dpi / 0.0254; // 1 DPI is 0.0254 meter. +} + HBITMAP CreateDIBWithProperties(int width, int height) { @@ -68,9 +77,9 @@ GetDIBHeight(HBITMAP hBitmap) BOOL SaveDIBToFile(HBITMAP hBitmap, LPTSTR FileName, HDC hDC) { - CImage img; + CImageDx img; img.Attach(hBitmap); - img.Save(FileName); // TODO: error handling + img.SaveDx(FileName, GUID_NULL, g_xDpi, g_yDpi); // TODO: error handling img.Detach(); WIN32_FIND_DATA find; @@ -116,16 +125,12 @@ HBITMAP SetBitmapAndInfo(HBITMAP hBitmap, LPCTSTR name, DWORD dwFileSize, BOOL i if (hBitmap == NULL) return FALSE; - fileHPPM = fileVPPM = 2834; - ZeroMemory(&fileTime, sizeof(fileTime)); - } - else - { - // update PPMs HDC hScreenDC = GetDC(NULL); - fileHPPM = (int)(GetDeviceCaps(hScreenDC, LOGPIXELSX) * 1000 / 25.4); - fileVPPM = (int)(GetDeviceCaps(hScreenDC, LOGPIXELSY) * 1000 / 25.4); + g_xDpi = GetDeviceCaps(hScreenDC, LOGPIXELSX); + g_yDpi = GetDeviceCaps(hScreenDC, LOGPIXELSY); ReleaseDC(NULL, hScreenDC); + + ZeroMemory(&fileTime, sizeof(fileTime)); } // update image @@ -185,8 +190,14 @@ HBITMAP DoLoadImageFile(HWND hwnd, LPCTSTR name, BOOL fIsMainFile) } // load the image - CImage img; - img.Load(name); + CImageDx img; + img.LoadDx(name, &g_xDpi, &g_yDpi); + + if (g_xDpi <= 0) + g_xDpi = 96; + if (g_yDpi <= 0) + g_yDpi = 96; + HBITMAP hBitmap = img.Detach(); if (hBitmap == NULL) diff --git a/base/applications/mspaint/dib.h b/base/applications/mspaint/dib.h index e0f8d14f19a..82ccde6e9ed 100644 --- a/base/applications/mspaint/dib.h +++ b/base/applications/mspaint/dib.h @@ -31,3 +31,5 @@ HBITMAP SetBitmapAndInfo(HBITMAP hBitmap, LPCTSTR name, DWORD dwFileSize, BOOL i HBITMAP Rotate90DegreeBlt(HDC hDC1, INT cx, INT cy, BOOL bRight); HBITMAP SkewDIB(HDC hDC1, HBITMAP hbm, INT nDegree, BOOL bVertical); + +float PpmFromDpi(float dpi); diff --git a/base/applications/mspaint/fullscreen.cpp b/base/applications/mspaint/fullscreen.cpp index 4ea04090e92..610062c0dbc 100644 --- a/base/applications/mspaint/fullscreen.cpp +++ b/base/applications/mspaint/fullscreen.cpp @@ -6,12 +6,21 @@ * PROGRAMMERS: Benedikt Freisen */ -/* INCLUDES *********************************************************/ - #include "precomp.h" +CFullscreenWindow fullscreenWindow; + /* FUNCTIONS ********************************************************/ +HWND CFullscreenWindow::DoCreate() +{ + if (m_hWnd) + return m_hWnd; + + RECT rc = {0, 0, 0, 0}; // Rely on SW_SHOWMAXIMIZED + return Create(HWND_DESKTOP, rc, NULL, WS_POPUPWINDOW, WS_EX_TOPMOST); +} + LRESULT CFullscreenWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { SendMessage(WM_SETICON, ICON_BIG, (LPARAM) LoadIcon(hProgInstance, MAKEINTRESOURCE(IDI_APPICON))); diff --git a/base/applications/mspaint/fullscreen.h b/base/applications/mspaint/fullscreen.h index 64f3ce05fad..4466b116266 100644 --- a/base/applications/mspaint/fullscreen.h +++ b/base/applications/mspaint/fullscreen.h @@ -23,6 +23,9 @@ public: MESSAGE_HANDLER(WM_GETTEXT, OnGetText) END_MSG_MAP() + HWND DoCreate(); + +private: LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnCloseOrKeyDownOrLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); diff --git a/base/applications/mspaint/globalvar.h b/base/applications/mspaint/globalvar.h index 3a366c04220..fe9e47f5f0b 100644 --- a/base/applications/mspaint/globalvar.h +++ b/base/applications/mspaint/globalvar.h @@ -10,58 +10,42 @@ /* VARIABLES declared in main.cpp ***********************************/ -class RegistrySettings; -extern RegistrySettings registrySettings; - -class ImageModel; -extern ImageModel imageModel; extern BOOL askBeforeEnlarging; extern POINT start; extern POINT last; -class ToolsModel; -extern ToolsModel toolsModel; - -class SelectionModel; -extern SelectionModel selectionModel; - -class PaletteModel; -extern PaletteModel paletteModel; - -extern HWND hStatusBar; -extern CHOOSECOLOR choosecolor; -extern OPENFILENAME ofn; -extern OPENFILENAME sfn; -extern HICON hNontranspIcon; -extern HICON hTranspIcon; - extern HINSTANCE hProgInstance; -extern TCHAR filepathname[1000]; +extern TCHAR filepathname[MAX_LONG_PATH]; extern BOOL isAFile; extern BOOL imageSaved; -extern int fileSize; -extern int fileHPPM; -extern int fileVPPM; -extern SYSTEMTIME fileTime; extern BOOL showGrid; -extern BOOL showMiniature; - -class CMainWindow; -class CFullscreenWindow; -class CMiniatureWindow; -class CToolBox; -class CToolSettingsWindow; -class CPaletteWindow; -class CCanvasWindow; -class CSelectionWindow; -class CImgAreaWindow; -class CSizeboxWindow; -class CTextEditWindow; extern CMainWindow mainWindow; + +/* VARIABLES declared in dialogs.cpp ********************************/ + +extern CMirrorRotateDialog mirrorRotateDialog; +extern CAttributesDialog attributesDialog; +extern CStretchSkewDialog stretchSkewDialog; +extern CFontsDialog fontsDialog; + +/* VARIABLES declared in the other places ***************************/ + +extern RegistrySettings registrySettings; +extern ImageModel imageModel; +extern ToolsModel toolsModel; +extern SelectionModel selectionModel; +extern PaletteModel paletteModel; + +extern HWND hStatusBar; +extern float g_xDpi; +extern float g_yDpi; +extern INT fileSize; +extern SYSTEMTIME fileTime; + extern CFullscreenWindow fullscreenWindow; extern CMiniatureWindow miniature; extern CToolBox toolBoxContainer; @@ -71,15 +55,3 @@ extern CCanvasWindow canvasWindow; extern CSelectionWindow selectionWindow; extern CImgAreaWindow imageArea; extern CTextEditWindow textEditWindow; - -/* VARIABLES declared in dialogs.cpp ********************************/ - -class CMirrorRotateDialog; -class CAttributesDialog; -class CStretchSkewDialog; -class CFontsDialog; - -extern CMirrorRotateDialog mirrorRotateDialog; -extern CAttributesDialog attributesDialog; -extern CStretchSkewDialog stretchSkewDialog; -extern CFontsDialog fontsDialog; diff --git a/base/applications/mspaint/history.cpp b/base/applications/mspaint/history.cpp index f0a3691ed5e..847e6c6db81 100644 --- a/base/applications/mspaint/history.cpp +++ b/base/applications/mspaint/history.cpp @@ -6,10 +6,10 @@ * PROGRAMMERS: Benedikt Freisen */ -/* INCLUDES *********************************************************/ - #include "precomp.h" +ImageModel imageModel; + /* FUNCTIONS ********************************************************/ void ImageModel::NotifyDimensionsChanged() diff --git a/base/applications/mspaint/imgarea.cpp b/base/applications/mspaint/imgarea.cpp index aa116dcc8c1..dfb93455b43 100644 --- a/base/applications/mspaint/imgarea.cpp +++ b/base/applications/mspaint/imgarea.cpp @@ -10,6 +10,8 @@ #include "precomp.h" +CImgAreaWindow imageArea; + /* FUNCTIONS ********************************************************/ LRESULT CImgAreaWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) diff --git a/base/applications/mspaint/imgarea.h b/base/applications/mspaint/imgarea.h index d7b44e5c4af..daef656590a 100644 --- a/base/applications/mspaint/imgarea.h +++ b/base/applications/mspaint/imgarea.h @@ -13,9 +13,7 @@ class CImgAreaWindow : public CWindowImpl<CImgAreaWindow> { public: - CImgAreaWindow() : drawing(FALSE) - { - } + CImgAreaWindow() : drawing(FALSE) { } BOOL drawing; void cancelDrawing(); diff --git a/base/applications/mspaint/main.cpp b/base/applications/mspaint/main.cpp index 170610c7748..971bfbba622 100644 --- a/base/applications/mspaint/main.cpp +++ b/base/applications/mspaint/main.cpp @@ -8,52 +8,19 @@ #include "precomp.h" -/* FUNCTIONS ********************************************************/ - POINT start; POINT last; -ToolsModel toolsModel; - -SelectionModel selectionModel; - -PaletteModel paletteModel; - -RegistrySettings registrySettings; - -ImageModel imageModel; BOOL askBeforeEnlarging = FALSE; // TODO: initialize from registry - -HWND hStatusBar; -CHOOSECOLOR choosecolor; -OPENFILENAME ofn; -OPENFILENAME sfn; -HICON hNontranspIcon; -HICON hTranspIcon; - -HINSTANCE hProgInstance; - -TCHAR filepathname[1000]; +HINSTANCE hProgInstance = NULL; +TCHAR filepathname[MAX_LONG_PATH] = { 0 }; BOOL isAFile = FALSE; BOOL imageSaved = FALSE; -int fileSize; -int fileHPPM = 2834; -int fileVPPM = 2834; -SYSTEMTIME fileTime; - BOOL showGrid = FALSE; -BOOL showMiniature = FALSE; CMainWindow mainWindow; -CFullscreenWindow fullscreenWindow; -CMiniatureWindow miniature; -CToolBox toolBoxContainer; -CToolSettingsWindow toolSettingsWindow; -CPaletteWindow paletteWindow; -CCanvasWindow canvasWindow; -CSelectionWindow selectionWindow; -CImgAreaWindow imageArea; -CTextEditWindow textEditWindow; + +/* FUNCTIONS ********************************************************/ // get file name extension from filter string static BOOL @@ -105,193 +72,171 @@ OFNHookProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return 0; } -/* entry point */ +BOOL CMainWindow::GetOpenFileName(IN OUT LPTSTR pszFile, INT cchMaxFile) +{ + static OPENFILENAME ofn = { 0 }; + static CString strFilter; + + if (ofn.lStructSize == 0) + { + // The "All Files" item text + CString strAllPictureFiles; + strAllPictureFiles.LoadString(hProgInstance, IDS_ALLPICTUREFILES); + + // Get the import filter + CSimpleArray<GUID> aguidFileTypesI; + CImage::GetImporterFilterString(strFilter, aguidFileTypesI, strAllPictureFiles, + CImage::excludeDefaultLoad, _T('\0')); + + // Initializing the OPENFILENAME structure for GetOpenFileName + ZeroMemory(&ofn, sizeof(ofn)); + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = m_hWnd; + ofn.hInstance = hProgInstance; + ofn.lpstrFilter = strFilter; + ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY; + ofn.lpstrDefExt = L"png"; + } + + ofn.lpstrFile = pszFile; + ofn.nMaxFile = cchMaxFile; + return ::GetOpenFileName(&ofn); +} + +BOOL CMainWindow::GetSaveFileName(IN OUT LPTSTR pszFile, INT cchMaxFile) +{ + static OPENFILENAME sfn = { 0 }; + static CString strFilter; -int WINAPI -_tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument, INT nCmdShow) + if (sfn.lStructSize == 0) + { + // Get the export filter + CSimpleArray<GUID> aguidFileTypesE; + CImage::GetExporterFilterString(strFilter, aguidFileTypesE, NULL, + CImage::excludeDefaultSave, _T('\0')); + + // Initializing the OPENFILENAME structure for GetSaveFileName + ZeroMemory(&sfn, sizeof(sfn)); + sfn.lStructSize = sizeof(sfn); + sfn.hwndOwner = m_hWnd; + sfn.hInstance = hProgInstance; + sfn.lpstrFilter = strFilter; + sfn.Flags = OFN_EXPLORER | OFN_OVERWRITEPROMPT | OFN_ENABLEHOOK; + sfn.lpfnHook = OFNHookProc; + sfn.lpstrDefExt = L"png"; + + // Choose PNG + for (INT i = 0; i < aguidFileTypesE.GetSize(); ++i) + { + if (aguidFileTypesE[i] == Gdiplus::ImageFormatPNG) + { + sfn.nFilterIndex = i + 1; + break; + } + } + } + + sfn.lpstrFile = pszFile; + sfn.nMaxFile = cchMaxFile; + return ::GetSaveFileName(&sfn); +} + +BOOL CMainWindow::ChooseColor(IN OUT COLORREF *prgbColor) { - HWND hwnd; /* This is the handle for our window */ - MSG messages; /* Here messages to the application are saved */ - - HMENU menu; - HACCEL haccel; - - TCHAR sfnFilename[1000]; - TCHAR sfnFiletitle[256]; - TCHAR ofnFilename[1000]; - TCHAR ofnFiletitle[256]; - TCHAR miniaturetitle[100]; - static COLORREF custColors[16] = { + static CHOOSECOLOR choosecolor = { 0 }; + static COLORREF custColors[16] = + { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff }; + if (choosecolor.lStructSize == 0) + { + // Initializing the CHOOSECOLOR structure for ChooseColor + ZeroMemory(&choosecolor, sizeof(choosecolor)); + choosecolor.lStructSize = sizeof(choosecolor); + choosecolor.hwndOwner = m_hWnd; + choosecolor.lpCustColors = custColors; + } + + choosecolor.rgbResult = *prgbColor; + if (!::ChooseColor(&choosecolor)) + return FALSE; + + *prgbColor = choosecolor.rgbResult; + return TRUE; +} + +HWND CMainWindow::DoCreate() +{ + ::LoadString(hProgInstance, IDS_DEFAULTFILENAME, filepathname, _countof(filepathname)); + + CString strTitle; + strTitle.Format(IDS_WINDOWTITLE, PathFindFileName(filepathname)); + + RECT& rc = registrySettings.WindowPlacement.rcNormalPosition; + return Create(HWND_DESKTOP, rc, strTitle, WS_OVERLAPPEDWINDOW, WS_EX_ACCEPTFILES); +} + +// entry point +INT WINAPI +_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, INT nCmdShow) +{ #ifdef _DEBUG - /* Report any memory leaks on exit */ + // Report any memory leaks on exit _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); #endif - hProgInstance = hThisInstance; + hProgInstance = hInstance; - /* initialize common controls library */ + // Initialize common controls library INITCOMMONCONTROLSEX iccx; iccx.dwSize = sizeof(iccx); iccx.dwICC = ICC_STANDARD_CLASSES | ICC_USEREX_CLASSES | ICC_BAR_CLASSES; InitCommonControlsEx(&iccx); - LoadString(hThisInstance, IDS_DEFAULTFILENAME, filepathname, _countof(filepathname)); - CPath pathFileName(filepathname); - pathFileName.StripPath(); - CString strTitle; - strTitle.Format(IDS_WINDOWTITLE, (LPCTSTR)pathFileName); - LoadString(hThisInstance, IDS_MINIATURETITLE, miniaturetitle, _countof(miniaturetitle)); - - /* load settings from registry */ + // Load settings from registry registrySettings.Load(nCmdShow); - showMiniature = registrySettings.ShowThumbnail; - imageModel.Crop(registrySettings.BMPWidth, registrySettings.BMPHeight); - - /* create main window */ - RECT mainWindowPos = registrySettings.WindowPlacement.rcNormalPosition; - hwnd = mainWindow.Create(HWND_DESKTOP, mainWindowPos, strTitle, WS_OVERLAPPEDWINDOW); - - RECT fullscreenWindowPos = {0, 0, 100, 100}; - fullscreenWindow.Create(HWND_DESKTOP, fullscreenWindowPos, NULL, WS_POPUPWINDOW | WS_MAXIMIZE); - - RECT miniaturePos = {(LONG) registrySettings.ThumbXPos, (LONG) registrySettings.ThumbYPos, - (LONG) registrySettings.ThumbXPos + (LONG) registrySettings.ThumbWidth, - (LONG) registrySettings.ThumbYPos + (LONG) registrySettings.ThumbHeight}; - miniature.Create(hwnd, miniaturePos, miniaturetitle, - WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME, WS_EX_PALETTEWINDOW); - miniature.ShowWindow(showMiniature ? SW_SHOW : SW_HIDE); - - /* loading and setting the window menu from resource */ - menu = LoadMenu(hThisInstance, MAKEINTRESOURCE(ID_MENU)); - SetMenu(hwnd, menu); - haccel = LoadAccelerators(hThisInstance, MAKEINTRESOURCE(800)); - - /* Create ToolBox */ - toolBoxContainer.DoCreate(hwnd); - - /* creating the palette child window */ - RECT paletteWindowPos = {56, 9, 56 + 255, 9 + 32}; - paletteWindow.Create(hwnd, paletteWindowPos, NULL, WS_CHILD, WS_EX_STATICEDGE); - if (registrySettings.ShowPalette) - paletteWindow.ShowWindow(SW_SHOWNOACTIVATE); - - // creating the canvas - RECT canvasWindowPos = {0, 0, 0 + 500, 0 + 500}; - canvasWindow.Create(hwnd, canvasWindowPos, NULL, - WS_CHILD | WS_GROUP | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE, WS_EX_CLIENTEDGE); - - /* creating the status bar */ - hStatusBar = - CreateWindowEx(0, STATUSCLASSNAME, NULL, SBARS_SIZEGRIP | WS_CHILD, 0, 0, 0, 0, hwnd, - NULL, hThisInstance, NULL); - SendMessage(hStatusBar, SB_SETMINHEIGHT, 21, 0); - if (registrySettings.ShowStatusBar) - ShowWindow(hStatusBar, SW_SHOWNOACTIVATE); - - // Creating the window inside the canvas - RECT imageAreaPos = {GRIP_SIZE, GRIP_SIZE, GRIP_SIZE + imageModel.GetWidth(), GRIP_SIZE + imageModel.GetHeight()}; - imageArea.Create(canvasWindow.m_hWnd, imageAreaPos, NULL, WS_CHILD | WS_VISIBLE); - - /* create selection window (initially hidden) */ - RECT selectionWindowPos = {350, 0, 350 + 100, 0 + 100}; - selectionWindow.Create(imageArea.m_hWnd, selectionWindowPos, NULL, WS_CHILD | BS_OWNERDRAW); - if (__argc >= 2) + // Create the main window + if (!mainWindow.DoCreate()) { - DoLoadImageFile(mainWindow, __targv[1], TRUE); + MessageBox(NULL, TEXT("Failed to create main window."), NULL, MB_ICONERROR); + return 1; } + // Initialize imageModel + imageModel.Crop(registrySettings.BMPWidth, registrySettings.BMPHeight); + if (__argc >= 2) + DoLoadImageFile(mainWindow, __targv[1], TRUE); imageModel.ClearHistory(); - /* initializing the CHOOSECOLOR structure for use with ChooseColor */ - ZeroMemory(&choosecolor, sizeof(choosecolor)); - choosecolor.lStructSize = sizeof(CHOOSECOLOR); - choosecolor.hwndOwner = hwnd; - choosecolor.rgbResult = 0x00ffffff; - choosecolor.lpCustColors = custColors; - - /* initializing the OPENFILENAME structure for use with GetOpenFileName and GetSaveFileName */ - ofnFilename[0] = 0; - CString strImporters; - CSimpleArray<GUID> aguidFileTypesI; - CString strAllPictureFiles; - strAllPictureFiles.LoadString(hThisInstance, IDS_ALLPICTUREFILES); - CImage::GetImporterFilterString(strImporters, aguidFileTypesI, strAllPictureFiles, CImage::excludeDefaultLoad, _T('\0')); -// CAtlStringW strAllFiles; -// strAllFiles.LoadString(hThisInstance, IDS_ALLFILES); -// strImporters = strAllFiles + CAtlStringW(_T("|*.*|")).Replace('|', '\0') + strImporters; - ZeroMemory(&ofn, sizeof(OPENFILENAME)); - ofn.lStructSize = sizeof(OPENFILENAME); - ofn.hwndOwner = hwnd; - ofn.hInstance = hThisInstance; - ofn.lpstrFilter = strImporters; - ofn.lpstrFile = ofnFilename; - ofn.nMaxFile = _countof(ofnFilename); - ofn.lpstrFileTitle = ofnFiletitle; - ofn.nMaxFileTitle = _countof(ofnFiletitle); - ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY; - ofn.lpstrDefExt = L"png"; - - CopyMemory(sfnFilename, filepathname, sizeof(filepathname)); - CString strExporters; - CSimpleArray<GUID> aguidFileTypesE; - CImage::GetExporterFilterString(strExporters, aguidFileTypesE, NULL, CImage::excludeDefaultSave, _T('\0')); - ZeroMemory(&sfn, sizeof(OPENFILENAME)); - sfn.lStructSize = sizeof(OPENFILENAME); - sfn.hwndOwner = hwnd; - sfn.hInstance = hThisInstance; - sfn.lpstrFilter = strExporters; - sfn.lpstrFile = sfnFilename; - sfn.nMaxFile = _countof(sfnFilename); - sfn.lpstrFileTitle = sfnFiletitle; - sfn.nMaxFileTitle = _countof(sfnFiletitle); - sfn.Flags = OFN_EXPLORER | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLEHOOK; - sfn.lpfnHook = OFNHookProc; - sfn.lpstrDefExt = L"png"; - // Choose PNG - for (INT i = 0; i < aguidFileTypesE.GetSize(); ++i) - { - if (aguidFileTypesE[i] == Gdiplus::ImageFormatPNG) - { - sfn.nFilterIndex = i + 1; - break; - } - } + // Make the window visible on the screen + mainWindow.ShowWindow(registrySettings.WindowPlacement.showCmd); - /* placing the size boxes around the image */ - imageArea.SendMessage(WM_SIZE, 0, 0); + // Load the access keys + HACCEL hAccel = ::LoadAccelerators(hInstance, MAKEINTRESOURCE(800)); - /* Make the window visible on the screen */ - ShowWindow(hwnd, registrySettings.WindowPlacement.showCmd); - - /* inform the system, that the main window accepts dropped files */ - DragAcceptFiles(hwnd, TRUE); - - /* Run the message loop. It will run until GetMessage() returns 0 */ - while (GetMessage(&messages, NULL, 0, 0)) + // The message loop + MSG msg; + while (::GetMessage(&msg, NULL, 0, 0)) { - if (fontsDialog.IsWindow() && IsDialogMessage(fontsDialog, &messages)) + if (fontsDialog.IsWindow() && fontsDialog.IsDialogMessage(&msg)) continue; - if (TranslateAccelerator(hwnd, haccel, &messages)) + if (::TranslateAccelerator(mainWindow, hAccel, &msg)) continue; - /* Translate virtual-key messages into character messages */ - TranslateMessage(&messages); - /* Send message to WindowProcedure */ - DispatchMessage(&messages); + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); } - /* write back settings to registry */ - registrySettings.ShowThumbnail = showMiniature; - registrySettings.BMPWidth = imageModel.GetWidth(); - registrySettings.BMPHeight = imageModel.GetHeight(); + // Unload the access keys + ::DestroyAcceleratorTable(hAccel); + + // Write back settings to registry registrySettings.Store(); - /* The program return-value is 0 - The value that PostQuitMessage() gave */ - return messages.wParam; + // Return the value that PostQuitMessage() gave + return (INT)msg.wParam; } diff --git a/base/applications/mspaint/miniature.cpp b/base/applications/mspaint/miniature.cpp index b9efd889a81..c048d0d2c15 100644 --- a/base/applications/mspaint/miniature.cpp +++ b/base/applications/mspaint/miniature.cpp @@ -7,16 +7,35 @@ * PROGRAMMERS: Benedikt Freisen */ -/* INCLUDES *********************************************************/ - #include "precomp.h" +CMiniatureWindow miniature; + /* FUNCTIONS ********************************************************/ +HWND CMiniatureWindow::DoCreate(HWND hwndParent) +{ + if (m_hWnd) + return m_hWnd; + + RECT rc = + { + (LONG)registrySettings.ThumbXPos, (LONG)registrySettings.ThumbYPos, + (LONG)(registrySettings.ThumbXPos + registrySettings.ThumbWidth), + (LONG)(registrySettings.ThumbYPos + registrySettings.ThumbHeight) + }; + + TCHAR strTitle[100]; + ::LoadString(hProgInstance, IDS_MINIATURETITLE, strTitle, _countof(strTitle)); + + DWORD style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME; + return Create(hwndParent, rc, strTitle, style, WS_EX_PALETTEWINDOW); +} + LRESULT CMiniatureWindow::OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { - miniature.ShowWindow(SW_HIDE); - showMiniature = FALSE; + ShowWindow(SW_HIDE); + registrySettings.ShowThumbnail = FALSE; return 0; } diff --git a/base/applications/mspaint/miniature.h b/base/applications/mspaint/miniature.h index 57fe9559481..b68d03a086f 100644 --- a/base/applications/mspaint/miniature.h +++ b/base/applications/mspaint/miniature.h @@ -19,6 +19,9 @@ public: MESSAGE_HANDLER(WM_PAINT, OnPaint) END_MSG_MAP() + HWND DoCreate(HWND hwndParent); + +private: LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); diff --git a/base/applications/mspaint/palette.cpp b/base/applications/mspaint/palette.cpp index 7795b97c28e..161d056ba92 100644 --- a/base/applications/mspaint/palette.cpp +++ b/base/applications/mspaint/palette.cpp @@ -17,6 +17,8 @@ #define COLOR_COUNT 28 #define HALF_COLOR_COUNT (COLOR_COUNT / 2) +CPaletteWindow paletteWindow; + /* FUNCTIONS ********************************************************/ static VOID drawColorBox(HDC hDC, LPCRECT prc, COLORREF rgbColor, UINT nBorder) @@ -144,10 +146,11 @@ LRESULT CPaletteWindow::OnRButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, B LRESULT CPaletteWindow::OnLButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { INT iColor = DoHitTest(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); - if (iColor != -1 && ChooseColor(&choosecolor)) + COLORREF rgbColor = paletteModel.GetFgColor(); + if (iColor != -1 && mainWindow.ChooseColor(&rgbColor)) { - paletteModel.SetColor(iColor, choosecolor.rgbResult); - paletteModel.SetFgColor(choosecolor.rgbResult); + paletteModel.SetColor(iColor, rgbColor); + paletteModel.SetFgColor(rgbColor); } return 0; } @@ -155,10 +158,11 @@ LRESULT CPaletteWindow::OnLButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT CPaletteWindow::OnRButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { INT iColor = DoHitTest(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); - if (iColor != -1 && ChooseColor(&choosecolor)) + COLORREF rgbColor = paletteModel.GetBgColor(); + if (iColor != -1 && mainWindow.ChooseColor(&rgbColor)) { - paletteModel.SetColor(iColor, choosecolor.rgbResult); - paletteModel.SetBgColor(choosecolor.rgbResult); + paletteModel.SetColor(iColor, rgbColor); + paletteModel.SetBgColor(rgbColor); } return 0; } diff --git a/base/applications/mspaint/palettemodel.cpp b/base/applications/mspaint/palettemodel.cpp index c91899bd982..b4ae440658f 100644 --- a/base/applications/mspaint/palettemodel.cpp +++ b/base/applications/mspaint/palettemodel.cpp @@ -7,10 +7,10 @@ * Katayama Hirofumi MZ */ -/* INCLUDES *********************************************************/ - #include "precomp.h" +PaletteModel paletteModel; + /* FUNCTIONS ********************************************************/ PaletteModel::PaletteModel() diff --git a/base/applications/mspaint/precomp.h b/base/applications/mspaint/precomp.h index c73cd809a75..5dda7a9c682 100644 --- a/base/applications/mspaint/precomp.h +++ b/base/applications/mspaint/precomp.h @@ -6,8 +6,6 @@ #undef _DEBUG #endif -#include <stdarg.h> - #include <windef.h> #include <winbase.h> #include <winuser.h> @@ -26,43 +24,19 @@ #include <stdlib.h> #include <shellapi.h> #include <htmlhelp.h> +#include "atlimagedx.h" #ifdef _DEBUG #define _CRTDBG_MAP_ALLOC #include <crtdbg.h> #endif -#define NDEBUG #include <debug.h> -#define WM_TOOLSMODELTOOLCHANGED (WM_APP + 0) -#define WM_TOOLSMODELSETTINGSCHANGED (WM_APP + 1) -#define WM_TOOLSMODELZOOMCHANGED (WM_APP + 2) -#define WM_PALETTEMODELCOLORCHANGED (WM_APP + 3) -#define WM_PALETTEMODELPALETTECHANGED (WM_APP + 4) -#define WM_IMAGEMODELDIMENSIONSCHANGED (WM_APP + 5) -#define WM_IMAGEMODELIMAGECHANGED (WM_APP + 6) -#define WM_SELECTIONMODELREFRESHNEEDED (WM_APP + 7) - -enum CANVAS_HITTEST // hit -{ - HIT_NONE = 0, // Nothing hit or outside - HIT_UPPER_LEFT, - HIT_UPPER_CENTER, - HIT_UPPER_RIGHT, - HIT_MIDDLE_LEFT, - HIT_MIDDLE_RIGHT, - HIT_LOWER_LEFT, - HIT_LOWER_CENTER, - HIT_LOWER_RIGHT, - HIT_BORDER, - HIT_INNER, -}; - #include "resource.h" +#include "common.h" #include "drawing.h" #include "dib.h" #include "fullscreen.h" -#include "globalvar.h" #include "history.h" #include "imgarea.h" #include "miniature.h" @@ -79,6 +53,6 @@ enum CANVAS_HITTEST // hit #include "toolsmodel.h" #include "winproc.h" #include "dialogs.h" -#include "common.h" +#include "globalvar.h" #endif /* _MSPAINT_H */ diff --git a/base/applications/mspaint/registry.cpp b/base/applications/mspaint/registry.cpp index bb97301a11b..fbf659fb70c 100644 --- a/base/applications/mspaint/registry.cpp +++ b/base/applications/mspaint/registry.cpp @@ -7,14 +7,15 @@ * Katayama Hirofumi MZ */ -/* INCLUDES *********************************************************/ - #include "precomp.h" #include <winreg.h> #include <wincon.h> #include <shlobj.h> +RegistrySettings registrySettings; + /* FUNCTIONS ********************************************************/ + static void ReadDWORD(CRegKey &key, LPCTSTR lpName, DWORD &dwValue) { DWORD dwTemp; @@ -161,6 +162,9 @@ void RegistrySettings::Load(INT nCmdShow) void RegistrySettings::Store() { + BMPWidth = imageModel.GetWidth(); + BMPHeight = imageModel.GetHeight(); + CRegKey paint; if (paint.Create(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Paint")) != ERROR_SUCCESS) return; diff --git a/base/applications/mspaint/selection.cpp b/base/applications/mspaint/selection.cpp index 4a328b0ab1f..1426e086d59 100644 --- a/base/applications/mspaint/selection.cpp +++ b/base/applications/mspaint/selection.cpp @@ -7,10 +7,10 @@ * Katayama Hirofumi MZ */ -/* INCLUDES *********************************************************/ - #include "precomp.h" +CSelectionWindow selectionWindow; + /* FUNCTIONS ********************************************************/ const LPCTSTR CSelectionWindow::m_lpszCursorLUT[9] = { /* action to mouse cursor lookup table */ diff --git a/base/applications/mspaint/selectionmodel.cpp b/base/applications/mspaint/selectionmodel.cpp index 3cd41e1f64f..2079f7afd9b 100644 --- a/base/applications/mspaint/selectionmodel.cpp +++ b/base/applications/mspaint/selectionmodel.cpp @@ -7,10 +7,10 @@ * Katayama Hirofumi MZ */ -/* INCLUDES *********************************************************/ - #include "precomp.h" +SelectionModel selectionModel; + /* FUNCTIONS ********************************************************/ SelectionModel::SelectionModel() diff --git a/base/applications/mspaint/textedit.cpp b/base/applications/mspaint/textedit.cpp index 881a00bff6f..6a05cebff90 100644 --- a/base/applications/mspaint/textedit.cpp +++ b/base/applications/mspaint/textedit.cpp @@ -6,12 +6,12 @@ * PROGRAMMERS: Benedikt Freisen */ -/* INCLUDES *********************************************************/ - #include "precomp.h" #define CXY_GRIP 3 +CTextEditWindow textEditWindow; + /* FUNCTIONS ********************************************************/ CTextEditWindow::CTextEditWindow() : m_hFont(NULL), m_hFontZoomed(NULL), m_nAppIsMovingOrSizing(0) diff --git a/base/applications/mspaint/toolbox.cpp b/base/applications/mspaint/toolbox.cpp index 793c62bbfda..6ba23375ebb 100644 --- a/base/applications/mspaint/toolbox.cpp +++ b/base/applications/mspaint/toolbox.cpp @@ -7,10 +7,10 @@ * PROGRAMMERS: Benedikt Freisen */ -/* INCLUDES *********************************************************/ - #include "precomp.h" +CToolBox toolBoxContainer; + /* FUNCTIONS ********************************************************/ BOOL CToolBox::DoCreate(HWND hwndParent) diff --git a/base/applications/mspaint/toolsettings.cpp b/base/applications/mspaint/toolsettings.cpp index c8b3978e8b6..d70a3dd7f5e 100644 --- a/base/applications/mspaint/toolsettings.cpp +++ b/base/applications/mspaint/toolsettings.cpp @@ -24,11 +24,12 @@ static const BYTE s_AirRadius[4] = { 5, 8, 3, 12 }; +CToolSettingsWindow toolSettingsWindow; + /* FUNCTIONS ********************************************************/ BOOL CToolSettingsWindow::DoCreate(HWND hwndParent) { - /* creating the tool settings child window */ RECT toolSettingsWindowPos = { X_TOOLSETTINGS, Y_TOOLSETTINGS, diff --git a/base/applications/mspaint/toolsmodel.cpp b/base/applications/mspaint/toolsmodel.cpp index 5d5c7fecd0d..34341635554 100644 --- a/base/applications/mspaint/toolsmodel.cpp +++ b/base/applications/mspaint/toolsmodel.cpp @@ -6,10 +6,10 @@ * PROGRAMMERS: Benedikt Freisen */ -/* INCLUDES *********************************************************/ - #include "precomp.h" +ToolsModel toolsModel; + /* FUNCTIONS ********************************************************/ ToolsModel::ToolsModel() diff --git a/base/applications/mspaint/toolsmodel.h b/base/applications/mspaint/toolsmodel.h index 9d3a053e576..c7fc2302415 100644 --- a/base/applications/mspaint/toolsmodel.h +++ b/base/applications/mspaint/toolsmodel.h @@ -120,3 +120,15 @@ public: void NotifyToolSettingsChanged(); void NotifyZoomChanged(); }; + +extern ToolsModel toolsModel; + +static inline int Zoomed(int xy) +{ + return xy * toolsModel.GetZoom() / 1000; +} + +static inline int UnZoomed(int xy) +{ + return xy * 1000 / toolsModel.GetZoom(); +} diff --git a/base/applications/mspaint/winproc.cpp b/base/applications/mspaint/winproc.cpp index 5208e37d610..ee09d6fba99 100644 --- a/base/applications/mspaint/winproc.cpp +++ b/base/applications/mspaint/winproc.cpp @@ -17,6 +17,8 @@ typedef HWND (WINAPI *FN_HtmlHelpW)(HWND, LPCWSTR, UINT, DWORD_PTR); static HINSTANCE s_hHHCTRL_OCX = NULL; // HtmlHelpW needs "hhctrl.ocx" static FN_HtmlHelpW s_pHtmlHelpW = NULL; +HWND hStatusBar = NULL; + /* FUNCTIONS ********************************************************/ // A wrapper function for HtmlHelpW @@ -121,12 +123,12 @@ void CMainWindow::saveImage(BOOL overwrite) { imageModel.SaveImage(filepathname); } - else if (GetSaveFileName(&sfn) != 0) + else if (GetSaveFileName(filepathname, _countof(filepathname))) { - imageModel.SaveImage(sfn.lpstrFile); - _tcsncpy(filepathname, sfn.lpstrFile, _countof(filepathname)); + imageModel.SaveImage(filepathname); + CString strTitle; - strTitle.Format(IDS_WINDOWTITLE, (LPCTSTR)sfn.lpstrFileTitle); + strTitle.Format(IDS_WINDOWTITLE, PathFindFileName(filepathname)); SetWindowText(strTitle); isAFile = TRUE; } @@ -252,8 +254,45 @@ LRESULT CMainWindow::OnDropFiles(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& LRESULT CMainWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { + // Loading and setting the window menu from resource + m_hMenu = ::LoadMenu(hProgInstance, MAKEINTRESOURCE(ID_MENU)); + SetMenu(m_hMenu); + + // Create the status bar + DWORD style = SBARS_SIZEGRIP | WS_CHILD | (registrySettings.ShowStatusBar ? WS_VISIBLE : 0); + hStatusBar = ::CreateWindowEx(0, STATUSCLASSNAME, NULL, style, 0, 0, 0, 0, m_hWnd, + NULL, hProgInstance, NULL); + ::SendMessage(hStatusBar, SB_SETMINHEIGHT, 21, 0); + + // Create the tool box + toolBoxContainer.DoCreate(m_hWnd); + + // Create the palette window + RECT rcEmpty = { 0, 0, 0, 0 }; // Rely on WM_SIZE + style = WS_CHILD | (registrySettings.ShowPalette ? WS_VISIBLE : 0); + paletteWindow.Create(m_hWnd, rcEmpty, NULL, style, WS_EX_STATICEDGE); + + // Create the canvas + style = WS_CHILD | WS_GROUP | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE; + canvasWindow.Create(m_hWnd, rcEmpty, NULL, style, WS_EX_CLIENTEDGE); + + // Creating the window inside the canvas + imageArea.Create(canvasWindow, rcEmpty, NULL, WS_CHILD | WS_VISIBLE); + + // Create selection window (initially hidden) + selectionWindow.Create(imageArea, rcEmpty, NULL, WS_CHILD | BS_OWNERDRAW); + + // Create and show the miniature if necessary + if (registrySettings.ShowThumbnail) + { + miniature.DoCreate(m_hWnd); + miniature.ShowWindow(SW_SHOWNOACTIVATE); + } + + // Set icon SendMessage(WM_SETICON, ICON_BIG, (LPARAM) LoadIcon(hProgInstance, MAKEINTRESOURCE(IDI_APPICON))); SendMessage(WM_SETICON, ICON_SMALL, (LPARAM) LoadIcon(hProgInstance, MAKEINTRESOURCE(IDI_APPICON))); + return 0; } @@ -271,6 +310,13 @@ LRESULT CMainWindow::OnDestroy(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH s_pHtmlHelpW = NULL; } + SetMenu(NULL); + if (m_hMenu) + { + ::DestroyMenu(m_hMenu); + m_hMenu = NULL; + } + PostQuitMessage(0); /* send a WM_QUIT to the message queue */ return 0; } @@ -359,7 +405,7 @@ void CMainWindow::ProcessFileMenu(HMENU hPopupMenu) LRESULT CMainWindow::OnInitMenuPopup(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { - HMENU menu = GetMenu(); + HMENU menu = (HMENU)wParam; BOOL trueSelection = (::IsWindowVisible(selectionWindow) && ((toolsModel.GetActiveTool() == TOOL_FREESEL) || (toolsModel.GetActiveTool() == TOOL_RECTSEL))); @@ -389,7 +435,7 @@ LRESULT CMainWindow::OnInitMenuPopup(UINT nMsg, WPARAM wParam, LPARAM lParam, BO EnableMenuItem(menu, IDM_FORMATICONBAR, ENABLED_IF(toolsModel.GetActiveTool() == TOOL_TEXT)); CheckMenuItem(menu, IDM_VIEWSHOWGRID, CHECKED_IF(showGrid)); - CheckMenuItem(menu, IDM_VIEWSHOWMINIATURE, CHECKED_IF(showMiniature)); + CheckMenuItem(menu, IDM_VIEWSHOWMINIATURE, CHECKED_IF(registrySettings.ShowThumbnail)); break; case 3: /* Image menu */ EnableMenuItem(menu, IDM_IMAGECROP, ENABLED_IF(::IsWindowVisible(selectionWindow))); @@ -496,11 +542,14 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH } break; case IDM_FILEOPEN: - if (ConfirmSave() && GetOpenFileName(&ofn)) { - DoLoadImageFile(m_hWnd, ofn.lpstrFile, TRUE); + TCHAR szFileName[MAX_LONG_PATH] = _T(""); + if (ConfirmSave() && GetOpenFileName(szFileName, _countof(szFileName))) + { + DoLoadImageFile(m_hWnd, szFileName, TRUE); + } + break; } - break; case IDM_FILESAVE: saveImage(TRUE); break; @@ -640,13 +689,18 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH break; } case IDM_EDITCOPYTO: - if (GetSaveFileName(&ofn)) - SaveDIBToFile(selectionModel.GetBitmap(), ofn.lpstrFile, imageModel.GetDC()); + { + TCHAR szFileName[MAX_LONG_PATH] = _T(""); + if (GetSaveFileName(szFileName, _countof(szFileName))) + SaveDIBToFile(selectionModel.GetBitmap(), szFileName, imageModel.GetDC()); break; + } case IDM_EDITPASTEFROM: - if (GetOpenFileName(&ofn)) + { + TCHAR szFileName[MAX_LONG_PATH] = _T(""); + if (GetOpenFileName(szFileName, _countof(szFileName))) { - HBITMAP hbmNew = DoLoadImageFile(m_hWnd, ofn.lpstrFile, FALSE); + HBITMAP hbmNew = DoLoadImageFile(m_hWnd, szFileName, FALSE); if (hbmNew) { InsertSelectionFromHBITMAP(hbmNew, m_hWnd); @@ -654,10 +708,14 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH } } break; + } case IDM_COLORSEDITPALETTE: - if (ChooseColor(&choosecolor)) - paletteModel.SetFgColor(choosecolor.rgbResult); + { + COLORREF rgbColor = paletteModel.GetFgColor(); + if (ChooseColor(&rgbColor)) + paletteModel.SetFgColor(rgbColor); break; + } case IDM_COLORSMODERNPALETTE: paletteModel.SelectPalette(PAL_MODERN); break; @@ -773,8 +831,9 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH imageArea.Invalidate(FALSE); break; case IDM_VIEWSHOWMINIATURE: - showMiniature = !showMiniature; - miniature.ShowWindow(showMiniature ? SW_SHOW : SW_HIDE); + registrySettings.ShowThumbnail = !::IsWindowVisible(miniature); + miniature.DoCreate(m_hWnd); + miniature.ShowWindow(registrySettings.ShowThumbnail ? SW_SHOWNOACTIVATE : SW_HIDE); break; case IDM_VIEWZOOM125: @@ -800,7 +859,9 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH break; case IDM_VIEWFULLSCREEN: - fullscreenWindow.ShowWindow(SW_SHOW); + // Create and show the fullscreen window + fullscreenWindow.DoCreate(); + fullscreenWindow.ShowWindow(SW_SHOWMAXIMIZED); ShowWindow(SW_HIDE); break; } diff --git a/base/applications/mspaint/winproc.h b/base/applications/mspaint/winproc.h index 71db5e7950d..5ec12f23f0f 100644 --- a/base/applications/mspaint/winproc.h +++ b/base/applications/mspaint/winproc.h @@ -28,7 +28,16 @@ public: MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel) END_MSG_MAP() + CMainWindow() : m_hMenu(NULL) { } + + HWND DoCreate(); + BOOL GetOpenFileName(IN OUT LPTSTR pszFile, INT cchMaxFile); + BOOL GetSaveFileName(IN OUT LPTSTR pszFile, INT cchMaxFile); + BOOL ChooseColor(IN OUT COLORREF *prgbColor); + private: + HMENU m_hMenu; + LRESULT OnDropFiles(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnDestroy(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); diff --git a/sdk/lib/atl/atlimage.h b/sdk/lib/atl/atlimage.h index f84d8cb5919..5d8eed02029 100644 --- a/sdk/lib/atl/atlimage.h +++ b/sdk/lib/atl/atlimage.h @@ -543,6 +543,7 @@ public: return (status == Ok ? S_OK : E_FAIL); } + HRESULT Save(LPCTSTR pszFileName, REFGUID guidFileType = GUID_NULL) const throw() { @@ -828,15 +829,17 @@ protected: } }; + // abbreviations of GDI+ basic types + typedef Gdiplus::GpStatus St; + typedef Gdiplus::GpBitmap Bm; + typedef Gdiplus::GpImage Im; + // The common data of atlimage struct COMMON { // abbreviations of GDI+ basic types - typedef Gdiplus::GpStatus St; typedef Gdiplus::ImageCodecInfo ICI; - typedef Gdiplus::GpBitmap Bm; typedef Gdiplus::EncoderParameters EncParams; - typedef Gdiplus::GpImage Im; typedef Gdiplus::ARGB ARGB; typedef HBITMAP HBM; typedef Gdiplus::GdiplusStartupInput GSI;
1 year, 9 months
1
0
0
0
[reactos] 01/01: [KERNEL32] LCMapString: Sync to Wine a little (#5203)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0569bbd4a7883a8aba936…
commit 0569bbd4a7883a8aba936c9f658ffe80c2a51eb1 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Mar 28 21:09:27 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Mar 28 21:09:27 2023 +0900 [KERNEL32] LCMapString: Sync to Wine a little (#5203) Preparation for LCMAP_FULLWIDTH and LCMAP_HALFWIDTH support. Slightly synchronize lang.c to locale.c in Wine's dlls/kernelbase. CORE-11700 --- dll/win32/kernel32/winnls/string/lang.c | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/dll/win32/kernel32/winnls/string/lang.c b/dll/win32/kernel32/winnls/string/lang.c index a22eacf8cff..a3fa2af9d75 100644 --- a/dll/win32/kernel32/winnls/string/lang.c +++ b/dll/win32/kernel32/winnls/string/lang.c @@ -1872,7 +1872,7 @@ BOOL WINAPI GetStringTypeExA( LCID locale, DWORD type, LPCSTR src, INT count, LP * Map characters in a locale sensitive string. * * PARAMS - * name [I] Locale name for the conversion. + * locale [I] Locale name for the conversion. * flags [I] Flags controlling the mapping (LCMAP_ constants from "winnls.h") * src [I] String to map * srclen [I] Length of src in chars, or -1 if src is NUL terminated @@ -1886,17 +1886,17 @@ BOOL WINAPI GetStringTypeExA( LCID locale, DWORD type, LPCSTR src, INT count, LP * Success: The length of the mapped string in dst, including the NUL terminator. * Failure: 0. Use GetLastError() to determine the cause. */ -INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen, - LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lparam) +INT WINAPI LCMapStringEx(LPCWSTR locale, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen, + LPNLSVERSIONINFO version, LPVOID reserved, LPARAM handle) { LPWSTR dst_ptr; if (version) FIXME("unsupported version structure %p\n", version); if (reserved) FIXME("unsupported reserved pointer %p\n", reserved); - if (lparam) + if (handle) { static int once; - if (!once++) FIXME("unsupported lparam %lx\n", lparam); + if (!once++) FIXME("unsupported lparam %Ix\n", handle); } if (!src || !srclen || dstlen < 0) @@ -1905,6 +1905,19 @@ INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPW return 0; } + if (srclen < 0) srclen = lstrlenW(src) + 1; + + TRACE( "(%s,0x%08lx,%s,%d,%p,%d)\n", + debugstr_w(locale), flags, debugstr_wn(src, srclen), srclen, dst, dstlen ); + + flags &= ~LOCALE_USE_CP_ACP; + + if (src == dst && (flags & ~(LCMAP_LOWERCASE | LCMAP_UPPERCASE))) + { + SetLastError(ERROR_INVALID_FLAGS); + return 0; + } + /* mutually exclusive flags */ if ((flags & (LCMAP_LOWERCASE | LCMAP_UPPERCASE)) == (LCMAP_LOWERCASE | LCMAP_UPPERCASE) || (flags & (LCMAP_HIRAGANA | LCMAP_KATAKANA)) == (LCMAP_HIRAGANA | LCMAP_KATAKANA) || @@ -1928,9 +1941,6 @@ INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPW if (srclen < 0) srclen = strlenW(src); - TRACE("(%s,0x%08x,%s,%d,%p,%d)\n", - debugstr_w(name), flags, debugstr_wn(src, srclen), srclen, dst, dstlen); - ret = wine_get_sortkey(flags, src, srclen, (char *)dst, dstlen); if (ret == 0) SetLastError(ERROR_INSUFFICIENT_BUFFER); @@ -1946,11 +1956,6 @@ INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPW return 0; } - if (srclen < 0) srclen = strlenW(src) + 1; - - TRACE("(%s,0x%08x,%s,%d,%p,%d)\n", - debugstr_w(name), flags, debugstr_wn(src, srclen), srclen, dst, dstlen); - if (!dst) /* return required string length */ { INT len; @@ -1993,11 +1998,6 @@ INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPW } else { - if (src == dst) - { - SetLastError(ERROR_INVALID_FLAGS); - return 0; - } for (dst_ptr = dst; srclen && dstlen; src++, srclen--) { WCHAR wch = *src;
1 year, 9 months
1
0
0
0
← Newer
1
2
3
4
...
14
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Results per page:
10
25
50
100
200