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
September 2018
----- 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
24 participants
223 discussions
Start a n
N
ew thread
01/01: [TRANSLATION] Updated Polish translation in USETUP (#848)
by Paweł Cholewa
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8b3718261340618acbb62…
commit 8b3718261340618acbb62889d0adb7e363fd0278 Author: Paweł Cholewa <MCPlayG(a)wp.pl> AuthorDate: Sun Sep 9 22:28:02 2018 +0200 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Sep 9 22:28:02 2018 +0200 [TRANSLATION] Updated Polish translation in USETUP (#848) --- base/setup/usetup/lang/pl-PL.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/setup/usetup/lang/pl-PL.h b/base/setup/usetup/lang/pl-PL.h index b1381bcac1..c7c3269097 100644 --- a/base/setup/usetup/lang/pl-PL.h +++ b/base/setup/usetup/lang/pl-PL.h @@ -1789,7 +1789,7 @@ MUI_STRING plPLStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Restart komputera"}, {STRING_REBOOTPROGRESSBAR, - " Your computer will reboot in %li second(s)... "}, + " Komputer zostanie uruchomiony ponownie za %li sekund(y)... "}, {STRING_CONSOLEFAIL1, "Otwarcie konsoli nieudane\r\n\r\n"}, {STRING_CONSOLEFAIL2,
6 years, 3 months
1
0
0
0
02/02: [USETUP] Italian translation update
by Bișoc George
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=402ea59af6b43eb2ed675…
commit 402ea59af6b43eb2ed675624ab9087643fd6bc9d Author: Bișoc George <fraizeraust99(a)gmail.com> AuthorDate: Sun Sep 9 19:37:10 2018 +0200 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Sep 9 22:26:39 2018 +0200 [USETUP] Italian translation update --- base/setup/usetup/lang/it-IT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/setup/usetup/lang/it-IT.h b/base/setup/usetup/lang/it-IT.h index 9fcaf4c6af..691830a939 100644 --- a/base/setup/usetup/lang/it-IT.h +++ b/base/setup/usetup/lang/it-IT.h @@ -1785,7 +1785,7 @@ MUI_STRING itITStrings[] = {STRING_REBOOTCOMPUTER2, " INVIO = Riavvia il computer"}, {STRING_REBOOTPROGRESSBAR, - " Your computer will reboot in %li second(s)... "}, + " Il computer si riavvierà in %li secondi... "}, {STRING_CONSOLEFAIL1, "Impossibile aprire la console\r\n\r\n"}, {STRING_CONSOLEFAIL2,
6 years, 3 months
1
0
0
0
01/02: [USETUP] Romanian translation update
by Bișoc George
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c1bf18bada6bda1b4f691…
commit c1bf18bada6bda1b4f691efd9383c3380292411d Author: Bișoc George <fraizeraust99(a)gmail.com> AuthorDate: Sun Sep 9 19:36:24 2018 +0200 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Sep 9 22:26:39 2018 +0200 [USETUP] Romanian translation update --- base/setup/usetup/lang/ro-RO.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/setup/usetup/lang/ro-RO.h b/base/setup/usetup/lang/ro-RO.h index ea86f5a9cd..f1e45956a6 100644 --- a/base/setup/usetup/lang/ro-RO.h +++ b/base/setup/usetup/lang/ro-RO.h @@ -1832,7 +1832,7 @@ MUI_STRING roROStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Repornire calculator"}, {STRING_REBOOTPROGRESSBAR, - " Your computer will reboot in %li second(s)... "}, + " Calculatorul va reporni �n %li secunde... "}, {STRING_CONSOLEFAIL1, "E�ec la deschiderea consolei\r\n\r\n"}, {STRING_CONSOLEFAIL2,
6 years, 3 months
1
0
0
0
02/02: [BIDITEXT] Add more demo code. (#842)
by Baruch Rutman
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1fc041c91a89b9a3327b7…
commit 1fc041c91a89b9a3327b76ebc18590787387ddb5 Author: Baruch Rutman <peterooch(a)gmail.com> AuthorDate: Fri Sep 7 10:59:59 2018 +0300 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Sep 9 18:03:48 2018 +0200 [BIDITEXT] Add more demo code. (#842) Add code that demonstrates the use of the lpOrder and lpCaretPos struct members of GCP_RESULTS w/ and w/o GCP_REORDER flag. Changed demo string literals to arrays containing character unicode values. --- modules/rostests/win32/user32/biditext/biditext.c | 84 +++++++++++++++++++++-- modules/rostests/win32/user32/biditext/biditext.h | 1 + 2 files changed, 79 insertions(+), 6 deletions(-) diff --git a/modules/rostests/win32/user32/biditext/biditext.c b/modules/rostests/win32/user32/biditext/biditext.c index cc714c40f7..ee11d56b79 100644 --- a/modules/rostests/win32/user32/biditext/biditext.c +++ b/modules/rostests/win32/user32/biditext/biditext.c @@ -60,7 +60,7 @@ wWinMain(HINSTANCE hInstance, hAccelerators = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDR_ACCELERATOR)); /* Show main window and force a paint */ - ShowWindow(hWnd, nCmdShow); + ShowWindow(hWnd, nCmdShow | SW_MAXIMIZE); UpdateWindow(hWnd); /* Main message loop */ @@ -171,24 +171,47 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_PAINT: { PAINTSTRUCT ps; - + HDC hdc = BeginPaint(hWnd, &ps); - - LPWSTR szString = L"אבגדהABCDוזחטי"; - int Len = (int)wcslen(szString); + enum + { + ALEF = 0x5D0, + BET, + GIMEL, + DALET, + HEY, + VAV, + ZAYIN, + HET, + TET, + YUD + }; + + const WCHAR szString[] = {ALEF, BET, GIMEL, DALET, HEY, 'A', 'B', 'C', 'D', VAV, ZAYIN, HET, TET, YUD, 0}; + const WCHAR szReversedString[] = {HEY, DALET, GIMEL, BET, ALEF, 'A', 'B', 'C', 'D', YUD, TET, HET, ZAYIN, VAV, 0}; + int Len = wcslen(szString); + int i, xpos, tempLength; + WCHAR tempString[20] = { 0 }; WCHAR Glyphs[100] = { 0 }; WCHAR OutString[100] = { 0 }; + INT lpCaretPos[100] = { 0 }; + UINT lpOrder[100] = { 0 }; GCP_RESULTSW Results = { 0 }; + Results.lStructSize = sizeof(Results); Results.lpOutString = OutString; Results.lpGlyphs = Glyphs; Results.nGlyphs = 100; + Results.lpCaretPos = lpCaretPos; + Results.lpOrder = lpOrder; + + SetBkMode(hdc, TRANSPARENT); TextOutW(hdc, 10, 10, L"Proper (string being used):", 27); TextOutW(hdc, 200, 10, szString, 14); TextOutW(hdc, 10, 30, L"Reversed (example):", 19); - TextOutW(hdc, 200, 30, L"הדגבאABCDיטחזו", 14); + TextOutW(hdc, 200, 30, szReversedString, 14); TextOutW(hdc, 10, 50, L"String with NULL LpkETO call (not reversed):", 44); LpkExtTextOut(hdc, 10, 70, 0, NULL, szString, Len, NULL, 0); @@ -217,6 +240,55 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) TextOutW(hdc, 10, 370, L"String with ETO_RTLREADING ETO call (slight order change)", 57); ExtTextOutW(hdc, 10, 390, ETO_RTLREADING, NULL, szString, Len, NULL); + GetCharacterPlacementW(hdc, szString, Len, 0, &Results, GCP_REORDER); + TextOutW(hdc, 10, 410, L"Glyph positions with GCP_REORDER flag", 37); + + /* Prints per column the location of the character in the string, reordered location, its position and the character itself */ + for (i = 0, xpos = 10; i < Len; i++, xpos += 30) + { + StringCchPrintfW(tempString, 20, L"%d", i); + tempLength = wcslen(tempString); + TextOutW(hdc, xpos, 430, tempString, tempLength); + + StringCchPrintfW(tempString, 20, L"%d", lpOrder[i]); + tempLength = wcslen(tempString); + TextOutW(hdc, xpos, 450, tempString, tempLength); + + StringCchPrintfW(tempString, 20, L"%d", lpCaretPos[i]); + tempLength = wcslen(tempString); + TextOutW(hdc, xpos, 470, tempString, tempLength); + + TextOutW(hdc, xpos, 490, &szString[i], 1); + } + TextOutW(hdc, xpos, 430, L"Character location", 18); + TextOutW(hdc, xpos, 450, L"lpOrder[i]", 10); + TextOutW(hdc, xpos, 470, L"lpCaretPos[i]", 13); + TextOutW(hdc, xpos, 490, L"String[i]", 9); + + GetCharacterPlacementW(hdc, szString, Len, 0, &Results, 0); + TextOutW(hdc, 10, 510, L"Glyph positions without GCP_REORDER flag", 40); + + for (i = 0, xpos = 10; i < Len; i++, xpos += 30) + { + StringCchPrintfW(tempString, 20, L"%d", i); + tempLength = wcslen(tempString); + TextOutW(hdc, xpos, 530, tempString, tempLength); + + StringCchPrintfW(tempString, 20, L"%d", lpOrder[i]); + tempLength = wcslen(tempString); + TextOutW(hdc, xpos, 550, tempString, tempLength); + + StringCchPrintfW(tempString, 20, L"%d", lpCaretPos[i]); + tempLength = wcslen(tempString); + TextOutW(hdc, xpos, 570, tempString, tempLength); + + TextOutW(hdc, xpos, 590, &szString[i], 1); + } + TextOutW(hdc, xpos, 530, L"Character location", 18); + TextOutW(hdc, xpos, 550, L"lpOrder[i]", 10); + TextOutW(hdc, xpos, 570, L"lpCaretPos[i]", 13); + TextOutW(hdc, xpos, 590, L"String[i]", 9); + EndPaint(hWnd, &ps); break; } diff --git a/modules/rostests/win32/user32/biditext/biditext.h b/modules/rostests/win32/user32/biditext/biditext.h index 433223776d..f9207fe5ea 100644 --- a/modules/rostests/win32/user32/biditext/biditext.h +++ b/modules/rostests/win32/user32/biditext/biditext.h @@ -2,6 +2,7 @@ #include <windows.h> #include <commctrl.h> +#include <strsafe.h> /* Global instance handle */ extern HINSTANCE g_hInstance;
6 years, 3 months
1
0
0
0
01/02: [LPK] Make GetCharacterPlacement caret positions respect bidi. (#842)
by Baruch Rutman
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ab5fdcc01f7fe3e7f2199…
commit ab5fdcc01f7fe3e7f21999d8908c866188a22355 Author: Baruch Rutman <peterooch(a)gmail.com> AuthorDate: Fri Sep 7 10:45:35 2018 +0300 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Sep 9 18:03:45 2018 +0200 [LPK] Make GetCharacterPlacement caret positions respect bidi. (#842) - Try to make use of ScriptStringCPtoX when trying to fill the lpCaretPos struct member; if USP10 error happens fallback to the unreorder method. - Remove now incorrect debug print. --- dll/win32/lpk/bidi.c | 5 +++++ dll/win32/lpk/lpk.c | 34 ++++++++++++++++++++++++++++------ win32ss/gdi/gdi32/objects/font.c | 2 -- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/dll/win32/lpk/bidi.c b/dll/win32/lpk/bidi.c index a380e1f2ed..1d92cfd002 100644 --- a/dll/win32/lpk/bidi.c +++ b/dll/win32/lpk/bidi.c @@ -460,7 +460,12 @@ BOOL BIDI_Reorder( if (lpGlyphs) { +#ifdef __REACTOS__ + /* ReactOS r57677 and r57679 */ + cMaxGlyphs = 3 * uCount / 2 + 16; +#else cMaxGlyphs = 1.5 * uCount + 16; +#endif run_glyphs = HeapAlloc(GetProcessHeap(),0,sizeof(WORD) * cMaxGlyphs); if (!run_glyphs) { diff --git a/dll/win32/lpk/lpk.c b/dll/win32/lpk/lpk.c index 075778ba7c..b567d744ca 100644 --- a/dll/win32/lpk/lpk.c +++ b/dll/win32/lpk/lpk.c @@ -134,9 +134,11 @@ LpkGetCharacterPlacement( DWORD dwFlags, DWORD dwUnused) { + DWORD ret = 0; + HRESULT hr; + SCRIPT_STRING_ANALYSIS ssa; LPWORD lpGlyphs = NULL; SIZE size; - DWORD ret = 0; UINT nSet, i; INT cGlyphs; @@ -190,16 +192,36 @@ LpkGetCharacterPlacement( } } - /* FIXME: Currently not bidi compliant! */ if (lpResults->lpCaretPos) { int pos = 0; - lpResults->lpCaretPos[0] = 0; - for (i = 1; i < nSet; i++) + hr = ScriptStringAnalyse(hdc, lpString, nSet, +#ifdef __REACTOS__ + /* ReactOS r57677 and r57679 */ + (3 * nSet / 2 + 16), +#else + (1.5 * nSet + 16), +#endif + -1, SSA_GLYPHS, -1, + NULL, NULL, NULL, NULL, NULL, &ssa); + if (hr == S_OK) + { + for (i = 0; i < nSet; i++) + { + if (ScriptStringCPtoX(ssa, i, FALSE, &pos) == S_OK) + lpResults->lpCaretPos[i] = pos; + } + ScriptStringFree(&ssa); + } + else { - if (GetTextExtentPoint32W(hdc, &(lpString[i - 1]), 1, &size)) - lpResults->lpCaretPos[i] = (pos += size.cx); + lpResults->lpCaretPos[0] = 0; + for (i = 1; i < nSet; i++) + { + if (GetTextExtentPoint32W(hdc, &(lpString[i - 1]), 1, &size)) + lpResults->lpCaretPos[i] = (pos += size.cx); + } } } diff --git a/win32ss/gdi/gdi32/objects/font.c b/win32ss/gdi/gdi32/objects/font.c index 871ea50952..38758fa790 100644 --- a/win32ss/gdi/gdi32/objects/font.c +++ b/win32ss/gdi/gdi32/objects/font.c @@ -450,8 +450,6 @@ GetCharacterPlacementW( if (dwFlags&(~GCP_REORDER)) DPRINT("flags 0x%08lx ignored\n", dwFlags); if (lpResults->lpClass) DPRINT("classes not implemented\n"); - if (lpResults->lpCaretPos && (dwFlags & GCP_REORDER)) - DPRINT("Caret positions for complex scripts not implemented\n"); nSet = (UINT)uCount; if (nSet > lpResults->nGlyphs)
6 years, 3 months
1
0
0
0
01/01: [WIN32SS][COMCTL32] Fix button text Y positioning (#766)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a244e4f6ddbfee4f66e3e…
commit a244e4f6ddbfee4f66e3e1ea5b9f48e09465dbc1 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Sep 10 00:37:37 2018 +0900 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Sep 9 17:37:37 2018 +0200 [WIN32SS][COMCTL32] Fix button text Y positioning (#766) Fixes the vertical position of button text. CORE-14906 --- dll/win32/comctl32/button.c | 4 ++++ win32ss/user/user32/controls/button.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dll/win32/comctl32/button.c b/dll/win32/comctl32/button.c index bc9336d705..813aa7455d 100644 --- a/dll/win32/comctl32/button.c +++ b/dll/win32/comctl32/button.c @@ -1273,7 +1273,11 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC hdc, RECT *rc) { case DT_TOP: r.top++; r.bottom++; break; case DT_VCENTER: n = r.bottom - r.top; +#ifdef __REACTOS__ + r.top = rc->top + ((rc->bottom - 1 - rc->top) - n) / 2; +#else r.top = rc->top + ((rc->bottom - rc->top) - n) / 2; +#endif r.bottom = r.top + n; break; case DT_BOTTOM: n = r.bottom - r.top; r.bottom = rc->bottom - 1; diff --git a/win32ss/user/user32/controls/button.c b/win32ss/user/user32/controls/button.c index 2538a9847b..6e7d70e77e 100644 --- a/win32ss/user/user32/controls/button.c +++ b/win32ss/user/user32/controls/button.c @@ -832,7 +832,11 @@ static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc) { case DT_TOP: r.top++; r.bottom++; break; case DT_VCENTER: n = r.bottom - r.top; +#ifdef __REACTOS__ + r.top = rc->top + ((rc->bottom - 1 - rc->top) - n) / 2; +#else r.top = rc->top + ((rc->bottom - rc->top) - n) / 2; +#endif r.bottom = r.top + n; break; case DT_BOTTOM: n = r.bottom - r.top; r.bottom = rc->bottom - 1;
6 years, 3 months
1
0
0
0
01/01: [NETAPI32] Implement NetGroupAddUser and NetGroupDelUser
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2d645f62fe7baff3c5e0f…
commit 2d645f62fe7baff3c5e0f215f439000441f5cb5d Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Sep 9 17:33:03 2018 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Sep 9 17:35:18 2018 +0200 [NETAPI32] Implement NetGroupAddUser and NetGroupDelUser --- dll/win32/netapi32/group.c | 31 ------ dll/win32/netapi32/group_new.c | 231 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+), 31 deletions(-) diff --git a/dll/win32/netapi32/group.c b/dll/win32/netapi32/group.c index b87ab9b83c..efb46e86c1 100644 --- a/dll/win32/netapi32/group.c +++ b/dll/win32/netapi32/group.c @@ -22,37 +22,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(netapi32); -/************************************************************ - * NetGroupAddUser (NETAPI32.@) - * - */ -NET_API_STATUS -WINAPI -NetGroupAddUser(IN LPCWSTR servername, - IN LPCWSTR groupname, - IN LPCWSTR username) -{ - FIXME("(%s, %s, %s) stub!\n", debugstr_w(servername), - debugstr_w(groupname), debugstr_w(username)); - return ERROR_ACCESS_DENIED; -} - - -/************************************************************ - * NetGroupDelUser (NETAPI32.@) - * - */ -NET_API_STATUS -WINAPI -NetGroupDelUser(IN LPCWSTR servername, - IN LPCWSTR groupname, - IN LPCWSTR username) -{ - FIXME("(%s, %s, %s) stub!\n", debugstr_w(servername), - debugstr_w(groupname), debugstr_w(username)); - return ERROR_ACCESS_DENIED; -} - /************************************************************ * NetGroupGetUsers (NETAPI32.@) diff --git a/dll/win32/netapi32/group_new.c b/dll/win32/netapi32/group_new.c index 7a9d27185b..743e685c94 100644 --- a/dll/win32/netapi32/group_new.c +++ b/dll/win32/netapi32/group_new.c @@ -443,6 +443,122 @@ done: } +NET_API_STATUS +WINAPI +NetGroupAddUser( + _In_opt_ LPCWSTR servername, + _In_ LPCWSTR groupname, + _In_ LPCWSTR username) +{ + UNICODE_STRING ServerName; + UNICODE_STRING GroupName; + UNICODE_STRING UserName; + SAM_HANDLE ServerHandle = NULL; + SAM_HANDLE DomainHandle = NULL; + SAM_HANDLE GroupHandle = NULL; + PULONG RelativeIds = NULL; + PSID_NAME_USE Use = NULL; + NET_API_STATUS ApiStatus = NERR_Success; + NTSTATUS Status = STATUS_SUCCESS; + + TRACE("NetGroupAddUser(%s, %s, %s)\n", + debugstr_w(servername), debugstr_w(groupname), debugstr_w(username)); + + if (servername != NULL) + RtlInitUnicodeString(&ServerName, servername); + + RtlInitUnicodeString(&GroupName, groupname); + + RtlInitUnicodeString(&UserName, username); + + /* Connect to the SAM Server */ + Status = SamConnect((servername != NULL) ? &ServerName : NULL, + &ServerHandle, + SAM_SERVER_CONNECT | SAM_SERVER_LOOKUP_DOMAIN, + NULL); + if (!NT_SUCCESS(Status)) + { + ERR("SamConnect failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the Acount Domain */ + Status = OpenAccountDomain(ServerHandle, + (servername != NULL) ? &ServerName : NULL, + DOMAIN_LOOKUP, + &DomainHandle); + if (!NT_SUCCESS(Status)) + { + ERR("OpenAccountDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the group account */ + ApiStatus = OpenGroupByName(DomainHandle, + &GroupName, + GROUP_ADD_MEMBER, + &GroupHandle, + NULL); + if (ApiStatus != NERR_Success) + { + ERR("OpenGroupByName failed (ApiStatus %lu)\n", ApiStatus); + if (ApiStatus == ERROR_NONE_MAPPED) + ApiStatus = NERR_GroupNotFound; + goto done; + } + + Status = SamLookupNamesInDomain(DomainHandle, + 1, + &UserName, + &RelativeIds, + &Use); + if (!NT_SUCCESS(Status)) + { + ERR("SamLookupNamesInDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Fail, if it is not a user account */ + if (Use[0] != SidTypeUser) + { + ERR("Object is not a user!\n"); + ApiStatus = NERR_GroupNotFound; + goto done; + } + + Status = SamAddMemberToGroup(GroupHandle, + RelativeIds[0], + 0); + if (!NT_SUCCESS(Status)) + { + ERR("SamAddMemberToGroup failed (Status %lu)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + +done: + if (RelativeIds != NULL) + SamFreeMemory(RelativeIds); + + if (Use != NULL) + SamFreeMemory(Use); + + if (GroupHandle != NULL) + SamCloseHandle(GroupHandle); + + if (DomainHandle != NULL) + SamCloseHandle(DomainHandle); + + if (ServerHandle != NULL) + SamCloseHandle(ServerHandle); + + return ApiStatus; +} + + NET_API_STATUS WINAPI NetGroupDel( @@ -526,6 +642,121 @@ done: } +NET_API_STATUS +WINAPI +NetGroupDelUser( + _In_opt_ LPCWSTR servername, + _In_ LPCWSTR groupname, + _In_ LPCWSTR username) +{ + UNICODE_STRING ServerName; + UNICODE_STRING GroupName; + UNICODE_STRING UserName; + SAM_HANDLE ServerHandle = NULL; + SAM_HANDLE DomainHandle = NULL; + SAM_HANDLE GroupHandle = NULL; + PULONG RelativeIds = NULL; + PSID_NAME_USE Use = NULL; + NET_API_STATUS ApiStatus = NERR_Success; + NTSTATUS Status = STATUS_SUCCESS; + + TRACE("NetGroupDelUser(%s, %s, %s)\n", + debugstr_w(servername), debugstr_w(groupname), debugstr_w(username)); + + if (servername != NULL) + RtlInitUnicodeString(&ServerName, servername); + + RtlInitUnicodeString(&GroupName, groupname); + + RtlInitUnicodeString(&UserName, username); + + /* Connect to the SAM Server */ + Status = SamConnect((servername != NULL) ? &ServerName : NULL, + &ServerHandle, + SAM_SERVER_CONNECT | SAM_SERVER_LOOKUP_DOMAIN, + NULL); + if (!NT_SUCCESS(Status)) + { + ERR("SamConnect failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the Acount Domain */ + Status = OpenAccountDomain(ServerHandle, + (servername != NULL) ? &ServerName : NULL, + DOMAIN_LOOKUP, + &DomainHandle); + if (!NT_SUCCESS(Status)) + { + ERR("OpenAccountDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Open the group account */ + ApiStatus = OpenGroupByName(DomainHandle, + &GroupName, + GROUP_REMOVE_MEMBER, + &GroupHandle, + NULL); + if (ApiStatus != NERR_Success) + { + ERR("OpenGroupByName failed (ApiStatus %lu)\n", ApiStatus); + if (ApiStatus == ERROR_NONE_MAPPED) + ApiStatus = NERR_GroupNotFound; + goto done; + } + + Status = SamLookupNamesInDomain(DomainHandle, + 1, + &UserName, + &RelativeIds, + &Use); + if (!NT_SUCCESS(Status)) + { + ERR("SamLookupNamesInDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + /* Fail, if it is not a user account */ + if (Use[0] != SidTypeUser) + { + ERR("Object is not a user!\n"); + ApiStatus = NERR_GroupNotFound; + goto done; + } + + Status = SamRemoveMemberFromGroup(GroupHandle, + RelativeIds[0]); + if (!NT_SUCCESS(Status)) + { + ERR("SamRemoveMemberFromGroup failed (Status %lu)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + +done: + if (RelativeIds != NULL) + SamFreeMemory(RelativeIds); + + if (Use != NULL) + SamFreeMemory(Use); + + if (GroupHandle != NULL) + SamCloseHandle(GroupHandle); + + if (DomainHandle != NULL) + SamCloseHandle(DomainHandle); + + if (ServerHandle != NULL) + SamCloseHandle(ServerHandle); + + return ApiStatus; +} + + NET_API_STATUS WINAPI NetGroupEnum(
6 years, 3 months
1
0
0
0
01/01: [SETUP][REACTOS] Added Vietnamese translation. (#716)
by Nguyễn Thanh Sơn
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f47d0023b71cb9ea02059…
commit f47d0023b71cb9ea0205905a814bead1fab80bec Author: Nguyễn Thanh Sơn <41716684+Dummynosrev(a)users.noreply.github.com> AuthorDate: Sun Sep 9 22:34:21 2018 +0700 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Sep 9 17:34:21 2018 +0200 [SETUP][REACTOS] Added Vietnamese translation. (#716) --- base/setup/reactos/lang/vi-VN.rc | 137 +++++++++++++++++++++++++++++++++++++++ base/setup/reactos/reactos.rc | 5 +- 2 files changed, 141 insertions(+), 1 deletion(-) diff --git a/base/setup/reactos/lang/vi-VN.rc b/base/setup/reactos/lang/vi-VN.rc new file mode 100644 index 0000000000..02eb29a8e9 --- /dev/null +++ b/base/setup/reactos/lang/vi-VN.rc @@ -0,0 +1,137 @@ +LANGUAGE LANG_VIETNAMESE, SUBLANG_VIETNAMESE_VIETNAM + +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Cài đặt ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Chào mừng đến với Trình hướng dẫn thiết lập ReactOS.", IDC_STARTTITLE, 115, 8, 195, 24 + LTEXT "Bạn chưa thể cài đặt ReactOS trực tiếp tư đĩa CD này được! Xin hãy khởi động lại máy tính của bạn từ đĩa CD trên để cài đặt ReactOS.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Ấn Hoàn tất để thoát trình Thiết lập.", IDC_STATIC, 115, 169, 195, 17 +END + +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Cài đặt ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + AUTORADIOBUTTON "Cài đặt ReactOS", IDC_INSTALL, 7, 7, 277, 10 + LTEXT "Cài đặt một bản sao mới của ReactOS. Tùy chọn này sẽ không giữ lại các thư mục,tập tin và chương trình của bạn. Bạn có thể thực hiện những thay đổi cho các ổ đĩa và những phần phân chia trong ổ đĩa.", IDC_INSTALLTEXT, 18, 18, 269, 25 + AUTORADIOBUTTON "Cập nhật hay sửa chữa ReactOS", IDC_UPDATE, 7, 50, 277, 10 + LTEXT "Cập nhật hay sửa chữa một bản sao đã cài đặt của ReactOS. Tùy chọn này sẽ giữ lại các tập tin, cài đặt và chương trình của bạn. Tùy chọn này chỉ dùng được nếu ReactOS đã được cài đặt trên máy tinh này.", IDC_UPDATETEXT, 18, 61, 269, 30 + LTEXT "Ấn Tiếp để tiếp tục.", IDC_STATIC, 7, 128, 297, 8 +END + +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Cài đặt ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Máy tính:", IDC_STATIC, 20, 15, 80, 10 + CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 100, 15, 180, 80 + LTEXT "Màn hình:", IDC_STATIC, 20, 35, 80, 10 + CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 100, 35, 180, 80 + LTEXT "Bàn phím:", IDC_STATIC, 20, 55, 80, 10 + CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 100, 55, 180, 80 + LTEXT "Ấn Tiếp để thiết lập thiết bị cài đặt.", IDC_STATIC, 7, 128, 297, 8 +END + +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Cài đặt ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_PARTITION, "SysListView32", WS_BORDER | WS_VISIBLE | WS_TABSTOP | LVS_REPORT | LVS_SINGLESEL, 7, 7, 303, 112 + PUSHBUTTON "&Tạo", IDC_PARTCREATE, 7, 122, 50, 14 + PUSHBUTTON "&Xóa", IDC_PARTDELETE, 63, 122, 50, 14 + PUSHBUTTON "P&hần mềm", IDC_DEVICEDRIVER, 174, 122, 50, 14, WS_DISABLED + PUSHBUTTON "&Tùy chọn nâng cao...", IDC_PARTMOREOPTS, 230, 122, 80, 14 +/* LTEXT "Ấn Tiếp để kiểm tra phần tóm lượct.", IDC_STATIC, 7, 128, 277, 8 */ +END + +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE DS_SHELLFONT | WS_VISIBLE | WS_CAPTION +CAPTION "Phân chia ổ cứng" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_UPDOWN1, "msctls_updown32", WS_VISIBLE, 104, 22, 9, 13 + CONTROL "Tạo và định dạng phần ổ cứng", IDC_STATIC, "Button", BS_GROUPBOX, 7, 5, 129, 57 + LTEXT "Kích cỡ:", IDC_STATIC, 13, 24, 27, 9 + EDITTEXT IDC_PARTSIZE, 58, 22, 47, 13, WS_VISIBLE | WS_TABSTOP + LTEXT "GB", IDC_UNIT, 117, 24, 14, 9 + LTEXT "Loại định dạng:", IDC_STATIC, 13, 46, 42, 9 + CONTROL "", IDC_FSTYPE, "ComboBox", WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST, 58, 42, 73, 50 + PUSHBUTTON "&Đồng ý", IDOK, 35, 68, 47, 15, WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Hủy", IDCANCEL, 87, 68, 47, 15, WS_VISIBLE | WS_TABSTOP +END + +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE DS_SHELLFONT | WS_VISIBLE | WS_CAPTION +CAPTION "Tùy chọn phân chia ổ đĩa nâng cao" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Thư mục cài đặt", IDC_STATIC, "Button", BS_GROUPBOX, 4, 1, 298, 30 + EDITTEXT IDC_PATH, 10, 11, 278, 13, WS_VISIBLE + CONTROL "Cài đặt Boot loader", IDC_STATIC, "Button", BS_GROUPBOX, 4, 36, 298, 52 + CONTROL "Cài boot loader trên ổ cứng (MBR-MasterBootRecord- và VBR-VolumeBootRecord)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10, 46, 278, 11 + CONTROL "Cài boot loader (chỉ VBR)", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10, 57, 278, 11 + CONTROL "Không cài bootloader", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED, 10, 68, 278, 11 + PUSHBUTTON "&Đồng ý", IDOK, 180, 94, 50, 15, WS_TABSTOP | WS_VISIBLE + PUSHBUTTON "&Hủy", IDCANCEL, 240, 94, 50, 15, WS_TABSTOP | WS_VISIBLE +END + +IDD_SUMMARYPAGE DIALOGEX 0, 0, 317, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Cài đặt ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Ấn Tiếp để băt đầu quá trình cài đặt.", IDC_STATIC, 7, 128, 303, 8 +END + +IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Cài đặt ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Cài đặt các tập tin...", IDC_ACTIVITY, 20, 50, 277, 10 + LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10 + CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 7, 120, 303, 8 +END + +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Đang hoàn tất cài đặt Reactos" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Bạn đã hoàn thành giai đoạn đầu của việc thiết lập ReactOS.", IDC_STATIC, 115, 50, 195, 10 + LTEXT "bạn Khi bạn ấn Hoàn tất,máy tính của bạn sẽ khởi động lại.", IDC_STATIC, 115, 80, 195, 10 + CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 110, 195, 8 + LTEXT "Nếu ổ đĩa của bạn còn chứa dĩa CD cài đặt, hãy lấy nó ra. Sau đó, ấn Hoàn tất để khởi động lại máy tính của bạn.", IDC_STATIC, 115, 169, 195, 17 +END + +STRINGTABLE +BEGIN + IDS_TYPETITLE "Chào mừng tới trình Thiết lập ReactOS" + IDS_TYPESUBTITLE "Chọn kiểu thiết lập." + IDS_DEVICETITLE "Thiết lập các thiết bị cơ bản" + IDS_DEVICESUBTITLE "Chọn những cài đặt cho màn hình và bàn phím." + IDS_DRIVETITLE "Thiết lập phần ổ cứng để cài đặt và thư mục hệ thống" + IDS_DRIVESUBTITLE "Chuẩn bị phần ổ cứng, thư mục hệ thống và boot loader." + IDS_PROCESSTITLE "Thiết lập phần ổ cứng, sao chép tập tin và thiết lập hệ thống" + IDS_PROCESSSUBTITLE "Tạo và định dạng phần ổ đĩa, sao chép thư mục, cài đặt và thiết lập boot loader" + IDS_RESTARTTITLE "Giai đoạn đầu của việc thiết lập đã hoàn tất" + IDS_RESTARTSUBTITLE "Giai đoạn đầu của việc thiết lập đã được hoàn thành, khởi động lại máy tính để tiếp tuc với giai đoạn hai" + IDS_SUMMARYTITLE "Tóm lược quá trình cài đặt" + IDS_SUMMARYSUBTITLE "Liệt kê các thuộc tính đã lựa chọn nhằm kiểm lại trước khi áp dụng vào thiết bị được chọn" + IDS_ABORTSETUP "ReactOS vẵn chưa được hoàn tất cài đặt trên máy tính của bạn. Nếu bây giờ bạn hủy trình Thiết lập, lần tới ban sẽ cần phải chạy lại trình Thiết lập để cài đặt ReactOS. Bạn thực sự muốn bỏ?" + IDS_ABORTSETUP2 "Hủy bỏ trình Thiết lập?" + IDS_NO_TXTSETUP_SIF "Không thể tìm được tập tin 'txtsetup.sif'\ntrình Thiết lập không thể tiếp tục" + IDS_CAPTION "Cài đặt ReactOS" +END + +STRINGTABLE +BEGIN + IDS_PARTITION_NAME "Tên" + IDS_PARTITION_SIZE "Kích cỡ" + IDS_PARTITION_TYPE "Loại định dạng" +END diff --git a/base/setup/reactos/reactos.rc b/base/setup/reactos/reactos.rc index 633cfc4561..e20f4a6ab0 100644 --- a/base/setup/reactos/reactos.rc +++ b/base/setup/reactos/reactos.rc @@ -92,9 +92,12 @@ IDB_HEADER BITMAP "res/header.bmp" #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif +#ifdef LANGUAGE_VI_VN + #include "lang/vi-VN.rc" +#endif #ifdef LANGUAGE_ZH_CN #include "lang/zh-CN.rc" #endif #ifdef LANGUAGE_ZH_TW #include "lang/zh-TW.rc" -#endif \ No newline at end of file +#endif
6 years, 3 months
1
0
0
0
01/01: [USETUP] Update French translation.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=320e0d01aeaadbe8c21e6…
commit 320e0d01aeaadbe8c21e6b53c5ade2a7b74069f0 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Sep 9 17:24:38 2018 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Sep 9 17:24:38 2018 +0200 [USETUP] Update French translation. --- base/setup/usetup/lang/fr-FR.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/setup/usetup/lang/fr-FR.h b/base/setup/usetup/lang/fr-FR.h index fc2780e433..51456c43d9 100644 --- a/base/setup/usetup/lang/fr-FR.h +++ b/base/setup/usetup/lang/fr-FR.h @@ -1797,7 +1797,7 @@ MUI_STRING frFRStrings[] = {STRING_REBOOTCOMPUTER2, " ENTR�E = Red�marrer l'ordinateur"}, {STRING_REBOOTPROGRESSBAR, - " Your computer will reboot in %li second(s)... "}, + " Votre ordinateur va red�marrer dans %li seconde(s)... "}, {STRING_CONSOLEFAIL1, "Impossible d'ouvrir la console\r\n\r\n"}, {STRING_CONSOLEFAIL2,
6 years, 3 months
1
0
0
0
01/01: [USETUP] Implement the shutdown timeout progress bar. (#833)
by Bișoc George
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e5c0bfacf1374abf34abb…
commit e5c0bfacf1374abf34abbaf75047149a6252ca5e Author: Bișoc George <fraizeraust99(a)gmail.com> AuthorDate: Wed Aug 22 11:10:18 2018 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Sep 9 17:17:16 2018 +0200 [USETUP] Implement the shutdown timeout progress bar. (#833) - Add the MUI ID resource. - Implement the shutdown timeout progress bar function and the TimeOut string handler. - Add the resource string to other resource languages. --- base/setup/usetup/lang/bg-BG.h | 2 + base/setup/usetup/lang/bn-BD.h | 2 + base/setup/usetup/lang/cs-CZ.h | 2 + base/setup/usetup/lang/da-DK.h | 2 + base/setup/usetup/lang/de-DE.h | 2 + base/setup/usetup/lang/el-GR.h | 2 + base/setup/usetup/lang/en-US.h | 2 + base/setup/usetup/lang/es-ES.h | 2 + base/setup/usetup/lang/et-EE.h | 2 + base/setup/usetup/lang/fr-FR.h | 2 + base/setup/usetup/lang/he-IL.h | 2 + base/setup/usetup/lang/it-IT.h | 2 + base/setup/usetup/lang/ja-JP.h | 2 + base/setup/usetup/lang/lt-LT.h | 2 + base/setup/usetup/lang/ms-MY.h | 2 + base/setup/usetup/lang/nl-NL.h | 2 + base/setup/usetup/lang/pl-PL.h | 2 + base/setup/usetup/lang/pt-BR.h | 2 + base/setup/usetup/lang/ro-RO.h | 2 + base/setup/usetup/lang/ru-RU.h | 2 + base/setup/usetup/lang/sk-SK.h | 2 + base/setup/usetup/lang/sq-AL.h | 2 + base/setup/usetup/lang/sv-SE.h | 2 + base/setup/usetup/lang/tr-TR.h | 2 + base/setup/usetup/lang/uk-UA.h | 2 + base/setup/usetup/mui.h | 1 + base/setup/usetup/usetup.c | 215 +++++++++++++++++++++++++++++++++++++---- 27 files changed, 246 insertions(+), 20 deletions(-) diff --git a/base/setup/usetup/lang/bg-BG.h b/base/setup/usetup/lang/bg-BG.h index c85d48cc86..b6366eac4e 100644 --- a/base/setup/usetup/lang/bg-BG.h +++ b/base/setup/usetup/lang/bg-BG.h @@ -1792,6 +1792,8 @@ MUI_STRING bgBGStrings[] = " ��⮢�..."}, {STRING_REBOOTCOMPUTER2, " ENTER = �१���᪠�� �� ��������"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "�⢠�ﭥ� �� �������� � ���ꧬ����\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/bn-BD.h b/base/setup/usetup/lang/bn-BD.h index fcc483b7d3..5a4d7786e1 100644 --- a/base/setup/usetup/lang/bn-BD.h +++ b/base/setup/usetup/lang/bn-BD.h @@ -1777,6 +1777,8 @@ MUI_STRING bnBDStrings[] = " Done..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Reboot computer"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Unable to open the console\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/cs-CZ.h b/base/setup/usetup/lang/cs-CZ.h index 790fbfc6e6..4359652d37 100644 --- a/base/setup/usetup/lang/cs-CZ.h +++ b/base/setup/usetup/lang/cs-CZ.h @@ -1785,6 +1785,8 @@ MUI_STRING csCZStrings[] = " Hotovo..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Restartovat po��ta�"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Nelze otev��t konzoli\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/da-DK.h b/base/setup/usetup/lang/da-DK.h index f6029f6613..febfb2b68d 100644 --- a/base/setup/usetup/lang/da-DK.h +++ b/base/setup/usetup/lang/da-DK.h @@ -1791,6 +1791,8 @@ MUI_STRING daDKStrings[] = " Udf�rt..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Genstart"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Kunne ikke �bne konsollen\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/de-DE.h b/base/setup/usetup/lang/de-DE.h index 9ddac46c7f..fda98fbce0 100644 --- a/base/setup/usetup/lang/de-DE.h +++ b/base/setup/usetup/lang/de-DE.h @@ -1781,6 +1781,8 @@ MUI_STRING deDEStrings[] = " Fertig..."}, {STRING_REBOOTCOMPUTER2, " EINGABETASTE = Computer neu starten"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Konsole konnte nicht ge�ffnet werden\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/el-GR.h b/base/setup/usetup/lang/el-GR.h index 034b895f90..58e624f0c3 100644 --- a/base/setup/usetup/lang/el-GR.h +++ b/base/setup/usetup/lang/el-GR.h @@ -1796,6 +1796,8 @@ MUI_STRING elGRStrings[] = " �������韞��..."}, {STRING_REBOOTCOMPUTER2, " ENTER = �������夞�� ����������"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "��礘�� �� �������� � ����梘\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/en-US.h b/base/setup/usetup/lang/en-US.h index 216df8fc3b..9f3a6334e5 100644 --- a/base/setup/usetup/lang/en-US.h +++ b/base/setup/usetup/lang/en-US.h @@ -1777,6 +1777,8 @@ MUI_STRING enUSStrings[] = " Done..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Reboot computer"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Unable to open the console\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/es-ES.h b/base/setup/usetup/lang/es-ES.h index 2bf3418b58..e52c7a56ad 100644 --- a/base/setup/usetup/lang/es-ES.h +++ b/base/setup/usetup/lang/es-ES.h @@ -1781,6 +1781,8 @@ MUI_STRING esESStrings[] = " Terminado..."}, {STRING_REBOOTCOMPUTER2, " INTRO = Reiniciar el equipo"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "No se pudo abrir la consola\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/et-EE.h b/base/setup/usetup/lang/et-EE.h index b21105d6c2..ee47d0ec84 100644 --- a/base/setup/usetup/lang/et-EE.h +++ b/base/setup/usetup/lang/et-EE.h @@ -1777,6 +1777,8 @@ MUI_STRING etEEStrings[] = " Valmis..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Taask�ivita arvuti"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Konsooli ei �nnestunud avada\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/fr-FR.h b/base/setup/usetup/lang/fr-FR.h index 7f11d9ba68..fc2780e433 100644 --- a/base/setup/usetup/lang/fr-FR.h +++ b/base/setup/usetup/lang/fr-FR.h @@ -1796,6 +1796,8 @@ MUI_STRING frFRStrings[] = " Termin�..."}, {STRING_REBOOTCOMPUTER2, " ENTR�E = Red�marrer l'ordinateur"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Impossible d'ouvrir la console\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/he-IL.h b/base/setup/usetup/lang/he-IL.h index e48da925d2..686ed20ed8 100644 --- a/base/setup/usetup/lang/he-IL.h +++ b/base/setup/usetup/lang/he-IL.h @@ -1779,6 +1779,8 @@ MUI_STRING heILStrings[] = " ����..."}, {STRING_REBOOTCOMPUTER2, " ENTER = ���� ���� �� ����"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Unable to open the console\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/it-IT.h b/base/setup/usetup/lang/it-IT.h index ad3c98b991..9fcaf4c6af 100644 --- a/base/setup/usetup/lang/it-IT.h +++ b/base/setup/usetup/lang/it-IT.h @@ -1784,6 +1784,8 @@ MUI_STRING itITStrings[] = " Fatto..."}, {STRING_REBOOTCOMPUTER2, " INVIO = Riavvia il computer"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Impossibile aprire la console\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/ja-JP.h b/base/setup/usetup/lang/ja-JP.h index 1000261c0d..d30be1487d 100644 --- a/base/setup/usetup/lang/ja-JP.h +++ b/base/setup/usetup/lang/ja-JP.h @@ -1781,6 +1781,8 @@ MUI_STRING jaJPStrings[] = " ��خ�..."}, {STRING_REBOOTCOMPUTER2, " ENTER = ���߭��� ����"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "�ݿ�٦ ����� �Ͼ�\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/lt-LT.h b/base/setup/usetup/lang/lt-LT.h index 9a90a8dbab..697b19ff67 100644 --- a/base/setup/usetup/lang/lt-LT.h +++ b/base/setup/usetup/lang/lt-LT.h @@ -1787,6 +1787,8 @@ MUI_STRING ltLTStrings[] = " Done..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Reboot computer"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Unable to open the console\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/ms-MY.h b/base/setup/usetup/lang/ms-MY.h index b4eceeb2f2..2da4e91f0f 100644 --- a/base/setup/usetup/lang/ms-MY.h +++ b/base/setup/usetup/lang/ms-MY.h @@ -1666,6 +1666,8 @@ MUI_STRING msMYStrings[] = " Siap..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Memulakan semuala komputer"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Tidak dapat membuka konsol\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/nl-NL.h b/base/setup/usetup/lang/nl-NL.h index c25d939dad..9f080ce4c2 100644 --- a/base/setup/usetup/lang/nl-NL.h +++ b/base/setup/usetup/lang/nl-NL.h @@ -1807,6 +1807,8 @@ MUI_STRING nlNLStrings[] = " Voltooid..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Computer opnieuw opstarten"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Kan console niet openen.\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/pl-PL.h b/base/setup/usetup/lang/pl-PL.h index 384da7a97a..b1381bcac1 100644 --- a/base/setup/usetup/lang/pl-PL.h +++ b/base/setup/usetup/lang/pl-PL.h @@ -1788,6 +1788,8 @@ MUI_STRING plPLStrings[] = " Uko�czone..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Restart komputera"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Otwarcie konsoli nieudane\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/pt-BR.h b/base/setup/usetup/lang/pt-BR.h index e1cd55e159..4372dc3761 100644 --- a/base/setup/usetup/lang/pt-BR.h +++ b/base/setup/usetup/lang/pt-BR.h @@ -1811,6 +1811,8 @@ MUI_STRING ptBRStrings[] = " Pronto..."}, {STRING_REBOOTCOMPUTER2, " ENTER=Reiniciar"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "N�o foi poss�vel abrir o console\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/ro-RO.h b/base/setup/usetup/lang/ro-RO.h index 67a8b312b7..ea86f5a9cd 100644 --- a/base/setup/usetup/lang/ro-RO.h +++ b/base/setup/usetup/lang/ro-RO.h @@ -1831,6 +1831,8 @@ MUI_STRING roROStrings[] = " Terminat!"}, {STRING_REBOOTCOMPUTER2, " ENTER = Repornire calculator"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "E�ec la deschiderea consolei\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/ru-RU.h b/base/setup/usetup/lang/ru-RU.h index 6d087dfafd..32b7821193 100644 --- a/base/setup/usetup/lang/ru-RU.h +++ b/base/setup/usetup/lang/ru-RU.h @@ -1778,6 +1778,8 @@ MUI_STRING ruRUStrings[] = " �����襭�..."}, {STRING_REBOOTCOMPUTER2, " ENTER = ��१���㧪�"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "�� 㤠���� ������ ���᮫�\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/sk-SK.h b/base/setup/usetup/lang/sk-SK.h index 35682911ce..be99ea5586 100644 --- a/base/setup/usetup/lang/sk-SK.h +++ b/base/setup/usetup/lang/sk-SK.h @@ -1791,6 +1791,8 @@ MUI_STRING skSKStrings[] = " Hotovo..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Re�tart po��ta�a"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Nemo�no otvori� konzolu\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/sq-AL.h b/base/setup/usetup/lang/sq-AL.h index 021f11ad8c..bf157a9bda 100644 --- a/base/setup/usetup/lang/sq-AL.h +++ b/base/setup/usetup/lang/sq-AL.h @@ -1784,6 +1784,8 @@ MUI_STRING sqALStrings[] = " Mbaruam..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Ristarto kompjuterin"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "N� pamundesi p�r t� hapur konsollin\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/sv-SE.h b/base/setup/usetup/lang/sv-SE.h index 2dafaf3602..38e766f447 100644 --- a/base/setup/usetup/lang/sv-SE.h +++ b/base/setup/usetup/lang/sv-SE.h @@ -1787,6 +1787,8 @@ MUI_STRING svSEStrings[] = " F�rdigt..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Starta om datorn"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Det g�r inte �ppna Konsollen\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/tr-TR.h b/base/setup/usetup/lang/tr-TR.h index 59b9d13b2f..be2ce60cf5 100644 --- a/base/setup/usetup/lang/tr-TR.h +++ b/base/setup/usetup/lang/tr-TR.h @@ -1758,6 +1758,8 @@ MUI_STRING trTRStrings[] = " Bitti..."}, {STRING_REBOOTCOMPUTER2, " Giri� = Bilgisayar� Yeniden Ba�lat"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "Konsol a��lam�yor.\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/lang/uk-UA.h b/base/setup/usetup/lang/uk-UA.h index b0b6d53e97..7f693079b8 100644 --- a/base/setup/usetup/lang/uk-UA.h +++ b/base/setup/usetup/lang/uk-UA.h @@ -1787,6 +1787,8 @@ MUI_STRING ukUAStrings[] = " ��⮢�..."}, {STRING_REBOOTCOMPUTER2, " ENTER = ��१����⠦�� ����'���"}, + {STRING_REBOOTPROGRESSBAR, + " Your computer will reboot in %li second(s)... "}, {STRING_CONSOLEFAIL1, "�� ������� �i���� ���᮫�\r\n\r\n"}, {STRING_CONSOLEFAIL2, diff --git a/base/setup/usetup/mui.h b/base/setup/usetup/mui.h index 0219cde43a..707bb80076 100644 --- a/base/setup/usetup/mui.h +++ b/base/setup/usetup/mui.h @@ -159,3 +159,4 @@ MUIGetString( #define STRING_MB 54 #define STRING_GB 55 #define STRING_ADDKBLAYOUTS 56 +#define STRING_REBOOTPROGRESSBAR 64 diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c index 1a7940c6e3..102db35f6d 100644 --- a/base/setup/usetup/usetup.c +++ b/base/setup/usetup/usetup.c @@ -4502,6 +4502,195 @@ BootLoaderHarddiskMbrPage(PINPUT_RECORD Ir) } +/** + * @name ProgressTimeOutStringHandler + * + * Handles the generation (displaying) of the timeout + * countdown to the screen dynamically. + * + * @param Bar + * A pointer to a progress bar. + * + * @param AlwaysUpdate + * Constantly update the progress bar (boolean type). + * + * @param Buffer + * A pointer to a string buffer. + * + * @param cchBufferSize + * The buffer's size in number of characters. + * + * @return + * TRUE or FALSE on function termination. + * + */ +static +BOOLEAN NTAPI +ProgressTimeOutStringHandler( + IN PPROGRESSBAR Bar, + IN BOOLEAN AlwaysUpdate, + OUT PSTR Buffer, + IN SIZE_T cchBufferSize) +{ + ULONG OldProgress = Bar->Progress; + + if (Bar->StepCount == 0) + { + Bar->Progress = 0; + } + else + { + Bar->Progress = Bar->StepCount - Bar->CurrentStep; + } + + /* Build the progress string if it has changed */ + if (Bar->ProgressFormatText && + (AlwaysUpdate || (Bar->Progress != OldProgress))) + { + RtlStringCchPrintfA(Buffer, cchBufferSize, + Bar->ProgressFormatText, Bar->Progress); + + return TRUE; + } + + return FALSE; +} + +/** + * @name ProgressCountdown + * + * Displays and draws a red-coloured progress bar with a countdown. + * When the timeout is reached, the flush page is displayed for reboot. + * + * @param Ir + * A pointer to an input keyboard record. + * + * @param TimeOut + * Initial countdown value in seconds. + * + * @return + * Nothing. + * + */ +static VOID +ProgressCountdown( + IN PINPUT_RECORD Ir, + IN LONG TimeOut) +{ + NTSTATUS Status; + ULONG StartTime; + LONG TimeElapsed; + LONG TimerValue = TimeOut, OldTimerValue; + LARGE_INTEGER Timeout; + PPROGRESSBAR ProgressBar; + BOOLEAN RefreshProgress = TRUE; + + /* Bail out if the timeout is already zero */ + if (TimeOut <= 0) + return; + + /* Create the timeout progress bar and set it up */ + ProgressBar = CreateProgressBarEx(13, + 26, + xScreen - 13, + yScreen - 20, + 10, + 24, + TRUE, + FOREGROUND_RED | BACKGROUND_BLUE, + TimerValue, + NULL, + MUIGetString(STRING_REBOOTPROGRESSBAR), + ProgressTimeOutStringHandler); + + StartTime = NtGetTickCount(); + CONSOLE_Flush(); + + OldTimerValue = TimerValue; + while (TRUE) + { + /* Decrease the timer */ + + /* + * Compute how much time the previous operations took. + * This allows us in particular to take account for any time + * elapsed if something slowed down. + */ + TimeElapsed = NtGetTickCount() - StartTime; + if (TimeElapsed >= 1000) + { + /* Increase StartTime by steps of 1 second */ + TimeElapsed /= 1000; + StartTime += (1000 * TimeElapsed); + + if (TimeElapsed <= TimerValue) + TimerValue -= TimeElapsed; + else + TimerValue = 0; + + RefreshProgress = TRUE; + } + + if (RefreshProgress) + { + ProgressSetStep(ProgressBar, OldTimerValue - TimerValue); + RefreshProgress = FALSE; + } + + /* Stop when the timer reaches zero */ + if (TimerValue <= 0) + break; + + /* Check for user key presses */ + + /* + * If the timer is used, use a passive wait of maximum 1 second + * while monitoring for incoming console input events, so that + * we are still able to display the timing count. + */ + + /* Wait a maximum of 1 second for input events */ + TimeElapsed = NtGetTickCount() - StartTime; + if (TimeElapsed < 1000) + { + /* Convert the time to NT Format */ + Timeout.QuadPart = (1000 - TimeElapsed) * -10000LL; + Status = NtWaitForSingleObject(StdInput, FALSE, &Timeout); + } + else + { + Status = STATUS_TIMEOUT; + } + + /* Check whether the input event has been signaled, or a timeout happened */ + if (Status == STATUS_TIMEOUT) + { + continue; + } + if (Status != STATUS_WAIT_0) + { + /* An error happened, bail out */ + DPRINT1("NtWaitForSingleObject() failed, Status 0x%08lx\n", Status); + break; + } + + /* Check for an ENTER key press */ + while (CONSOLE_ConInKeyPeek(Ir)) + { + if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */ + { + /* Found it, stop waiting */ + goto Exit; + } + } + } + +Exit: + /* Destroy the progress bar and quit */ + DestroyProgressBar(ProgressBar); +} + + /* * Displays the QuitPage. * @@ -4572,15 +4761,9 @@ QuitPage(PINPUT_RECORD Ir) CONSOLE_SetStatusText(MUIGetString(STRING_REBOOTCOMPUTER2)); - while (TRUE) - { - CONSOLE_ConInKey(Ir); - - if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */ - { - return FLUSH_PAGE; - } - } + /* Wait for maximum 15 seconds or an ENTER key before quitting */ + ProgressCountdown(Ir, 15); + return FLUSH_PAGE; } @@ -4602,19 +4785,11 @@ SuccessPage(PINPUT_RECORD Ir) MUIDisplayPage(SUCCESS_PAGE); if (IsUnattendedSetup) - { return FLUSH_PAGE; - } - while (TRUE) - { - CONSOLE_ConInKey(Ir); - - if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */ - { - return FLUSH_PAGE; - } - } + /* Wait for maximum 15 seconds or an ENTER key before quitting */ + ProgressCountdown(Ir, 15); + return FLUSH_PAGE; }
6 years, 3 months
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
23
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Results per page:
10
25
50
100
200