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 2019
----- 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
36 participants
217 discussions
Start a n
N
ew thread
[reactos] 01/01: [OSK] Restore the previous window coordination
by Bișoc George
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=65239bcf4b26d2392c831…
commit 65239bcf4b26d2392c831ac3d31235806aadacfb Author: Bișoc George <fraizeraust99(a)gmail.com> AuthorDate: Sat Mar 2 18:10:26 2019 +0100 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Mar 23 16:34:48 2019 +0100 [OSK] Restore the previous window coordination Implement the coordination dialog data saver. This allows OSK to launch using the previous placement values. Such behaviour can be seen with the XP's part of On-Screen Keyboard. --- base/applications/osk/main.c | 53 +++++++++++++++------ base/applications/osk/main.h | 6 ++- base/applications/osk/settings.c | 99 ++++++++++++++++++++++++++++++++++++---- 3 files changed, 134 insertions(+), 24 deletions(-) diff --git a/base/applications/osk/main.c b/base/applications/osk/main.c index 972f8c8e9b..92e1a05b5b 100644 --- a/base/applications/osk/main.c +++ b/base/applications/osk/main.c @@ -1,9 +1,9 @@ /* * PROJECT: ReactOS On-Screen Keyboard * LICENSE: GPL - See COPYING in the top level directory - * FILE: base/applications/osk/main.c * PURPOSE: On-screen keyboard. - * PROGRAMMERS: Denis ROBERT + * COPYRIGHT: Denis ROBERT + * Copyright 2019 Bișoc George (fraizeraust99 at gmail dot com) */ /* INCLUDES *******************************************************************/ @@ -138,7 +138,7 @@ int OSK_DlgInitDialog(HWND hDlg) HMONITOR monitor; MONITORINFO info; POINT Pt; - RECT rcWindow; + RECT rcWindow, rcDlgIntersect; /* Save handle */ Globals.hMainWnd = hDlg; @@ -178,17 +178,42 @@ int OSK_DlgInitDialog(HWND hDlg) monitor = MonitorFromPoint(Pt, MONITOR_DEFAULTTOPRIMARY); info.cbSize = sizeof(info); GetMonitorInfoW(monitor, &info); - - /* Move the dialog on the bottom of main screen */ GetWindowRect(hDlg, &rcWindow); - MoveWindow(hDlg, - (info.rcMonitor.left + info.rcMonitor.right) / 2 - // Center of screen - (rcWindow.right - rcWindow.left) / 2, // - half size of dialog - info.rcMonitor.bottom - // Bottom of screen - (rcWindow.bottom - rcWindow.top), // - size of window - rcWindow.right - rcWindow.left, // Width - rcWindow.bottom - rcWindow.top, // Height - TRUE); + + /* + If the coordination values are default then re-initialize using the specific formulas + to move the dialog at the bottom of the screen. + */ + if (Globals.PosX == CW_USEDEFAULT && Globals.PosY == CW_USEDEFAULT) + { + Globals.PosX = (info.rcMonitor.left + info.rcMonitor.right - (rcWindow.right - rcWindow.left)) / 2; + Globals.PosY = info.rcMonitor.bottom - (rcWindow.bottom - rcWindow.top); + } + + /* + Calculate the intersection of two rectangle sources (dialog and work desktop area). + If such sources do not intersect, then the dialog is deemed as "off screen". + */ + if (IntersectRect(&rcDlgIntersect, &rcWindow, &info.rcWork) == 0) + { + Globals.PosX = (info.rcMonitor.left + info.rcMonitor.right - (rcWindow.right - rcWindow.left)) / 2; + Globals.PosY = info.rcMonitor.bottom - (rcWindow.bottom - rcWindow.top); + } + else + { + /* + There's still some intersection but we're not for sure if it is sufficient (the dialog could also be partially hidden). + Therefore, check the remaining intersection if it's enough. + */ + if (rcWindow.top < info.rcWork.top || rcWindow.left < info.rcWork.left || rcWindow.right > info.rcWork.right || rcWindow.bottom > info.rcWork.bottom) + { + Globals.PosX = (info.rcMonitor.left + info.rcMonitor.right - (rcWindow.right - rcWindow.left)) / 2; + Globals.PosY = info.rcMonitor.bottom - (rcWindow.bottom - rcWindow.top); + } + } + + /* Move the dialog according to the placement coordination */ + SetWindowPos(hDlg, HWND_TOP, Globals.PosX, Globals.PosY, 0, 0, SWP_NOSIZE); /* Set icon on visual buttons */ OSK_SetImage(SCAN_CODE_15, IDI_BACK); @@ -593,7 +618,7 @@ int WINAPI wWinMain(HINSTANCE hInstance, if (!hMutex) { - /* Mutex doesn�t exist. This is the first instance so create the mutex. */ + /* Mutex doesn't exist. This is the first instance so create the mutex. */ hMutex = CreateMutexW(NULL, FALSE, L"osk"); /* Create the modal box based on the configuration registry */ diff --git a/base/applications/osk/main.h b/base/applications/osk/main.h index 137cf5b2ca..da4cf2a7ba 100644 --- a/base/applications/osk/main.h +++ b/base/applications/osk/main.h @@ -1,9 +1,9 @@ /* * PROJECT: ReactOS On-Screen Keyboard * LICENSE: GPL - See COPYING in the top level directory - * FILE: base/applications/osk/main.h * PURPOSE: On screen keyboard. - * PROGRAMMERS: Denis ROBERT + * COPYRIGHT: Denis ROBERT + * Copyright 2019 Bișoc George (fraizeraust99 at gmail dot com) */ #ifndef _OSKMAIN_H @@ -26,6 +26,8 @@ typedef struct BOOL bShowWarning; BOOL bIsEnhancedKeyboard; BOOL bSoundClick; + INT PosX; + INT PosY; } OSK_GLOBALS; /* DEFINES ********************************************************************/ diff --git a/base/applications/osk/settings.c b/base/applications/osk/settings.c index 03eb18f62e..d7dab32eaf 100644 --- a/base/applications/osk/settings.c +++ b/base/applications/osk/settings.c @@ -1,8 +1,8 @@ /* * PROJECT: ReactOS On-Screen Keyboard * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) - * PURPOSE: Settings file for warning dialog on startup - * COPYRIGHT: Copyright 2018 Bișoc George (fraizeraust99 at gmail dot com) + * PURPOSE: Configuration settings of the application + * COPYRIGHT: Copyright 2018-2019 Bișoc George (fraizeraust99 at gmail dot com) */ /* INCLUDES *******************************************************************/ @@ -16,7 +16,7 @@ BOOL LoadDataFromRegistry() { HKEY hKey; LONG lResult; - DWORD dwShowWarningData, dwLayout, dwSoundOnClick; + DWORD dwShowWarningData, dwLayout, dwSoundOnClick, dwPositionLeft, dwPositionTop; DWORD cbData = sizeof(DWORD); /* Set the structure members to TRUE (and the bSoundClick member to FALSE) */ @@ -24,9 +24,13 @@ BOOL LoadDataFromRegistry() Globals.bIsEnhancedKeyboard = TRUE; Globals.bSoundClick = FALSE; + /* Set the coordinate values to default */ + Globals.PosX = CW_USEDEFAULT; + Globals.PosY = CW_USEDEFAULT; + /* Open the key, so that we can query it */ lResult = RegOpenKeyExW(HKEY_CURRENT_USER, - L"Software\\Microsoft\\osk", + L"Software\\Microsoft\\Osk", 0, KEY_READ, &hKey); @@ -75,7 +79,7 @@ BOOL LoadDataFromRegistry() /* Query the key */ lResult = RegQueryValueExW(hKey, - L"OnSoundClick", + L"ClickSound", 0, 0, (BYTE *)&dwSoundOnClick, @@ -90,6 +94,41 @@ BOOL LoadDataFromRegistry() /* Load the sound on click value event */ Globals.bSoundClick = (dwSoundOnClick != 0); + + /* Query the key */ + lResult = RegQueryValueExW(hKey, + L"WindowLeft", + 0, + 0, + (BYTE *)&dwPositionLeft, + &cbData); + + if (lResult != ERROR_SUCCESS) + { + /* Bail out and return FALSE if we fail */ + RegCloseKey(hKey); + return FALSE; + } + + /* Load the X value data of the dialog's coordinate */ + Globals.PosX = dwPositionLeft; + + lResult = RegQueryValueExW(hKey, + L"WindowTop", + 0, + 0, + (BYTE *)&dwPositionTop, + &cbData); + + if (lResult != ERROR_SUCCESS) + { + /* Bail out and return FALSE if we fail */ + RegCloseKey(hKey); + return FALSE; + } + + /* Load the Y value data of the dialog's coordinate */ + Globals.PosY = dwPositionTop; /* If we're here then we succeed, close the key and return TRUE */ RegCloseKey(hKey); @@ -100,11 +139,16 @@ BOOL SaveDataToRegistry() { HKEY hKey; LONG lResult; - DWORD dwShowWarningData, dwLayout, dwSoundOnClick; + DWORD dwShowWarningData, dwLayout, dwSoundOnClick, dwPositionLeft, dwPositionTop; + WINDOWPLACEMENT wp; + + /* Set the structure length and retrieve the dialog's placement */ + wp.length = sizeof(WINDOWPLACEMENT); + GetWindowPlacement(Globals.hMainWnd, &wp); /* If no key has been made, create one */ lResult = RegCreateKeyExW(HKEY_CURRENT_USER, - L"Software\\Microsoft\\osk", + L"Software\\Microsoft\\Osk", 0, NULL, 0, @@ -122,6 +166,7 @@ BOOL SaveDataToRegistry() /* The data value of the subkey will be appended to the warning dialog switch */ dwShowWarningData = Globals.bShowWarning; + /* Welcome warning box value key */ lResult = RegSetValueExW(hKey, L"ShowWarning", 0, @@ -139,6 +184,7 @@ BOOL SaveDataToRegistry() /* The value will be appended to the layout dialog */ dwLayout = Globals.bIsEnhancedKeyboard; + /* Keyboard dialog switcher */ lResult = RegSetValueExW(hKey, L"IsEnhancedKeyboard", 0, @@ -156,8 +202,9 @@ BOOL SaveDataToRegistry() /* The value will be appended to the sound on click event */ dwSoundOnClick = Globals.bSoundClick; + /* "Sound on Click" switcher value key */ lResult = RegSetValueExW(hKey, - L"OnSoundClick", + L"ClickSound", 0, REG_DWORD, (BYTE *)&dwSoundOnClick, @@ -170,6 +217,42 @@ BOOL SaveDataToRegistry() return FALSE; } + /* The value will be appended to the X coordination dialog's placement */ + dwPositionLeft = wp.rcNormalPosition.left; + + /* Position X coordination of dialog's placement value key */ + lResult = RegSetValueExW(hKey, + L"WindowLeft", + 0, + REG_DWORD, + (BYTE *)&dwPositionLeft, + sizeof(dwPositionLeft)); + + if (lResult != ERROR_SUCCESS) + { + /* Bail out and return FALSE if we fail */ + RegCloseKey(hKey); + return FALSE; + } + + /* The value will be appended to the Y coordination dialog's placement */ + dwPositionTop = wp.rcNormalPosition.top; + + /* Position Y coordination of dialog's placement value key */ + lResult = RegSetValueExW(hKey, + L"WindowTop", + 0, + REG_DWORD, + (BYTE *)&dwPositionTop, + sizeof(dwPositionTop)); + + if (lResult != ERROR_SUCCESS) + { + /* Bail out and return FALSE if we fail */ + RegCloseKey(hKey); + return FALSE; + } + /* If we're here then we succeed, close the key and return TRUE */ RegCloseKey(hKey); return TRUE;
5 years, 9 months
1
0
0
0
[reactos] 01/01: [WTSAPI32][PSDK] Addendum to 27ed609a: Some of the WTS_INFO_CLASS values are NT6-SP1+
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b9148b8c62170b82ecc72…
commit b9148b8c62170b82ecc7203f2e358ee2f6c190d1 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sat Mar 23 16:31:15 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Mar 23 16:31:15 2019 +0100 [WTSAPI32][PSDK] Addendum to 27ed609a: Some of the WTS_INFO_CLASS values are NT6-SP1+ --- dll/win32/wtsapi32/wtsapi32.c | 6 ++++++ sdk/include/psdk/wtsapi32.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/dll/win32/wtsapi32/wtsapi32.c b/dll/win32/wtsapi32/wtsapi32.c index 5838f1ac09..60658fd29c 100644 --- a/dll/win32/wtsapi32/wtsapi32.c +++ b/dll/win32/wtsapi32/wtsapi32.c @@ -372,7 +372,11 @@ BOOL WINAPI WTSQuerySessionInformationW( return FALSE; } +#if (NTDDI_VERSION >= NTDDI_WS08) if (WTSInfoClass > WTSIsRemoteSession) +#else + if (WTSInfoClass > WTSClientProtocolType) +#endif { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; @@ -447,6 +451,7 @@ BOOL WINAPI WTSQuerySessionInformationW( return TRUE; } +#if (NTDDI_VERSION >= NTDDI_WS08) case WTSIdleTime: case WTSLogonTime: case WTSIncomingBytes: @@ -457,6 +462,7 @@ BOOL WINAPI WTSQuerySessionInformationW( SetLastError(ERROR_NOT_SUPPORTED); return FALSE; } +#endif /* (NTDDI_VERSION >= NTDDI_WS08) */ default: { diff --git a/sdk/include/psdk/wtsapi32.h b/sdk/include/psdk/wtsapi32.h index b9dbb18154..5fc98e5fb6 100644 --- a/sdk/include/psdk/wtsapi32.h +++ b/sdk/include/psdk/wtsapi32.h @@ -59,6 +59,7 @@ typedef enum tagWTS_INFO_CLASS WTSClientAddress, WTSClientDisplay, WTSClientProtocolType, +#if (NTDDI_VERSION >= NTDDI_WS08) WTSIdleTime, WTSLogonTime, WTSIncomingBytes, @@ -72,6 +73,7 @@ typedef enum tagWTS_INFO_CLASS WTSValidationInfo, WTSSessionAddressV4, WTSIsRemoteSession +#endif /* (NTDDI_VERSION >= NTDDI_WS08) */ } WTS_INFO_CLASS; typedef enum _WTS_CONNECTSTATE_CLASS
5 years, 9 months
1
0
0
0
[reactos] 01/01: [WTSAPI32] Implement WTSConnectState and WTSClientProtocolType in WTSQuerySessionInformation
by Andrew Boyarshin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=27ed609acd0776a64d0ef…
commit 27ed609acd0776a64d0ef52c432189ec9569ae5f Author: Andrew Boyarshin <andrew.boyarshin(a)gmail.com> AuthorDate: Wed Nov 28 21:17:34 2018 +0700 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Mar 23 16:06:10 2019 +0100 [WTSAPI32] Implement WTSConnectState and WTSClientProtocolType in WTSQuerySessionInformation Since ReactOS doesn't actually support non-local WinSTA/WTS capabilities, this seems to be a good way to reduce spam in the log while providing correct behaviour. Also call Unicode version from ANSI one to reduce code duplication. --- dll/win32/wtsapi32/wtsapi32.c | 172 ++++++++++++++++++++++++++++++++++++++++++ sdk/include/psdk/wtsapi32.h | 13 ++++ 2 files changed, 185 insertions(+) diff --git a/dll/win32/wtsapi32/wtsapi32.c b/dll/win32/wtsapi32/wtsapi32.c index f684dd9058..5838f1ac09 100644 --- a/dll/win32/wtsapi32/wtsapi32.c +++ b/dll/win32/wtsapi32/wtsapi32.c @@ -285,11 +285,74 @@ BOOL WINAPI WTSQuerySessionInformationA( LPSTR* Buffer, DWORD* BytesReturned) { +#ifdef __REACTOS__ + const size_t wcsErrorCode = -1; + LPWSTR buffer = NULL; + LPSTR ansiBuffer = NULL; + DWORD bytesReturned = 0; + BOOL result = FALSE; + size_t len; + + if (!BytesReturned || !Buffer) + { + SetLastError(ERROR_INVALID_USER_BUFFER); + return FALSE; + } + + if (!WTSQuerySessionInformationW(hServer, SessionId, WTSInfoClass, &buffer, &bytesReturned)) + { + ansiBuffer = (LPSTR)buffer; + *Buffer = ansiBuffer; + *BytesReturned = bytesReturned; + return FALSE; + } + + switch (WTSInfoClass) + { + case WTSInitialProgram: + case WTSApplicationName: + case WTSWorkingDirectory: + case WTSOEMId: + case WTSUserName: + case WTSWinStationName: + case WTSDomainName: + case WTSClientName: + case WTSClientDirectory: + { + len = wcstombs(NULL, buffer, 0); + if (len != wcsErrorCode) + { + len++; + ansiBuffer = heap_alloc_zero(len); + if (ansiBuffer && (wcstombs(ansiBuffer, buffer, len) != wcsErrorCode)) + { + result = TRUE; + bytesReturned = len; + } + } + WTSFreeMemory(buffer); + break; + } + + default: + { + result = TRUE; + ansiBuffer = (LPSTR)buffer; + break; + } + } + + *Buffer = ansiBuffer; + *BytesReturned = bytesReturned; + + return result; +#else /* FIXME: Forward request to winsta.dll::WinStationQueryInformationA */ FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass, Buffer, BytesReturned); return FALSE; +#endif } /************************************************************ @@ -302,6 +365,114 @@ BOOL WINAPI WTSQuerySessionInformationW( LPWSTR* Buffer, DWORD* BytesReturned) { +#ifdef __REACTOS__ + if (!BytesReturned || !Buffer) + { + SetLastError(ERROR_INVALID_USER_BUFFER); + return FALSE; + } + + if (WTSInfoClass > WTSIsRemoteSession) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + switch (WTSInfoClass) + { + case WTSSessionId: + { + const DWORD size = sizeof(ULONG); + ULONG* output = heap_alloc_zero(size); + if (!output) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + *output = NtCurrentTeb()->Peb->SessionId; + *Buffer = (LPWSTR)output; + *BytesReturned = size; + return TRUE; + } + + case WTSUserName: + { + WCHAR* username; + DWORD count = 0; + + GetUserNameW(NULL, &count); + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + return FALSE; + username = heap_alloc(count * sizeof(WCHAR)); + if (!username) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + GetUserNameW(username, &count); + *Buffer = username; + *BytesReturned = count * sizeof(WCHAR); + return TRUE; + } + + case WTSConnectState: + { + const DWORD size = sizeof(DWORD); + WCHAR* output = heap_alloc_zero(size); + if (!output) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + *Buffer = output; + *BytesReturned = size; + return TRUE; + } + + case WTSClientProtocolType: + { + const DWORD size = sizeof(WORD); + WCHAR* output = heap_alloc_zero(size); + if (!output) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + *Buffer = output; + *BytesReturned = size; + return TRUE; + } + + case WTSIdleTime: + case WTSLogonTime: + case WTSIncomingBytes: + case WTSOutgoingBytes: + case WTSIncomingFrames: + case WTSOutgoingFrames: + { + SetLastError(ERROR_NOT_SUPPORTED); + return FALSE; + } + + default: + { + if (BytesReturned) + *BytesReturned = 0; + + break; + } + } + + /* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */ + FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass, + Buffer, BytesReturned); + + return FALSE; +#else /* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */ FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass, Buffer, BytesReturned); @@ -320,6 +491,7 @@ BOOL WINAPI WTSQuerySessionInformationW( return TRUE; } return FALSE; +#endif } /************************************************************ diff --git a/sdk/include/psdk/wtsapi32.h b/sdk/include/psdk/wtsapi32.h index d24bff9cfc..b9dbb18154 100644 --- a/sdk/include/psdk/wtsapi32.h +++ b/sdk/include/psdk/wtsapi32.h @@ -59,6 +59,19 @@ typedef enum tagWTS_INFO_CLASS WTSClientAddress, WTSClientDisplay, WTSClientProtocolType, + WTSIdleTime, + WTSLogonTime, + WTSIncomingBytes, + WTSOutgoingBytes, + WTSIncomingFrames, + WTSOutgoingFrames, + WTSClientInfo, + WTSSessionInfo, + WTSSessionInfoEx, + WTSConfigInfo, + WTSValidationInfo, + WTSSessionAddressV4, + WTSIsRemoteSession } WTS_INFO_CLASS; typedef enum _WTS_CONNECTSTATE_CLASS
5 years, 9 months
1
0
0
0
[reactos] 02/02: [USER32] Edit: Fix rectangle overflow when inserting characters
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=40dab7d5e5823ef910f18…
commit 40dab7d5e5823ef910f1837f72dc37d916d811ef Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Wed Mar 20 02:42:09 2019 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Mar 23 15:52:43 2019 +0100 [USER32] Edit: Fix rectangle overflow when inserting characters Based on patch by JIRA contributor 'I_Kill_Bugs'. CORE-11475 --- win32ss/user/user32/controls/edit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/win32ss/user/user32/controls/edit.c b/win32ss/user/user32/controls/edit.c index 70bdd1d40d..2f2da0f446 100644 --- a/win32ss/user/user32/controls/edit.c +++ b/win32ss/user/user32/controls/edit.c @@ -805,7 +805,11 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta if ((es->style & ES_CENTER) || (es->style & ES_RIGHT)) rc.left = es->format_rect.left; else +#ifdef __REACTOS__ /* CORE-11475 */ + rc.left = (short)LOWORD(EDIT_EM_PosFromChar(es, nstart_index, FALSE)); +#else rc.left = LOWORD(EDIT_EM_PosFromChar(es, nstart_index, FALSE)); +#endif rc.right = es->format_rect.right; SetRectRgn(hrgn, rc.left, rc.top, rc.right, rc.bottom);
5 years, 9 months
1
0
0
0
[reactos] 01/02: [COMCTL32] Edit: Fix rectangle overflow when inserting characters
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=56ccf8d83299435f77e6f…
commit 56ccf8d83299435f77e6f3ed5962f70ba7a81cbb Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Wed Mar 20 02:39:47 2019 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Mar 23 15:52:43 2019 +0100 [COMCTL32] Edit: Fix rectangle overflow when inserting characters Based on patch by JIRA contributor 'I_Kill_Bugs'. CORE-11475 --- dll/win32/comctl32/edit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dll/win32/comctl32/edit.c b/dll/win32/comctl32/edit.c index e2f47d008e..11d1b1852c 100644 --- a/dll/win32/comctl32/edit.c +++ b/dll/win32/comctl32/edit.c @@ -720,7 +720,11 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta if ((es->style & ES_CENTER) || (es->style & ES_RIGHT)) rc.left = es->format_rect.left; else +#ifdef __REACTOS__ /* CORE-11475 */ + rc.left = (short)LOWORD(EDIT_EM_PosFromChar(es, nstart_index, FALSE)); +#else rc.left = LOWORD(EDIT_EM_PosFromChar(es, nstart_index, FALSE)); +#endif rc.right = es->format_rect.right; SetRectRgn(hrgn, rc.left, rc.top, rc.right, rc.bottom);
5 years, 9 months
1
0
0
0
[reactos] 01/01: [ACPPAGE][SYSDM] Update Ukrainian translation (#1435)
by Yaroslav Kibysh
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8fb10879fc233c71dc724…
commit 8fb10879fc233c71dc724741c1ec071dd89c8b8c Author: Yaroslav Kibysh <yanet.prod(a)gmail.com> AuthorDate: Sat Mar 23 16:20:34 2019 +0200 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Mar 23 15:20:34 2019 +0100 [ACPPAGE][SYSDM] Update Ukrainian translation (#1435) --- dll/cpl/sysdm/lang/uk-UA.rc | 58 +++++++++++++++++++------------------- dll/shellext/acppage/lang/uk-UA.rc | 20 ++++++------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/dll/cpl/sysdm/lang/uk-UA.rc b/dll/cpl/sysdm/lang/uk-UA.rc index c09f514044..3ab9a3e242 100644 --- a/dll/cpl/sysdm/lang/uk-UA.rc +++ b/dll/cpl/sysdm/lang/uk-UA.rc @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/sysdm/lang/uk-UA.rc * PURPOSE: Ukraianian Language File for System Applet - * TRANSLATORS: Artem Reznikov, Igor Paliychuk + * TRANSLATORS: Artem Reznikov, Igor Paliychuk, Yaroslav Kibysh */ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT @@ -27,7 +27,7 @@ BEGIN LTEXT "", IDC_MACHINELINE4, 130, 155, 118, 9 LTEXT "", IDC_MACHINELINE5, 130, 164, 118, 9 LTEXT "", IDC_MACHINELINE6, 130, 173, 118, 9 - CONTROL "Відвідаєте <A HREF=""
http://www.reactos.org/
"">домашню сторінку ReactOS</A>", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 200, 140, 10 + CONTROL "Відвідайте <A HREF=""
http://www.reactos.org/
"">домашню сторінку ReactOS</A>", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 200, 140, 10 PUSHBUTTON "&Ліцензія...", IDC_LICENCE, 170, 198, 78, 15 END @@ -115,30 +115,30 @@ FONT 8, "MS Shell Dlg" BEGIN ICON IDI_HARDPROF, IDC_STATIC, 10, 10, 18, 20, SS_ICON LTEXT "", IDC_HWPPROP_PROFILE, 48, 16, 150, 8 - LTEXT "Dock ID:", IDC_STATIC, 10, 42, 43, 8 + LTEXT "Стикувальний вузол:", IDC_STATIC, 10, 42, 43, 8 LTEXT "", IDC_HWPPROP_DOCKID, 64, 42, 135, 8 - LTEXT "Serial Number:", IDC_STATIC, 10, 55, 52, 8 + LTEXT "Серійний номер:", IDC_STATIC, 10, 55, 52, 8 LTEXT "", IDC_HWPPROP_SERIAL, 64, 55, 135, 8 GROUPBOX "", IDC_STATIC, 10, 69, 192, 61 - AUTOCHECKBOX "This is a &portable computer", IDC_HWPPROP_PORTABLE, 17, 68, 115, 10, WS_GROUP | WS_TABSTOP - AUTORADIOBUTTON "The docking &state is unknown", IDC_HWPPROP_UNKNOWN, 22, 85, 160, 10, WS_GROUP | WS_TABSTOP - AUTORADIOBUTTON "The computer is &docked", IDC_HWPPROP_DOCKED, 22, 97, 160, 10 - AUTORADIOBUTTON "The computer is &undocked", IDC_HWPPROP_UNDOCKED, 22, 109, 160, 10 - GROUPBOX "Hardware profiles selection", IDC_STATIC, 10, 138, 192, 42 - AUTOCHECKBOX "Always &include this profile as an option when ReactOS starts", IDC_HWPPROP_INCLUDE, 17, 150, 164, 20, WS_GROUP | WS_TABSTOP | BS_MULTILINE + AUTOCHECKBOX "Це &переносний комп'ютер", IDC_HWPPROP_PORTABLE, 17, 68, 115, 10, WS_GROUP | WS_TABSTOP + AUTORADIOBUTTON "Стан &вузла невідомий", IDC_HWPPROP_UNKNOWN, 22, 85, 160, 10, WS_GROUP | WS_TABSTOP + AUTORADIOBUTTON "Комп'ютер &пристикований", IDC_HWPPROP_DOCKED, 22, 97, 160, 10 + AUTORADIOBUTTON "Комп'ютер в&ідстикований", IDC_HWPPROP_UNDOCKED, 22, 109, 160, 10 + GROUPBOX "Вибір профілів обладнання", IDC_STATIC, 10, 138, 192, 42 + AUTOCHECKBOX "Завжди п&оказувати цей профіль при завантаженні ReactOS", IDC_HWPPROP_INCLUDE, 17, 150, 164, 20, WS_GROUP | WS_TABSTOP | BS_MULTILINE END IDD_COPYPROFILE DIALOGEX 12, 26, 256, 52 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Copy Profile" +CAPTION "Копіювати профіль" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "From:", IDC_STATIC, 5, 10, 20, 8 + LTEXT "Звідки:", IDC_STATIC, 5, 10, 20, 8 LTEXT "", IDC_COPYPROFILEFROM, 30, 10, 160, 10 - LTEXT "To:", IDC_STATIC, 5, 30, 20, 8 + LTEXT "В:", IDC_STATIC, 5, 30, 20, 8 EDITTEXT IDC_COPYPROFILETO, 30, 30, 160, 12 DEFPUSHBUTTON "OK", IDOK, 199, 9, 50, 14 - PUSHBUTTON "Cancel", IDCANCEL, 199, 30, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 199, 30, 50, 14 END IDD_RENAMEPROFILE DIALOGEX 12, 26, 256, 52 @@ -160,7 +160,7 @@ CAPTION "Профілі користувачів" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_USERPROF, IDC_STATIC, 6, 11, 16, 16, SS_ICON - LTEXT "Профілі користувачів містять параметри робочого стола та інші відомості стосовно облікових записів користувачів. Ви можете створити окремі профілі для кожного з комп'ютерів, на яких ви працюєте, або використовувати один спільний профіль для всіх комп'ютерів.", IDC_STATIC, 40, 11, 204, 39 //TOO LONG, MAX 256 CHARS ALLOWED + LTEXT "Профілі користувачів містять відомості стосовно облікових записів користувачів. Ви можете створити окремі профілі для кожного з комп'ютерів, на яких ви працюєте, або використовувати один спільний профіль для всіх комп'ютерів.", IDC_STATIC, 40, 11, 204, 39 LTEXT "Профілі, які зберігаються на цьому комп'ютері:", IDC_STATIC, 16, 51, 204, 9 CONTROL "", IDC_USERPROFILE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 6, 66, 244, 85, WS_EX_CLIENTEDGE @@ -303,23 +303,23 @@ BEGIN IDS_USERPROFILE_TYPE "Тип" IDS_USERPROFILE_STATUS "Стан" IDS_USERPROFILE_MODIFIED "Змінено" - IDS_USERPROFILE_LOCAL "Local" - IDS_USERPROFILE_ROAMING "Roaming" - IDS_USERPROFILE_MANDATORY "Mandatory" - IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's profile?" - IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete" - IDS_MESSAGEBOXTITLE "System control panel applet" + IDS_USERPROFILE_LOCAL "Локальний" + IDS_USERPROFILE_ROAMING "Переміщуваний" + IDS_USERPROFILE_MANDATORY "Обов'язковий" + IDS_USERPROFILE_CONFIRM_DELETE "Ви дійсно хочете видалити профіль %s?" + IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Підтвердження видалення" + IDS_MESSAGEBOXTITLE "Елемент панелі керування" IDS_WARNINITIALSIZE "Введіть числове значення для початкового розміру файлу довантаження." IDS_WARNMAXIMUMSIZE "Введіть числове значення для максимального розміру файлу довантаження." IDS_WARNINITIALRANGE "Початковий розмір файлу довантаження не повинен бути меншим 16 Мб і не повинен перевищувати об'єм вільного місця на обраному диску." IDS_WARNMAXIMUMRANGE "Максимальний розмір файлу довантаження не повинен бути меншим від початкового та не повинен перевищувати об'єм вільного місця на обраному диску." IDS_PAGEFILE_NONE "Немає" - IDS_PAGEFILE_SYSTEM "System Managed" - IDS_INFOREBOOT "You have to reboot the computer in order to apply the changes." - IDS_DEVS "\nReactOS Team\n\nProject Coordinator\n\nAleksey Bragin\n\nDevelopment Team\n\nAleksandar Andrejevic\nAleksey Bragin\nAlexander Shaposhnikov\nAmine Khaldi\nAndrew Greenwood\nAndrey Korotaev\nArt Yerkes\nBenedikt Freisen\nCameron Gutman\nChristoph von Wittich\nColin Finck\nDaniel Reimer\nDavid Quintana\nDmitry Chapyshev\nEric Kohl\nGed Murphy\nGiannis Adamopoulos\nGregor Brunmar\nHermès Bélusca-Maïto\nHervé Poussineau\nJames Tabor\nJeffrey Morlan\nJérôme Gardou\nJohannes And [...] - IDS_HWPROFILE_CONFIRM_DELETE_TITLE "Confirm Profile Delete" - IDS_HWPROFILE_CONFIRM_DELETE "Are you sure you want to delete the hardware profile ""%s""?" - IDS_HWPROFILE_ALREADY_IN_USE "The profile name is already in use." - IDS_HWPROFILE_PROFILE "Profile" - IDS_HWPROFILE_WARNING "Warning" + IDS_PAGEFILE_SYSTEM "За вибором системи" + IDS_INFOREBOOT "Необхідно перезавантажити комп'ютер для застосування нових параметрів." + IDS_DEVS "\nКоманда ReactOS\n\nКординатор проекту\n\nОлексій Брагін\n\nКоманда розробників\n\nОлександр Андрійович\nОлексій Брагін\nОлександр Шапошніков\nАмін Халді\nЕндрю Грінвуд\nАндрій Коротаєв\nАрт Єркс\nБенедикт Фрейзен\nКамерон Гутман\nКрістоф фон Віттіх\nКолін Фінк\nДаніель Реймер\nДевід Кінтана\nДмитро Чапишев\nЕрік Коль\nГед Мерфі\nЯніс Адамопулос\nГрегор Брунмар\nГермес Белуска-Маіто\nЕрве Пуссіно\nДжеймс Табор\nДжеффрі Морлан\nЖером Гарду\nЙоганнес Андервальд\nКаміль Хорні [...] + IDS_HWPROFILE_CONFIRM_DELETE_TITLE "Підтвердження видалення профілю" + IDS_HWPROFILE_CONFIRM_DELETE "Ви дійсно хочете видалити профіль обладнання ""%s""?" + IDS_HWPROFILE_ALREADY_IN_USE "Ім'я вже зайнято." + IDS_HWPROFILE_PROFILE "Профіль" + IDS_HWPROFILE_WARNING "Увага" END diff --git a/dll/shellext/acppage/lang/uk-UA.rc b/dll/shellext/acppage/lang/uk-UA.rc index f170cf6ef1..8d755f7be6 100644 --- a/dll/shellext/acppage/lang/uk-UA.rc +++ b/dll/shellext/acppage/lang/uk-UA.rc @@ -1,9 +1,9 @@ /* - * PROJECT: Application Compatibility Layer Shell Extension - * LICENSE: GPL - See COPYING in the top level directory - * FILE: dll/shellext/acppage/lang/uk-UA.rc - * PURPOSE: Ukraianian Language File for acppage - * TRANSLATOR: Artem Reznikov + * PROJECT: Application Compatibility Layer Shell Extension + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/shellext/acppage/lang/uk-UA.rc + * PURPOSE: Ukraianian Language File for acppage + * TRANSLATORS: Artem Reznikov, Yaroslav Kibysh */ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT @@ -23,7 +23,7 @@ BEGIN CHECKBOX "Вимикати візуальні теми", IDC_CHKDISABLEVISUALTHEMES, 18, 144, 188, 10, BS_AUTOCHECKBOX | WS_TABSTOP PUSHBUTTON "&Режими сумісності...", IDC_EDITCOMPATIBILITYMODES, 117, 167, 100, 15 LTEXT "",IDC_ENABLED_LAYERS,7,185,210,21 - CONTROL "Learn more about <A>program compatibility</A>.", IDC_INFOLINK, "SysLink", WS_CHILD | WS_TABSTOP | WS_VISIBLE, 7, 207, 210, 10, WS_EX_NOPARENTNOTIFY + CONTROL "Дізнатись більше про <A>сумісність програм</A>.", IDC_INFOLINK, "SysLink", WS_CHILD | WS_TABSTOP | WS_VISIBLE, 7, 207, 210, 10, WS_EX_NOPARENTNOTIFY END IDD_EDITCOMPATIBILITYMODES DIALOGEX 0, 0, 309, 134 @@ -38,13 +38,13 @@ BEGIN PUSHBUTTON "<",IDC_REMOVE,144,60,18,14,WS_DISABLED PUSHBUTTON "&OK",IDOK,174,114,60,14 PUSHBUTTON "&Скасувати",IDCANCEL,240,114,60,14 - LTEXT "Available modes",-1,6,6,52,8 - LTEXT "Selected modes",-1,168,6,51,8 + LTEXT "Доступні режими",-1,6,6,52,8 + LTEXT "Обрані режими",-1,168,6,51,8 END STRINGTABLE BEGIN IDS_COMPAT_TITLE "Сумісність" - IDS_FAILED_NETWORK "Compatibility modes cannot be set on this program because it is on a network drive." - IDS_FAILED_PROTECTED "Compatibility modes cannot be set on this program because it is a part of ReactOS." + IDS_FAILED_NETWORK "Режим сумісності не может бути встановленим для цієї програми, бо вона знаходиться на мережевому диску." + IDS_FAILED_PROTECTED "Режим сумісності не может бути використаний для компонентів ReactOS." END
5 years, 9 months
1
0
0
0
[reactos] 01/01: [SNDVOL32] Small Italian translation update (#1431)
by Daniele Campione
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fc3b8d598ab4e90dd3258…
commit fc3b8d598ab4e90dd32580075b6a039d14c66523 Author: Daniele Campione <nonametekno(a)gmail.com> AuthorDate: Sat Mar 23 01:07:37 2019 +0100 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Mar 23 01:07:37 2019 +0100 [SNDVOL32] Small Italian translation update (#1431) --- base/applications/sndvol32/lang/it-IT.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/applications/sndvol32/lang/it-IT.rc b/base/applications/sndvol32/lang/it-IT.rc index 409f37ca52..e35508b291 100644 --- a/base/applications/sndvol32/lang/it-IT.rc +++ b/base/applications/sndvol32/lang/it-IT.rc @@ -120,11 +120,11 @@ BEGIN LTEXT "Queste impostazioni possono essere usate per fare regolazioni fini al tuo audio.", -1, 44, 7, 200, 32 GROUPBOX "Controlli di tono", IDC_ADV_TONE_CONTROLS, 7, 33, 240, 80 LTEXT "Queste impostazioni controllano il modo in cui suona il tono del tuo audio.", -1, 17, 48, 200, 14 - LTEXT "&Basso:", -1, 17, 62, 50, 8 + LTEXT "&Bassi:", -1, 17, 62, 50, 8 LTEXT "Basso", IDC_ADV_BASS_LOW, 77, 62, 20, 8 LTEXT "Alto", IDC_ADV_BASS_HIGH, 182, 62, 20, 8 CONTROL "", IDC_ADV_BASS_SLIDER, "msctls_trackbar32", TBS_HORZ | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 97, 62, 80, 20 - LTEXT "&Alto:", -1, 17, 90, 50, 8 + LTEXT "&Alti:", -1, 17, 90, 50, 8 LTEXT "Basso", IDC_ADV_TREBLE_LOW, 77, 90, 20, 8 LTEXT "Alto", IDC_ADV_TREBLE_HIGH, 182, 90, 20, 8 CONTROL "", IDC_ADV_TREBLE_SLIDER, "msctls_trackbar32", TBS_HORZ | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 97, 90, 80, 20
5 years, 9 months
1
0
0
0
[reactos] 02/02: [SYSDM] Implement the 'delete profile' button, except for deleting the profile.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6c6e7b82fc9997658df1b…
commit 6c6e7b82fc9997658df1ba482189c6d286b239e4 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Thu Mar 21 21:56:37 2019 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Thu Mar 21 21:58:02 2019 +0100 [SYSDM] Implement the 'delete profile' button, except for deleting the profile. --- dll/cpl/sysdm/userprofile.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/dll/cpl/sysdm/userprofile.c b/dll/cpl/sysdm/userprofile.c index 8bacb58ba5..209d0c5eaa 100644 --- a/dll/cpl/sysdm/userprofile.c +++ b/dll/cpl/sysdm/userprofile.c @@ -316,6 +316,55 @@ OnNotify( } +static +BOOL +DeleteUserProfile( + HWND hwndDlg) +{ + WCHAR szTitle[64], szRawText[128], szCookedText[256]; + HWND hwndListView; + LVITEM Item; + INT iSelected; + PPROFILEDATA pProfileData; + + hwndListView = GetDlgItem(hwndDlg, IDC_USERPROFILE_LIST); + if (hwndListView == NULL) + return FALSE; + + iSelected = ListView_GetNextItem(hwndListView, -1, LVNI_SELECTED); + if (iSelected == -1) + return FALSE; + + ZeroMemory(&Item, sizeof(LVITEM)); + Item.mask = LVIF_PARAM; + Item.iItem = iSelected; + Item.iSubItem = 0; + if (!ListView_GetItem(hwndListView, &Item)) + return FALSE; + + if (Item.lParam == 0) + return FALSE; + + pProfileData = (PPROFILEDATA)Item.lParam; + if (pProfileData->bMyProfile) + return FALSE; + + LoadStringW(hApplet, IDS_USERPROFILE_CONFIRM_DELETE_TITLE, szTitle, ARRAYSIZE(szTitle)); + LoadStringW(hApplet, IDS_USERPROFILE_CONFIRM_DELETE, szRawText, ARRAYSIZE(szRawText)); + swprintf(szCookedText, szRawText, pProfileData->pszFullName); + + if (MessageBoxW(hwndDlg, + szCookedText, + szTitle, + MB_ICONQUESTION | MB_YESNO) == IDNO) + return FALSE; + + /* FIXME: Delete the profile here! */ + + return TRUE; +} + + /* Property page dialog callback */ INT_PTR CALLBACK UserProfileDlgProc(HWND hwndDlg, @@ -342,7 +391,14 @@ UserProfileDlgProc(HWND hwndDlg, LOWORD(wParam)); return TRUE; + case IDC_USERPROFILE_CHANGE: + break; + case IDC_USERPROFILE_DELETE: + DeleteUserProfile(hwndDlg); + break; + + case IDC_USERPROFILE_COPY: break; } break;
5 years, 9 months
1
0
0
0
[reactos] 01/02: [SYSDM] Update the buttons on the user profile dialog after adding the profiles to the listview.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b80400ed108c91b9cbacc…
commit b80400ed108c91b9cbaccec925fcd125a399d183 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Thu Mar 21 21:51:56 2019 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Thu Mar 21 21:58:01 2019 +0100 [SYSDM] Update the buttons on the user profile dialog after adding the profiles to the listview. --- dll/cpl/sysdm/userprofile.c | 89 +++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/dll/cpl/sysdm/userprofile.c b/dll/cpl/sysdm/userprofile.c index e0868a8fbb..8bacb58ba5 100644 --- a/dll/cpl/sysdm/userprofile.c +++ b/dll/cpl/sysdm/userprofile.c @@ -159,7 +159,47 @@ done: static VOID -AddUserProfiles(HWND hwndListView) +UpdateButtonState( + _In_ HWND hwndDlg, + _In_ HWND hwndListView) +{ + LVITEM Item; + INT iSelected; + BOOL bMyProfile; + + iSelected = ListView_GetNextItem(hwndListView, -1, LVNI_SELECTED); + if (iSelected != -1) + { + Item.mask = LVIF_PARAM; + Item.iItem = iSelected; + Item.iSubItem = 0; + if (ListView_GetItem(hwndListView, &Item)) + { + if (Item.lParam != 0) + { + bMyProfile = ((PPROFILEDATA)Item.lParam)->bMyProfile; + if (/*IsUserAnAdmin() &&*/ !bMyProfile) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_DELETE), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_COPY), TRUE); + } + } + } + EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_CHANGE), TRUE); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_CHANGE), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_DELETE), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_COPY), FALSE); + } +} + + +static VOID +AddUserProfiles( + _In_ HWND hwndDlg, + _In_ HWND hwndListView) { HKEY hKeyUserProfiles = INVALID_HANDLE_VALUE; DWORD dwIndex; @@ -210,6 +250,8 @@ AddUserProfiles(HWND hwndListView) if (ListView_GetItemCount(hwndListView) != 0) ListView_SetItemState(hwndListView, 0, LVIS_SELECTED, LVIS_SELECTED); + UpdateButtonState(hwndDlg, hwndListView); + done: if (hKeyUserProfiles != INVALID_HANDLE_VALUE) RegCloseKey(hKeyUserProfiles); @@ -228,14 +270,7 @@ OnInitUserProfileDialog(HWND hwndDlg) /* Initialize the list view control */ SetListViewColumns(GetDlgItem(hwndDlg, IDC_USERPROFILE_LIST)); - AddUserProfiles(GetDlgItem(hwndDlg, IDC_USERPROFILE_LIST)); - - /* Disable the "Delete" and "Copy To" buttons if the user is not an admin */ - if (!IsUserAnAdmin()) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_DELETE), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_COPY), FALSE); - } + AddUserProfiles(hwndDlg, GetDlgItem(hwndDlg, IDC_USERPROFILE_LIST)); } @@ -276,39 +311,7 @@ OnNotify( } else if (nmhdr->idFrom == IDC_USERPROFILE_LIST && nmhdr->code == LVN_ITEMCHANGED) { - if (ListView_GetSelectedCount(nmhdr->hwndFrom) == 0) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_CHANGE), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_DELETE), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_COPY), FALSE); - } - else - { - LVITEM Item; - INT iSelected; - BOOL bMyProfile = FALSE; - - iSelected = ListView_GetNextItem(nmhdr->hwndFrom, -1, LVNI_SELECTED); - if (iSelected != -1) - { - Item.iItem = iSelected; - Item.iSubItem = 0; - if (ListView_GetItem(nmhdr->hwndFrom, &Item)) - { - if (Item.lParam != 0) - { - bMyProfile = ((PPROFILEDATA)Item.lParam)->bMyProfile; - } - } - } - - EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_CHANGE), TRUE); - if (IsUserAnAdmin() && !bMyProfile) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_DELETE), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_COPY), TRUE); - } - } + UpdateButtonState(hwndDlg, nmhdr->hwndFrom); } } @@ -324,7 +327,7 @@ UserProfileDlgProc(HWND hwndDlg, { case WM_INITDIALOG: OnInitUserProfileDialog(hwndDlg); - break; + return TRUE; case WM_DESTROY: OnDestroy(hwndDlg);
5 years, 9 months
1
0
0
0
[reactos] 02/02: [SYSDM] Update Russian translation
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ffc4e30ce5146e49b7aca…
commit ffc4e30ce5146e49b7aca0057906a187604c32ce Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Wed Mar 20 19:04:20 2019 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Wed Mar 20 23:49:03 2019 +0100 [SYSDM] Update Russian translation Addendum to 71f84a3. --- dll/cpl/sysdm/lang/ru-RU.rc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dll/cpl/sysdm/lang/ru-RU.rc b/dll/cpl/sysdm/lang/ru-RU.rc index 173b0b921c..0fb93e5b31 100644 --- a/dll/cpl/sysdm/lang/ru-RU.rc +++ b/dll/cpl/sysdm/lang/ru-RU.rc @@ -295,11 +295,11 @@ BEGIN IDS_USERPROFILE_TYPE "Тип" IDS_USERPROFILE_STATUS "Состояние" IDS_USERPROFILE_MODIFIED "Изменен" - IDS_USERPROFILE_LOCAL "Local" - IDS_USERPROFILE_ROAMING "Roaming" - IDS_USERPROFILE_MANDATORY "Mandatory" - IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's profile?" - IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete" + IDS_USERPROFILE_LOCAL "Локальный" + IDS_USERPROFILE_ROAMING "Перемещаемый" + IDS_USERPROFILE_MANDATORY "Обязательный" + IDS_USERPROFILE_CONFIRM_DELETE "Вы действительно хотите удалить профиль пользователя %s?" + IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Подтверждение удаления" IDS_MESSAGEBOXTITLE "Панель управления системы" IDS_WARNINITIALSIZE "Введите числовое значение исходного размера файла подкачки." IDS_WARNMAXIMUMSIZE "Введите числовое значение для параметра максимальный размер файла подкачки."
5 years, 9 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
22
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
Results per page:
10
25
50
100
200