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
May 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
17 participants
165 discussions
Start a n
N
ew thread
[reactos] 01/01: [NtUser] Fix setting screen size.
by jimtabor
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0f29b3faa7770c441d084…
commit 0f29b3faa7770c441d084e4b41ceba555d4181ab Author: jimtabor <james.tabor(a)reactos.org> AuthorDate: Tue May 21 16:24:52 2019 -0500 Commit: jimtabor <james.tabor(a)reactos.org> CommitDate: Tue May 21 16:24:52 2019 -0500 [NtUser] Fix setting screen size. Back set change size to the server information metrics. Fixes CORE-15477. Still more work is required. Patch based on reactosfanboy original patch. --- win32ss/user/ntuser/display.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/win32ss/user/ntuser/display.c b/win32ss/user/ntuser/display.c index 6abe5c84a5c..25b1f947014 100644 --- a/win32ss/user/ntuser/display.c +++ b/win32ss/user/ntuser/display.c @@ -830,6 +830,8 @@ UserChangeDisplaySettings( gpsi->Planes = ppdev->gdiinfo.cPlanes; gpsi->BitsPixel = ppdev->gdiinfo.cBitsPixel; gpsi->BitCount = gpsi->Planes * gpsi->BitsPixel; + gpsi->aiSysMet[SM_CXSCREEN] = ppdev->gdiinfo.ulHorzRes; + gpsi->aiSysMet[SM_CYSCREEN] = ppdev->gdiinfo.ulVertRes; if (ppdev->gdiinfo.flRaster & RC_PALETTE) { gpsi->PUSIFlags |= PUSIF_PALETTEDISPLAY; @@ -855,10 +857,13 @@ UserChangeDisplaySettings( //IntHideDesktop(pdesk); /* Send WM_DISPLAYCHANGE to all toplevel windows */ - UserSendNotifyMessage(HWND_BROADCAST, - WM_DISPLAYCHANGE, - gpsi->BitCount, - MAKELONG(gpsi->aiSysMet[SM_CXSCREEN], gpsi->aiSysMet[SM_CYSCREEN])); + co_IntSendMessageTimeout( HWND_BROADCAST, + WM_DISPLAYCHANGE, + gpsi->BitCount, + MAKELONG(gpsi->aiSysMet[SM_CXSCREEN], gpsi->aiSysMet[SM_CYSCREEN]), + SMTO_NORMAL, + 100, + &ulResult ); ERR("BitCount New %d Orig %d ChkNew %d\n",gpsi->BitCount,OrigBC,ppdev->gdiinfo.cBitsPixel);
5 years, 7 months
1
0
0
0
[reactos] 04/04: [NTOSKRNL] Use the security descriptor for all the symlinks
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fe6c7f05e26a3f9e3b191…
commit fe6c7f05e26a3f9e3b1915c849abc21799904ffc Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Tue May 21 19:27:32 2019 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Tue May 21 19:28:17 2019 +0200 [NTOSKRNL] Use the security descriptor for all the symlinks --- ntoskrnl/ob/obname.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ntoskrnl/ob/obname.c b/ntoskrnl/ob/obname.c index 3a967872028..f9ccb914022 100644 --- a/ntoskrnl/ob/obname.c +++ b/ntoskrnl/ob/obname.c @@ -169,14 +169,13 @@ ObpCreateDosDevicesDirectory(VOID) Status = NtCreateDirectoryObject(&Handle, DIRECTORY_ALL_ACCESS, &ObjectAttributes); - RtlGetDaclSecurityDescriptor(&DosDevicesSD, &DaclPresent, &Dacl, &DaclDefaulted); - ExFreePoolWithTag(Dacl, 'lcaD'); - if (!NT_SUCCESS(Status)) return Status; + if (!NT_SUCCESS(Status)) + goto done; /* Create the system device map */ Status = ObpCreateDeviceMap(Handle); if (!NT_SUCCESS(Status)) - return Status; + goto done; /*********************************************\ |*** HACK until we support device mappings ***| @@ -187,7 +186,7 @@ ObpCreateDosDevicesDirectory(VOID) &LinkName, OBJ_PERMANENT, NULL, - NULL); + &DosDevicesSD); Status = NtCreateSymbolicLinkObject(&SymHandle, SYMBOLIC_LINK_ALL_ACCESS, &ObjectAttributes, @@ -208,7 +207,7 @@ ObpCreateDosDevicesDirectory(VOID) &LinkName, OBJ_PERMANENT, Handle, - NULL); + &DosDevicesSD); Status = NtCreateSymbolicLinkObject(&SymHandle, SYMBOLIC_LINK_ALL_ACCESS, &ObjectAttributes, @@ -226,7 +225,7 @@ ObpCreateDosDevicesDirectory(VOID) &LinkName, OBJ_PERMANENT, Handle, - NULL); + &DosDevicesSD); Status = NtCreateSymbolicLinkObject(&SymHandle, SYMBOLIC_LINK_ALL_ACCESS, &ObjectAttributes, @@ -235,7 +234,8 @@ ObpCreateDosDevicesDirectory(VOID) /* Close the directory handle */ NtClose(Handle); - if (!NT_SUCCESS(Status)) return Status; + if (!NT_SUCCESS(Status)) + goto done; /* * Initialize the \DosDevices symbolic link pointing to the global @@ -248,13 +248,17 @@ ObpCreateDosDevicesDirectory(VOID) &LinkName, OBJ_PERMANENT, NULL, - NULL); + &DosDevicesSD); Status = NtCreateSymbolicLinkObject(&SymHandle, SYMBOLIC_LINK_ALL_ACCESS, &ObjectAttributes, &RootName); if (NT_SUCCESS(Status)) NtClose(SymHandle); +done: + RtlGetDaclSecurityDescriptor(&DosDevicesSD, &DaclPresent, &Dacl, &DaclDefaulted); + ExFreePoolWithTag(Dacl, 'lcaD'); + /* Return status */ return Status; }
5 years, 7 months
1
0
0
0
[reactos] 03/04: [NTOSKRNL] Simplify ObpCreateGlobalDosDevicesSD by using a SD on the stack Rename it to ObpGetDosDevicesProtection to reflect the two previous changes: its purpose is to return a DACL matching protection mode
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=95d303bf13087ba705748…
commit 95d303bf13087ba705748dd49d69f43c107a6cd2 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Tue May 21 08:50:55 2019 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Tue May 21 19:28:16 2019 +0200 [NTOSKRNL] Simplify ObpCreateGlobalDosDevicesSD by using a SD on the stack Rename it to ObpGetDosDevicesProtection to reflect the two previous changes: its purpose is to return a DACL matching protection mode --- ntoskrnl/ob/obname.c | 70 +++++++++++++++------------------------------------- 1 file changed, 20 insertions(+), 50 deletions(-) diff --git a/ntoskrnl/ob/obname.c b/ntoskrnl/ob/obname.c index 5baa4b1a50d..3a967872028 100644 --- a/ntoskrnl/ob/obname.c +++ b/ntoskrnl/ob/obname.c @@ -37,12 +37,13 @@ ULONG ObpUnsecureGlobalNamesLength = sizeof(ObpUnsecureGlobalNamesBuffer); INIT_FUNCTION NTSTATUS NTAPI -ObpCreateGlobalDosDevicesSD(OUT PSECURITY_DESCRIPTOR *SecurityDescriptor) +ObpGetDosDevicesProtection(OUT PSECURITY_DESCRIPTOR SecurityDescriptor) { - PSECURITY_DESCRIPTOR Sd = NULL; PACL Dacl; - ULONG AclSize, SdSize; - NTSTATUS Status; + ULONG AclSize; + + /* Initialize the SD */ + RtlCreateSecurityDescriptor(SecurityDescriptor, SECURITY_DESCRIPTOR_REVISION); if (ObpProtectionMode & 1) { @@ -54,23 +55,13 @@ ObpCreateGlobalDosDevicesSD(OUT PSECURITY_DESCRIPTOR *SecurityDescriptor) sizeof(ACE) + RtlLengthSid(SeLocalSystemSid) + sizeof(ACE) + RtlLengthSid(SeCreatorOwnerSid); - SdSize = sizeof(SECURITY_DESCRIPTOR) + AclSize; - - /* Allocate the SD and ACL */ - Sd = ExAllocatePoolWithTag(PagedPool, SdSize, TAG_SD); - if (Sd == NULL) + /* Allocate the ACL */ + Dacl = ExAllocatePoolWithTag(PagedPool, AclSize, 'lcaD'); + if (Dacl == NULL) { return STATUS_INSUFFICIENT_RESOURCES; } - /* Initialize the SD */ - Status = RtlCreateSecurityDescriptor(Sd, - SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) - return Status; - - Dacl = (PACL)((INT_PTR)Sd + sizeof(SECURITY_DESCRIPTOR)); - /* Initialize the DACL */ RtlCreateAcl(Dacl, AclSize, ACL_REVISION); @@ -116,23 +107,13 @@ ObpCreateGlobalDosDevicesSD(OUT PSECURITY_DESCRIPTOR *SecurityDescriptor) sizeof(ACE) + RtlLengthSid(SeWorldSid) + sizeof(ACE) + RtlLengthSid(SeLocalSystemSid); - SdSize = sizeof(SECURITY_DESCRIPTOR) + AclSize; - - /* Allocate the SD and ACL */ - Sd = ExAllocatePoolWithTag(PagedPool, SdSize, TAG_SD); - if (Sd == NULL) + /* Allocate the ACL */ + Dacl = ExAllocatePoolWithTag(PagedPool, AclSize, 'lcaD'); + if (Dacl == NULL) { return STATUS_INSUFFICIENT_RESOURCES; } - /* Initialize the SD */ - Status = RtlCreateSecurityDescriptor(Sd, - SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) - return Status; - - Dacl = (PACL)((INT_PTR)Sd + sizeof(SECURITY_DESCRIPTOR)); - /* Initialize the DACL */ RtlCreateAcl(Dacl, AclSize, ACL_REVISION); @@ -155,23 +136,9 @@ ObpCreateGlobalDosDevicesSD(OUT PSECURITY_DESCRIPTOR *SecurityDescriptor) } /* Attach the DACL to the SD */ - Status = RtlSetDaclSecurityDescriptor(Sd, - TRUE, - Dacl, - FALSE); - if (!NT_SUCCESS(Status)) - goto done; - - *SecurityDescriptor = Sd; + RtlSetDaclSecurityDescriptor(SecurityDescriptor, TRUE, Dacl, FALSE); -done: - if (!NT_SUCCESS(Status)) - { - if (Sd != NULL) - ExFreePoolWithTag(Sd, TAG_SD); - } - - return Status; + return STATUS_SUCCESS; } INIT_FUNCTION @@ -182,11 +149,13 @@ ObpCreateDosDevicesDirectory(VOID) OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING RootName, TargetName, LinkName; HANDLE Handle, SymHandle; - PSECURITY_DESCRIPTOR DosDevicesSD = NULL; + SECURITY_DESCRIPTOR DosDevicesSD; NTSTATUS Status; + PACL Dacl; + BOOLEAN DaclPresent, DaclDefaulted; /* Create a custom security descriptor for the global DosDevices directory */ - Status = ObpCreateGlobalDosDevicesSD(&DosDevicesSD); + Status = ObpGetDosDevicesProtection(&DosDevicesSD); if (!NT_SUCCESS(Status)) return Status; @@ -196,11 +165,12 @@ ObpCreateDosDevicesDirectory(VOID) &RootName, OBJ_PERMANENT, NULL, - DosDevicesSD); + &DosDevicesSD); Status = NtCreateDirectoryObject(&Handle, DIRECTORY_ALL_ACCESS, &ObjectAttributes); - ExFreePoolWithTag(DosDevicesSD, TAG_SD); + RtlGetDaclSecurityDescriptor(&DosDevicesSD, &DaclPresent, &Dacl, &DaclDefaulted); + ExFreePoolWithTag(Dacl, 'lcaD'); if (!NT_SUCCESS(Status)) return Status; /* Create the system device map */
5 years, 7 months
1
0
0
0
[reactos] 02/04: [NTOSKRNL] Use relaxed ACLs in ObpCreateGlobalDosDevicesSD when protection mode is not set
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=33f524c6259078191f5de…
commit 33f524c6259078191f5de66a19eefb4ea7e27adf Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Tue May 21 08:37:36 2019 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Tue May 21 19:28:16 2019 +0200 [NTOSKRNL] Use relaxed ACLs in ObpCreateGlobalDosDevicesSD when protection mode is not set --- ntoskrnl/ob/obname.c | 163 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 105 insertions(+), 58 deletions(-) diff --git a/ntoskrnl/ob/obname.c b/ntoskrnl/ob/obname.c index b1e541eeb4b..5baa4b1a50d 100644 --- a/ntoskrnl/ob/obname.c +++ b/ntoskrnl/ob/obname.c @@ -44,68 +44,115 @@ ObpCreateGlobalDosDevicesSD(OUT PSECURITY_DESCRIPTOR *SecurityDescriptor) ULONG AclSize, SdSize; NTSTATUS Status; - AclSize = sizeof(ACL) + - sizeof(ACE) + RtlLengthSid(SeWorldSid) + - sizeof(ACE) + RtlLengthSid(SeLocalSystemSid) + - sizeof(ACE) + RtlLengthSid(SeWorldSid) + - sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid) + - sizeof(ACE) + RtlLengthSid(SeLocalSystemSid) + - sizeof(ACE) + RtlLengthSid(SeCreatorOwnerSid); - - SdSize = sizeof(SECURITY_DESCRIPTOR) + AclSize; - - /* Allocate the SD and ACL */ - Sd = ExAllocatePoolWithTag(PagedPool, SdSize, TAG_SD); - if (Sd == NULL) + if (ObpProtectionMode & 1) { - return STATUS_INSUFFICIENT_RESOURCES; + AclSize = sizeof(ACL) + + sizeof(ACE) + RtlLengthSid(SeWorldSid) + + sizeof(ACE) + RtlLengthSid(SeLocalSystemSid) + + sizeof(ACE) + RtlLengthSid(SeWorldSid) + + sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid) + + sizeof(ACE) + RtlLengthSid(SeLocalSystemSid) + + sizeof(ACE) + RtlLengthSid(SeCreatorOwnerSid); + + SdSize = sizeof(SECURITY_DESCRIPTOR) + AclSize; + + /* Allocate the SD and ACL */ + Sd = ExAllocatePoolWithTag(PagedPool, SdSize, TAG_SD); + if (Sd == NULL) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Initialize the SD */ + Status = RtlCreateSecurityDescriptor(Sd, + SECURITY_DESCRIPTOR_REVISION); + if (!NT_SUCCESS(Status)) + return Status; + + Dacl = (PACL)((INT_PTR)Sd + sizeof(SECURITY_DESCRIPTOR)); + + /* Initialize the DACL */ + RtlCreateAcl(Dacl, AclSize, ACL_REVISION); + + /* Add the ACEs */ + RtlAddAccessAllowedAce(Dacl, + ACL_REVISION, + GENERIC_READ | GENERIC_EXECUTE, + SeWorldSid); + + RtlAddAccessAllowedAce(Dacl, + ACL_REVISION, + GENERIC_ALL, + SeLocalSystemSid); + + RtlAddAccessAllowedAceEx(Dacl, + ACL_REVISION, + INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, + GENERIC_EXECUTE, + SeWorldSid); + + RtlAddAccessAllowedAceEx(Dacl, + ACL_REVISION, + INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, + GENERIC_ALL, + SeAliasAdminsSid); + + RtlAddAccessAllowedAceEx(Dacl, + ACL_REVISION, + INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, + GENERIC_ALL, + SeLocalSystemSid); + + RtlAddAccessAllowedAceEx(Dacl, + ACL_REVISION, + INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, + GENERIC_ALL, + SeCreatorOwnerSid); } + else + { + AclSize = sizeof(ACL) + + sizeof(ACE) + RtlLengthSid(SeLocalSystemSid) + + sizeof(ACE) + RtlLengthSid(SeWorldSid) + + sizeof(ACE) + RtlLengthSid(SeLocalSystemSid); - /* Initialize the SD */ - Status = RtlCreateSecurityDescriptor(Sd, - SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) - return Status; + SdSize = sizeof(SECURITY_DESCRIPTOR) + AclSize; - Dacl = (PACL)((INT_PTR)Sd + sizeof(SECURITY_DESCRIPTOR)); - - /* Initialize the DACL */ - RtlCreateAcl(Dacl, AclSize, ACL_REVISION); - - /* Add the ACEs */ - RtlAddAccessAllowedAce(Dacl, - ACL_REVISION, - GENERIC_READ | GENERIC_EXECUTE, - SeWorldSid); - - RtlAddAccessAllowedAce(Dacl, - ACL_REVISION, - GENERIC_ALL, - SeLocalSystemSid); - - RtlAddAccessAllowedAceEx(Dacl, - ACL_REVISION, - INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, - GENERIC_EXECUTE, - SeWorldSid); - - RtlAddAccessAllowedAceEx(Dacl, - ACL_REVISION, - INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, - GENERIC_ALL, - SeAliasAdminsSid); - - RtlAddAccessAllowedAceEx(Dacl, - ACL_REVISION, - INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, - GENERIC_ALL, - SeLocalSystemSid); - - RtlAddAccessAllowedAceEx(Dacl, - ACL_REVISION, - INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, - GENERIC_ALL, - SeCreatorOwnerSid); + /* Allocate the SD and ACL */ + Sd = ExAllocatePoolWithTag(PagedPool, SdSize, TAG_SD); + if (Sd == NULL) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Initialize the SD */ + Status = RtlCreateSecurityDescriptor(Sd, + SECURITY_DESCRIPTOR_REVISION); + if (!NT_SUCCESS(Status)) + return Status; + + Dacl = (PACL)((INT_PTR)Sd + sizeof(SECURITY_DESCRIPTOR)); + + /* Initialize the DACL */ + RtlCreateAcl(Dacl, AclSize, ACL_REVISION); + + /* Add the ACEs */ + RtlAddAccessAllowedAce(Dacl, + ACL_REVISION, + GENERIC_READ | GENERIC_EXECUTE | GENERIC_WRITE, + SeWorldSid); + + RtlAddAccessAllowedAce(Dacl, + ACL_REVISION, + GENERIC_ALL, + SeLocalSystemSid); + + RtlAddAccessAllowedAceEx(Dacl, + ACL_REVISION, + INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, + GENERIC_ALL, + SeWorldSid); + } /* Attach the DACL to the SD */ Status = RtlSetDaclSecurityDescriptor(Sd,
5 years, 7 months
1
0
0
0
[reactos] 01/04: [NTOSKRNL] Save ProtectionMode value on boot
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1c4e44592c397041ea0e4…
commit 1c4e44592c397041ea0e446f0c71bc2b9c4f949d Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Tue May 21 08:34:16 2019 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Tue May 21 19:28:16 2019 +0200 [NTOSKRNL] Save ProtectionMode value on boot --- ntoskrnl/config/cmdata.c | 2 +- ntoskrnl/include/internal/ob.h | 1 + ntoskrnl/ob/obinit.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ntoskrnl/config/cmdata.c b/ntoskrnl/config/cmdata.c index 9b788b5f461..816dfd28c91 100644 --- a/ntoskrnl/config/cmdata.c +++ b/ntoskrnl/config/cmdata.c @@ -141,7 +141,7 @@ INIT_SECTION CM_SYSTEM_CONTROL_VECTOR CmControlVector[] = { L"Session Manager", L"ProtectionMode", - &DummyData, + &ObpProtectionMode, NULL, NULL }, diff --git a/ntoskrnl/include/internal/ob.h b/ntoskrnl/include/internal/ob.h index 59bd66956c2..ce8c5a0dc75 100644 --- a/ntoskrnl/include/internal/ob.h +++ b/ntoskrnl/include/internal/ob.h @@ -619,6 +619,7 @@ extern UNICODE_STRING ObpDosDevicesShortName; extern WCHAR ObpUnsecureGlobalNamesBuffer[128]; extern ULONG ObpUnsecureGlobalNamesLength; extern ULONG ObpObjectSecurityMode; +extern ULONG ObpProtectionMode; // // Inlined Functions diff --git a/ntoskrnl/ob/obinit.c b/ntoskrnl/ob/obinit.c index fece62e45a3..5ae4e731244 100644 --- a/ntoskrnl/ob/obinit.c +++ b/ntoskrnl/ob/obinit.c @@ -53,6 +53,7 @@ PsInitializeQuotaSystem(VOID); ULONG ObpInitializationPhase; ULONG ObpObjectSecurityMode = 0; +ULONG ObpProtectionMode = 0; /* PRIVATE FUNCTIONS *********************************************************/
5 years, 7 months
1
0
0
0
[reactos] 01/01: [NET] Start parsing the /times option of the USER command.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=611e6d7d0e1b080a31a17…
commit 611e6d7d0e1b080a31a1757bf1f59419584bc946 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Mon May 20 22:35:11 2019 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Mon May 20 22:36:10 2019 +0200 [NET] Start parsing the /times option of the USER command. Only '/times:' and '/times:all' are accepted yet. --- base/applications/network/net/cmdUser.c | 69 +++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/base/applications/network/net/cmdUser.c b/base/applications/network/net/cmdUser.c index 314a8b28e74..81506ea6cec 100644 --- a/base/applications/network/net/cmdUser.c +++ b/base/applications/network/net/cmdUser.c @@ -809,6 +809,53 @@ ParseDate( } +static +DWORD +ParseLogonHours( + PWSTR pszParams, + PBYTE *ppLogonHours, + PDWORD pdwUnitsPerWeek) +{ + PBYTE pLogonHours = NULL; + DWORD dwError = ERROR_SUCCESS; + + pLogonHours = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + UNITS_PER_WEEK / 8); + if (pLogonHours == NULL) + return ERROR_OUTOFMEMORY; + + if (*pszParams == UNICODE_NULL) + { + goto done; + } + + if (wcsicmp(pszParams, L"all") == 0) + { + FillMemory(pLogonHours, UNITS_PER_WEEK / 8, 0xFF); + goto done; + } + + /* FIXME */ + /* Mockup error because we do not parse the line yet */ + dwError = 3768; + +done: + if (dwError == ERROR_SUCCESS) + { + *ppLogonHours = pLogonHours; + *pdwUnitsPerWeek = UNITS_PER_WEEK; + } + else + { + if (pLogonHours != NULL) + HeapFree(GetProcessHeap(), 0, pLogonHours); + } + + return dwError; +} + + INT cmdUser( INT argc, @@ -831,6 +878,8 @@ cmdUser( LPWSTR endptr; DWORD value; BOOL bPasswordAllocated = FALSE; + PBYTE pLogonHours = NULL; + DWORD dwUnitsPerWeek; NET_API_STATUS Status; i = 2; @@ -884,7 +933,7 @@ cmdUser( ConPrintf(StdOut, L"Status: %lu\n", Status); return 0; } - else if (lpUserName != NULL && lpPassword == NULL) + else if (lpUserName != NULL && lpPassword == NULL && argc == 3) { Status = DisplayUser(lpUserName); ConPrintf(StdOut, L"Status: %lu\n", Status); @@ -1039,8 +1088,19 @@ cmdUser( } else if (_wcsnicmp(argv[j], L"/times:", 7) == 0) { - /* FIXME */ - ConPuts(StdErr, L"The /TIMES option is not supported yet.\n"); + Status = ParseLogonHours(&argv[j][7], + &pLogonHours, + &dwUnitsPerWeek); + if (Status == ERROR_SUCCESS) + { + pUserInfo->usri4_logon_hours = pLogonHours; + pUserInfo->usri4_units_per_week = dwUnitsPerWeek; + } + else + { + PrintMessageString(Status); + goto done; + } } else if (_wcsnicmp(argv[j], L"/usercomment:", 13) == 0) { @@ -1105,6 +1165,9 @@ cmdUser( } done: + if (pLogonHours != NULL) + HeapFree(GetProcessHeap(), 0, pLogonHours); + if (pWorkstations != NULL) HeapFree(GetProcessHeap(), 0, pWorkstations);
5 years, 7 months
1
0
0
0
[reactos] 01/01: [HIVESYS] Add missing UpperFilters for mouse and keyboard classes
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=63286c6bbc300c55a3b01…
commit 63286c6bbc300c55a3b0120d37a637ec25a8fe44 Author: Victor Perevertkin <victor(a)perevertkin.ru> AuthorDate: Mon May 20 01:28:33 2019 +0300 Commit: Victor Perevertkin <victor(a)perevertkin.ru> CommitDate: Mon May 20 01:28:33 2019 +0300 [HIVESYS] Add missing UpperFilters for mouse and keyboard classes --- boot/bootdata/hivesys.inf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boot/bootdata/hivesys.inf b/boot/bootdata/hivesys.inf index 081352fc6dd..0f2fc9369eb 100644 --- a/boot/bootdata/hivesys.inf +++ b/boot/bootdata/hivesys.inf @@ -348,12 +348,14 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE103 HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-3" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"SysSetup.Dll,KeyboardClassInstaller" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","UpperFilters",0x00010000,"kbdclass" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Mouse" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"Mouse" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-2" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"SysSetup.Dll,MouseClassInstaller" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1" +HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","UpperFilters",0x00010000,"mouclass" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Client" HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetClient"
5 years, 7 months
1
0
0
0
[reactos] 01/01: [CONSOLE][CONCFG][CONSRV] Provide support for specified additional TrueType fonts + bugfixes. CORE-12451 CORE-13182 CORE-13196
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c4e2826c73bb13ea9cdf6…
commit c4e2826c73bb13ea9cdf6a9178f93866ab6db00f Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun May 19 22:55:14 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun May 19 23:10:41 2019 +0200 [CONSOLE][CONCFG][CONSRV] Provide support for specified additional TrueType fonts + bugfixes. CORE-12451 CORE-13182 CORE-13196 - CONSOLE: Initialize the additional TrueType fonts cache. * Fix the font preview when a TrueType font has been selected. * Refresh the available fonts and the font preview when the selected code page is changed (Work In Progress), or when the OS pool of font resources has changed (WM_FONTCHANGE message). - CONCFG: Implement support for the additional TrueType fonts cache: the contents of the cache is enumerated under the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont * Add helper functions and macros. * In CreateConsoleFontEx(), set the mandatory font pitch&family flags and remove those that we do not support. * In IsValidConsoleFont2(), update the validity checks and the documentation links. - CONSRV: Load/refresh the additional TrueType fonts cache when needed. --- dll/cpl/console/console.c | 12 +- dll/cpl/console/console.h | 17 ++ dll/cpl/console/font.c | 169 ++++++++---- dll/cpl/console/layout.c | 6 + dll/cpl/console/options.c | 20 +- win32ss/user/winsrv/concfg/font.c | 293 ++++++++++++++++++--- win32ss/user/winsrv/concfg/font.h | 71 ++++- win32ss/user/winsrv/concfg/precomp.h | 3 +- win32ss/user/winsrv/consrv/frontends/gui/conwnd.c | 2 +- .../user/winsrv/consrv/frontends/gui/guisettings.c | 4 +- win32ss/user/winsrv/consrv/frontends/gui/guiterm.c | 10 +- 11 files changed, 498 insertions(+), 109 deletions(-) diff --git a/dll/cpl/console/console.c b/dll/cpl/console/console.c index 89e9ac57fb3..09c204c630c 100644 --- a/dll/cpl/console/console.c +++ b/dll/cpl/console/console.c @@ -227,11 +227,9 @@ InitApplet(HANDLE hSectionOrWnd) InitDefaultConsoleInfo(ConInfo); } - /* Initialize the font support */ - FontPreview.hFont = CreateConsoleFont(ConInfo); - if (FontPreview.hFont == NULL) - DPRINT1("InitApplet: CreateConsoleFont() failed\n"); - GetFontCellSize(NULL, FontPreview.hFont, &FontPreview.CharHeight, &FontPreview.CharWidth); + /* Initialize the font support -- additional TrueType fonts cache and current preview font */ + InitTTFontCache(); + RefreshFontPreview(&FontPreview, ConInfo); /* Initialize the property sheet structure */ ZeroMemory(&psh, sizeof(psh)); @@ -274,8 +272,8 @@ InitApplet(HANDLE hSectionOrWnd) UnRegisterWinPrevClass(hApplet); /* Clear the font support */ - if (FontPreview.hFont) DeleteObject(FontPreview.hFont); - FontPreview.hFont = NULL; + ResetFontPreview(&FontPreview); + ClearTTFontCache(); /* Save the console settings */ if (SetConsoleInfo) diff --git a/dll/cpl/console/console.h b/dll/cpl/console/console.h index 0f7b5924943..fbd7a81368d 100644 --- a/dll/cpl/console/console.h +++ b/dll/cpl/console/console.h @@ -49,6 +49,23 @@ extern FONT_PREVIEW FontPreview; VOID ApplyConsoleInfo(HWND hwndDlg); + +VOID +RefreshFontPreview( + IN FONT_PREVIEW* Preview, + IN PCONSOLE_STATE_INFO pConInfo); + +VOID +UpdateFontPreview( + IN FONT_PREVIEW* Preview, + IN HFONT hFont, + IN UINT CharWidth, + IN UINT CharHeight); + +#define ResetFontPreview(Preview) \ + UpdateFontPreview((Preview), NULL, 0, 0) + + /* Preview Windows */ BOOL RegisterWinPrevClass( diff --git a/dll/cpl/console/font.c b/dll/cpl/console/font.c index 66c9cc6a417..522a6fbaaf4 100644 --- a/dll/cpl/console/font.c +++ b/dll/cpl/console/font.c @@ -45,6 +45,31 @@ static INT CurrentSelFont = LB_ERR; static DWORD CurrentFontType = (DWORD)-1; // Invalid font type +VOID +RefreshFontPreview( + IN FONT_PREVIEW* Preview, + IN PCONSOLE_STATE_INFO pConInfo) +{ + if (Preview->hFont) DeleteObject(Preview->hFont); + Preview->hFont = CreateConsoleFont(pConInfo); + if (Preview->hFont == NULL) + DPRINT1("RefreshFontPreview: CreateConsoleFont() failed\n"); + GetFontCellSize(NULL, Preview->hFont, &Preview->CharHeight, &Preview->CharWidth); +} + +VOID +UpdateFontPreview( + IN FONT_PREVIEW* Preview, + IN HFONT hFont, + IN UINT CharWidth, + IN UINT CharHeight) +{ + if (Preview->hFont) DeleteObject(Preview->hFont); + Preview->hFont = hFont; + Preview->CharWidth = CharWidth; + Preview->CharHeight = CharHeight; +} + // PLIST_GETCOUNT static INT RasterSizeList_GetCount( @@ -284,13 +309,6 @@ EnumFaceNamesProc( { PFACE_NAMES_PROC_PARAM Param = (PFACE_NAMES_PROC_PARAM)lParam; - /* - * To install additional TrueType fonts to be available for the console, - * add entries of type REG_SZ named "0", "00" etc... in: - * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont - * The names of the fonts listed there should match those in: - * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts - */ if (IsValidConsoleFont2(lplf, lpntm, FontType, Param->CodePage)) { /* Add the font to the list */ @@ -374,7 +392,7 @@ FaceNameList_Initialize( ZeroMemory(&lf, sizeof(lf)); lf.lfCharSet = DEFAULT_CHARSET; // CodePageToCharSet(CodePage); - // lf.lfPitchAndFamily = FIXED_PITCH | FF_DONTCARE; + // lf.lfPitchAndFamily = FIXED_PITCH | FF_MODERN; hDC = GetDC(NULL); EnumFontFamiliesExW(hDC, &lf, (FONTENUMPROCW)EnumFaceNamesProc, (LPARAM)&Param, 0); @@ -397,9 +415,14 @@ FaceNameList_Initialize( } static VOID -FaceNameList_SelectFaceName( +FaceNameList_SelectFont( + IN HWND hDlg, IN HWND hWndList, - IN LPCWSTR FaceName) + IN PFONTSIZE_LIST_CTL SizeList, + IN LPCWSTR FaceName, + IN ULONG FontFamily, + IN ULONG FontWeight, + IN COORD FontSize) { INT iItem; @@ -410,6 +433,21 @@ FaceNameList_SelectFaceName( iItem = 0; SendMessageW(hWndList, LB_SETCURSEL, (WPARAM)iItem, 0); + if (FontWeight >= FW_BOLD) + CheckDlgButton(hDlg, IDC_CHECK_BOLD_FONTS, BST_CHECKED); + else + CheckDlgButton(hDlg, IDC_CHECK_BOLD_FONTS, BST_UNCHECKED); + + /* Select the current font size */ + /* + * Format: + * Width = FontSize.X = LOWORD(FontSize); + * Height = FontSize.Y = HIWORD(FontSize); + */ + SizeList->CurrentRasterSize = MAKELONG(FontSize.X, FontSize.Y); + SizeList->CurrentTTSize = FontSize.Y; + // FontSizeList_SelectFontSize(SizeList, SizeList->CurrentRasterSize); + // return iItem; } @@ -486,7 +524,6 @@ FontTypeChange( { HWND hListBox = GetDlgItem(hDlg, IDC_LBOX_FONTTYPE); INT Length, nSel; - LOGFONTW lf; LPWSTR FaceName; DWORD FontType; LPCWSTR FontGrpBoxLabelTpl = NULL; @@ -518,12 +555,7 @@ FontTypeChange( FaceName[Length] = L'\0'; StringCchCopyW(pConInfo->FaceName, ARRAYSIZE(pConInfo->FaceName), FaceName); - DPRINT1("pConInfo->FaceName = '%S'\n", pConInfo->FaceName); - - ZeroMemory(&lf, sizeof(lf)); - lf.lfCharSet = DEFAULT_CHARSET; // CodePageToCharSet(pConInfo->CodePage); - // lf.lfPitchAndFamily = FIXED_PITCH | FF_DONTCARE; - StringCchCopyW(lf.lfFaceName, ARRAYSIZE(lf.lfFaceName), FaceName); + DPRINT("pConInfo->FaceName = '%S'\n", pConInfo->FaceName); /* * Retrieve the read-only font group box label string template, @@ -560,6 +592,7 @@ FontTypeChange( if ((CurrentFontType != FontType) || (FontType == RASTER_FONTTYPE && CurrentSelFont != nSel)) { + LOGFONTW lf; HDC hDC; if (SizeList->UseRasterOrTTList) @@ -567,6 +600,11 @@ FontTypeChange( else SendMessageW(SizeList->hWndTTSizeList, CB_RESETCONTENT, 0, 0); + ZeroMemory(&lf, sizeof(lf)); + lf.lfCharSet = DEFAULT_CHARSET; // CodePageToCharSet(pConInfo->CodePage); + // lf.lfPitchAndFamily = FIXED_PITCH | FF_MODERN; + StringCchCopyW(lf.lfFaceName, ARRAYSIZE(lf.lfFaceName), pConInfo->FaceName); + hDC = GetDC(NULL); EnumFontFamiliesExW(hDC, &lf, (FONTENUMPROCW)EnumFontSizesProc, (LPARAM)SizeList, 0); ReleaseDC(NULL, hDC); @@ -597,7 +635,9 @@ FontSizeChange( IN PFONTSIZE_LIST_CTL SizeList, IN OUT PCONSOLE_STATE_INFO pConInfo) { - LONG FontSize, CharWidth, CharHeight; + LONG FontSize; + UINT CharWidth, CharHeight; + HFONT hFont; WCHAR szFontSize[100]; /* @@ -610,35 +650,44 @@ FontSizeChange( if (FontSize == 0) return FALSE; // We have got an invalid font size... - CharHeight = (SizeList->UseRasterOrTTList ? (LONG)HIWORD(FontSize) : FontSize); - CharWidth = (SizeList->UseRasterOrTTList ? (LONG)LOWORD(FontSize) : 0); + /* + * For TrueType fonts we set the requested width to zero + * so as to obtain a default aspect-ratio width. + */ + CharHeight = (UINT)(SizeList->UseRasterOrTTList ? HIWORD(FontSize) : FontSize); + CharWidth = (UINT)(SizeList->UseRasterOrTTList ? LOWORD(FontSize) : 0); - if (FontPreview.hFont) DeleteObject(FontPreview.hFont); - FontPreview.hFont = CreateConsoleFont2(CharHeight, CharWidth, pConInfo); - if (FontPreview.hFont == NULL) + hFont = CreateConsoleFont2((LONG)CharHeight, (LONG)CharWidth, pConInfo); + if (hFont == NULL) DPRINT1("FontSizeChange: CreateConsoleFont2() failed\n"); /* Retrieve the real character size in pixels */ - GetFontCellSize(NULL, FontPreview.hFont, &FontPreview.CharHeight, &FontPreview.CharWidth); + GetFontCellSize(NULL, hFont, &CharHeight, &CharWidth); + + /* + * Update the font preview as well, and store the font handle. It will be + * freed at later update or when the font preview is refreshed or reset. + * For TrueType fonts, the preview will show the actual character width. + */ + UpdateFontPreview(&FontPreview, hFont, CharWidth, CharHeight); /* * Format: * Width = FontSize.X = LOWORD(FontSize); * Height = FontSize.Y = HIWORD(FontSize); */ - pConInfo->FontSize.X = (SHORT)(SizeList->UseRasterOrTTList ? FontPreview.CharWidth : 0); - pConInfo->FontSize.Y = (SHORT)FontPreview.CharHeight; + pConInfo->FontSize.X = (SHORT)(SizeList->UseRasterOrTTList ? CharWidth : 0); + pConInfo->FontSize.Y = (SHORT)CharHeight; - DPRINT1("pConInfo->FontSize = (%d x %d) ; (CharWidth x CharHeight) = (%d x %d)\n", - pConInfo->FontSize.X, pConInfo->FontSize.Y, - FontPreview.CharWidth, FontPreview.CharHeight); + DPRINT("pConInfo->FontSize = (%d x %d) ; (CharWidth x CharHeight) = (%d x %d)\n", + pConInfo->FontSize.X, pConInfo->FontSize.Y, CharWidth, CharHeight); InvalidateRect(GetDlgItem(hDlg, IDC_STATIC_FONT_WINDOW_PREVIEW), NULL, TRUE); InvalidateRect(GetDlgItem(hDlg, IDC_STATIC_SELECT_FONT_PREVIEW), NULL, TRUE); - StringCchPrintfW(szFontSize, ARRAYSIZE(szFontSize), L"%d", FontPreview.CharWidth); + StringCchPrintfW(szFontSize, ARRAYSIZE(szFontSize), L"%d", CharWidth); SetDlgItemText(hDlg, IDC_FONT_SIZE_X, szFontSize); - StringCchPrintfW(szFontSize, ARRAYSIZE(szFontSize), L"%d", FontPreview.CharHeight); + StringCchPrintfW(szFontSize, ARRAYSIZE(szFontSize), L"%d", CharHeight); SetDlgItemText(hDlg, IDC_FONT_SIZE_Y, szFontSize); return TRUE; @@ -689,22 +738,12 @@ FontProc(HWND hDlg, /* Select the current font */ DPRINT1("ConInfo->FaceName = '%S'\n", ConInfo->FaceName); - FaceNameList_SelectFaceName(hFontList, ConInfo->FaceName); - - if (ConInfo->FontWeight >= FW_BOLD) - CheckDlgButton(hDlg, IDC_CHECK_BOLD_FONTS, BST_CHECKED); - else - CheckDlgButton(hDlg, IDC_CHECK_BOLD_FONTS, BST_UNCHECKED); - - /* Select the current font size */ - /* - * Format: - * Width = FontSize.X = LOWORD(FontSize); - * Height = FontSize.Y = HIWORD(FontSize); - */ - SizeList->CurrentRasterSize = MAKELONG(ConInfo->FontSize.X, ConInfo->FontSize.Y); - SizeList->CurrentTTSize = ConInfo->FontSize.Y; - // FontSizeList_SelectFontSize(SizeList, SizeList->CurrentRasterSize); + FaceNameList_SelectFont(hDlg, hFontList, + SizeList, + ConInfo->FaceName, + ConInfo->FontFamily, + ConInfo->FontWeight, + ConInfo->FontSize); /* Refresh everything */ FontTypeChange(hDlg, SizeList, ConInfo); @@ -737,6 +776,42 @@ FontProc(HWND hDlg, break; } +#if 0 + case PSM_QUERYSIBLINGS: + { + /* + * If this is a notification from the "Options" dialog because we + * changed the code page, treat it using the WM_FONTCHANGE case, + * otherwise ignore it. + */ + if (wParam != IDL_CODEPAGE) + return FALSE; + + /* Fall through */ + } +#endif + + case WM_FONTCHANGE: + { + /* The pool of font resources has changed, re-enumerate the fonts */ + HWND hFontList = GetDlgItem(hDlg, IDC_LBOX_FONTTYPE); + + /* Initialize the font list */ + FaceNameList_Initialize(hFontList, ConInfo->CodePage); + + /* Select the current font */ + FaceNameList_SelectFont(hDlg, hFontList, + SizeList, + ConInfo->FaceName, + ConInfo->FontFamily, + ConInfo->FontWeight, + ConInfo->FontSize); + + /* Refresh everything */ + FontTypeChange(hDlg, SizeList, ConInfo); + break; + } + case WM_NOTIFY: { switch (((LPNMHDR)lParam)->code) diff --git a/dll/cpl/console/layout.c b/dll/cpl/console/layout.c index f8d998625c3..a94bcb53241 100644 --- a/dll/cpl/console/layout.c +++ b/dll/cpl/console/layout.c @@ -203,6 +203,9 @@ WinPrev_OnDraw( * Compute the console window layout */ + if (FontPreview.hFont == NULL) + RefreshFontPreview(&FontPreview, pConInfo); + /* We start with the console client area, rescaled for the preview */ SetRect(&rcWin, 0, 0, pConInfo->WindowSize.X * FontPreview.CharWidth, @@ -489,6 +492,9 @@ PaintText( hBrush = CreateSolidBrush(nbkColor); if (!hBrush) return; + if (FontPreview.hFont == NULL) + RefreshFontPreview(&FontPreview, pConInfo); + hOldFont = SelectObject(drawItem->hDC, FontPreview.hFont); //if (hOldFont == NULL) //{ diff --git a/dll/cpl/console/options.c b/dll/cpl/console/options.c index 689553d516b..e35a2479439 100644 --- a/dll/cpl/console/options.c +++ b/dll/cpl/console/options.c @@ -72,7 +72,8 @@ AddCodePage( static VOID BuildCodePageList( - IN HWND hDlg) + IN HWND hDlg, + IN UINT CurrentCodePage) { LIST_CTL ListCtl; HKEY hKey; @@ -126,7 +127,7 @@ BuildCodePageList( AddCodePage(&ListCtl, CP_UTF8); /* Find and select the current code page in the sorted list */ - if (BisectListSortedByValue(&ListCtl, ConInfo->CodePage, &CodePage, FALSE) == CB_ERR || + if (BisectListSortedByValue(&ListCtl, CurrentCodePage, &CodePage, FALSE) == CB_ERR || CodePage == CB_ERR) { /* Not found, select the first element */ @@ -212,7 +213,7 @@ OptionsProc(HWND hDlg, { case WM_INITDIALOG: { - BuildCodePageList(hDlg); + BuildCodePageList(hDlg, ConInfo->CodePage); UpdateDialogElements(hDlg, ConInfo); return TRUE; } @@ -332,6 +333,7 @@ OptionsProc(HWND hDlg, } } else + // (HIWORD(wParam) == CBN_KILLFOCUS) if ((HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_SELENDOK) && (LOWORD(wParam) == IDL_CODEPAGE)) { @@ -347,11 +349,15 @@ OptionsProc(HWND hDlg, if (CodePage == CB_ERR) break; - ConInfo->CodePage = CodePage; - - /* Change the property sheet state only if the user validated */ - if (HIWORD(wParam) == CBN_SELENDOK) + /* If the user validated a different code page... */ + if ((HIWORD(wParam) == CBN_SELENDOK) && (CodePage != ConInfo->CodePage)) + { + /* ... update the code page, notify the siblings and change the property sheet state */ + ConInfo->CodePage = CodePage; + // PropSheet_QuerySiblings(GetParent(hDlg), IDL_CODEPAGE, 0); + ResetFontPreview(&FontPreview); PropSheet_Changed(GetParent(hDlg), hDlg); + } } break; diff --git a/win32ss/user/winsrv/concfg/font.c b/win32ss/user/winsrv/concfg/font.c index fdc4e15f84b..6aa75b074e0 100644 --- a/win32ss/user/winsrv/concfg/font.c +++ b/win32ss/user/winsrv/concfg/font.c @@ -20,6 +20,11 @@ #include <debug.h> +/* GLOBALS ********************************************************************/ + +// RTL_STATIC_LIST_HEAD(TTFontCache); +LIST_ENTRY TTFontCache = {&TTFontCache, &TTFontCache}; + /* FUNCTIONS ******************************************************************/ /* Retrieves the character set associated with a given code page */ @@ -58,7 +63,10 @@ CreateConsoleFontEx( lf.lfOutPrecision = OUT_DEFAULT_PRECIS; lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; lf.lfQuality = DEFAULT_QUALITY; - lf.lfPitchAndFamily = (BYTE)(FIXED_PITCH | FontFamily); + + /* Set the mandatory flags and remove those that we do not support */ + lf.lfPitchAndFamily = (BYTE)( (FIXED_PITCH | FF_MODERN | FontFamily) & + ~(VARIABLE_PITCH | FF_DECORATIVE | FF_ROMAN | FF_SCRIPT | FF_SWISS)); if (!IsValidConsoleFont(FaceName, CodePage)) StringCchCopyW(FaceName, LF_FACESIZE, L"Terminal"); @@ -179,13 +187,10 @@ IsValidConsoleFont2( { LPCWSTR FaceName = lplf->lfFaceName; - /* Record the font's attributes (Fixedwidth and Truetype) */ - // BOOL fFixed = ((lplf->lfPitchAndFamily & 0x03) == FIXED_PITCH); - // BOOL fTrueType = (lplf->lfOutPrecision == OUT_STROKE_PRECIS); - /* - * According to:
http://support.microsoft.com/kb/247815
- * the criteria for console-eligible fonts are: + * According to:
https://web.archive.org/web/20140901124501/http://support.microsoft.com/kb/…
+ * "Necessary criteria for fonts to be available in a command window", + * the criteria for console-eligible fonts are as follows: * - The font must be a fixed-pitch font. * - The font cannot be an italic font. * - The font cannot have a negative A or C space. @@ -198,6 +203,10 @@ IsValidConsoleFont2( * - If it is not a TrueType font, the face name must be "Terminal". * - If it is an Asian TrueType font, it must also be an Asian character set. * + * See also Raymond Chen's blog:
https://devblogs.microsoft.com/oldnewthing/?p=26843
+ * and MIT-licensed Microsoft Terminal source code:
https://github.com/microsoft/Terminal/blob/master/src/propsheet/misc.cpp
+ * for other details. + * * To install additional TrueType fonts to be available for the console, * add entries of type REG_SZ named "0", "00" etc... in: * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont @@ -205,27 +214,30 @@ IsValidConsoleFont2( * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts */ - /* - * In ReactOS we relax some of the criteria: - * - We allow fixed-pitch FF_MODERN (Monospace) TrueType fonts - * that can be italic or have negative A or C space. - * - If it is not a TrueType font, it can be from another character set - * than OEM_CHARSET. - * - We do not look into the magic registry key mentioned above. - */ - - /* Reject variable width fonts */ - if (((lplf->lfPitchAndFamily & 0x03) != FIXED_PITCH) -#if 0 /* Reject italic and TrueType fonts with negative A or C space */ - || (lplf->lfItalic) - || !(lpntm->ntmFlags & NTM_NONNEGATIVE_AC) + /* + * In ReactOS we relax some of the criteria: + * - We allow fixed-pitch FF_MODERN (Monospace) TrueType fonts + * that can be italic or have negative A or C space. + * - If it is not a TrueType font, it can be from another character set + * than OEM_CHARSET. When an Asian codepage is active however, we require + * that this non-TrueType font has an Asian character set. + */ + + /* Reject variable-width fonts ... */ + if ( ( ((lplf->lfPitchAndFamily & 0x03) != FIXED_PITCH) +#if 0 /* Reject italic and TrueType fonts with negative A or C space ... */ + || (lplf->lfItalic) + || !(lpntm->ntmFlags & NTM_NONNEGATIVE_AC) #endif - ) + ) && + /* ... if they are not in the list of additional TrueType fonts to include */ + !IsAdditionalTTFont(FaceName) ) { - DPRINT1("Font '%S' rejected because it%s (lfPitchAndFamily = %d).\n", - FaceName, !(lplf->lfPitchAndFamily & FIXED_PITCH) ? "'s not FIXED_PITCH" - : (!(lpntm->ntmFlags & NTM_NONNEGATIVE_AC) ? " has negative A or C space" - : " is broken"), + DPRINT1("Font '%S' rejected because it%s (lfPitchAndFamily = %d)\n", + FaceName, + !(lplf->lfPitchAndFamily & FIXED_PITCH) ? "'s not FIXED_PITCH" + : (!(lpntm->ntmFlags & NTM_NONNEGATIVE_AC) ? " has negative A or C space" + : " is broken"), lplf->lfPitchAndFamily); return FALSE; } @@ -238,25 +250,66 @@ IsValidConsoleFont2( return FALSE; } + /* Reject vertical fonts (tategaki) */ + if (FaceName[0] == L'@') + { + DPRINT1("Font '%S' rejected because it's vertical\n", FaceName); + return FALSE; + } + /* Is the current code page Chinese, Japanese or Korean? */ if (IsCJKCodePage(CodePage)) { - /* It's Asian */ + /* It's CJK */ + if (FontType == TRUETYPE_FONTTYPE) { - if (lplf->lfCharSet != CodePageToCharSet(CodePage)) + /* + * Here we are inclusive and check for any CJK character set, + * instead of looking just at the current one via CodePageToCharSet(). + */ + if (!IsCJKCharSet(lplf->lfCharSet) +#if 1 // FIXME: Temporary HACK! + && wcscmp(FaceName, L"Terminal") != 0 +#endif + ) { - DPRINT1("TrueType font '%S' rejected because it's not user Asian charset (lfCharSet = %d)\n", + DPRINT1("TrueType font '%S' rejected because it's not Asian charset (lfCharSet = %d)\n", + FaceName, lplf->lfCharSet); + return FALSE; + } + + /* + * If this is a cached TrueType font that is used only for certain + * code pages, verify that the charset it claims is the correct one. + * + * Since there may be multiple entries for a cached TrueType font, + * a general one (code page == 0) and one or more for explicit + * code pages, we need to perform two search queries instead of + * just one and retrieving the code page for this entry. + */ + if (IsAdditionalTTFont(FaceName) && !IsAdditionalTTFontCP(FaceName, 0) && + !IsCJKCharSet(lplf->lfCharSet)) + { + DPRINT1("Cached TrueType font '%S' rejected because it claims a code page that is not Asian charset (lfCharSet = %d)\n", FaceName, lplf->lfCharSet); return FALSE; } } else { + /* Reject non-TrueType fonts that do not have an Asian character set */ + if (!IsCJKCharSet(lplf->lfCharSet) && (lplf->lfCharSet != OEM_CHARSET)) + { + DPRINT1("Non-TrueType font '%S' rejected because it's not Asian charset or OEM_CHARSET (lfCharSet = %d)\n", + FaceName, lplf->lfCharSet); + return FALSE; + } + /* Reject non-TrueType fonts that are not Terminal */ if (wcscmp(FaceName, L"Terminal") != 0) { - DPRINT1("Non-TrueType font '%S' rejected because it's not Terminal\n", FaceName); + DPRINT1("Non-TrueType font '%S' rejected because it's not 'Terminal'\n", FaceName); return FALSE; } } @@ -264,6 +317,8 @@ IsValidConsoleFont2( else { /* Not CJK */ + + /* Reject non-TrueType fonts that are not OEM or similar */ if ((FontType != TRUETYPE_FONTTYPE) && (lplf->lfCharSet != ANSI_CHARSET) && (lplf->lfCharSet != DEFAULT_CHARSET) && @@ -275,13 +330,6 @@ IsValidConsoleFont2( } } - /* Reject fonts that are vertical (tategaki) */ - if (FaceName[0] == L'@') - { - DPRINT1("Font '%S' rejected because it's vertical\n", FaceName); - return FALSE; - } - /* All good */ return TRUE; } @@ -320,7 +368,7 @@ IsValidConsoleFont( RtlZeroMemory(&lf, sizeof(lf)); lf.lfCharSet = DEFAULT_CHARSET; // CodePageToCharSet(CodePage); - // lf.lfPitchAndFamily = FIXED_PITCH | FF_DONTCARE; + // lf.lfPitchAndFamily = FIXED_PITCH | FF_MODERN; StringCchCopyW(lf.lfFaceName, ARRAYSIZE(lf.lfFaceName), FaceName); hDC = GetDC(NULL); @@ -330,4 +378,173 @@ IsValidConsoleFont( return Param.IsValidFont; } +/* + * To install additional TrueType fonts to be available for the console, + * add entries of type REG_SZ named "0", "00" etc... in: + * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont + * The names of the fonts listed there should match those in: + * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts + * + * This function initializes the cache of the fonts listed there. + */ +VOID +InitTTFontCache(VOID) +{ + BOOLEAN Success; + HKEY hKeyTTFonts; // hKey; + DWORD dwNumValues = 0; + DWORD dwIndex; + DWORD dwType; + WCHAR szValueName[MAX_PATH]; + DWORD dwValueName; + WCHAR szValue[LF_FACESIZE] = L""; + DWORD dwValue; + PTT_FONT_ENTRY FontEntry; + PWCHAR pszNext = NULL; + UINT CodePage; + + if (!IsListEmpty(&TTFontCache)) + return; + // InitializeListHead(&TTFontCache); + + /* Open the key */ + // "\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Console\\TrueTypeFont" + Success = (RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Console\\TrueTypeFont", + 0, + KEY_READ, + &hKeyTTFonts) == ERROR_SUCCESS); + if (!Success) + return; + + /* Enumerate each value */ + if (RegQueryInfoKeyW(hKeyTTFonts, NULL, NULL, NULL, NULL, NULL, NULL, + &dwNumValues, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) + { + DPRINT("ConCfgReadUserSettings: RegQueryInfoKeyW failed\n"); + RegCloseKey(hKeyTTFonts); + return; + } + + for (dwIndex = 0; dwIndex < dwNumValues; dwIndex++) + { + dwValue = sizeof(szValue); + dwValueName = ARRAYSIZE(szValueName); + if (RegEnumValueW(hKeyTTFonts, dwIndex, szValueName, &dwValueName, NULL, &dwType, (BYTE*)szValue, &dwValue) != ERROR_SUCCESS) + { + DPRINT1("InitTTFontCache: RegEnumValueW failed, continuing...\n"); + continue; + } + /* Only (multi-)string values are supported */ + if ((dwType != REG_SZ) && (dwType != REG_MULTI_SZ)) + continue; + + /* The value name is a code page (in decimal), validate it */ + CodePage = wcstoul(szValueName, &pszNext, 10); + if (*pszNext) + continue; // Non-numerical garbage followed... + // IsValidCodePage(CodePage); + + FontEntry = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*FontEntry)); + if (!FontEntry) + { + DPRINT1("InitTTFontCache: Failed to allocate memory, continuing...\n"); + continue; + } + + FontEntry->CodePage = CodePage; + + pszNext = szValue; + + /* Check whether bold is disabled for this font */ + if (*pszNext == L'*') + { + FontEntry->DisableBold = TRUE; + ++pszNext; + } + else + { + FontEntry->DisableBold = FALSE; + } + + /* Copy the font name */ + StringCchCopyNW(FontEntry->FaceName, ARRAYSIZE(FontEntry->FaceName), + pszNext, wcslen(pszNext)); + + if (dwType == REG_MULTI_SZ) + { + /* There may be an alternate face name as the second string */ + pszNext += wcslen(pszNext) + 1; + + /* Check whether bold is disabled for this font */ + if (*pszNext == L'*') + { + FontEntry->DisableBold = TRUE; + ++pszNext; + } + // else, keep the original setting. + + /* Copy the alternate font name */ + StringCchCopyNW(FontEntry->FaceNameAlt, ARRAYSIZE(FontEntry->FaceNameAlt), + pszNext, wcslen(pszNext)); + } + + InsertTailList(&TTFontCache, &FontEntry->Entry); + } + + /* Close the key and quit */ + RegCloseKey(hKeyTTFonts); +} + +VOID +ClearTTFontCache(VOID) +{ + PLIST_ENTRY Entry; + PTT_FONT_ENTRY FontEntry; + + while (!IsListEmpty(&TTFontCache)) + { + Entry = RemoveHeadList(&TTFontCache); + FontEntry = CONTAINING_RECORD(Entry, TT_FONT_ENTRY, Entry); + RtlFreeHeap(RtlGetProcessHeap(), 0, FontEntry); + } + InitializeListHead(&TTFontCache); +} + +VOID +RefreshTTFontCache(VOID) +{ + ClearTTFontCache(); + InitTTFontCache(); +} + +PTT_FONT_ENTRY +FindCachedTTFont( + IN LPCWSTR FaceName, + IN UINT CodePage) +{ + PLIST_ENTRY Entry; + PTT_FONT_ENTRY FontEntry; + + /* Search for the font in the cache */ + for (Entry = TTFontCache.Flink; + Entry != &TTFontCache; + Entry = Entry->Flink) + { + FontEntry = CONTAINING_RECORD(Entry, TT_FONT_ENTRY, Entry); + + /* NOTE: The font face names are case-sensitive */ + if ((wcscmp(FontEntry->FaceName , FaceName) == 0) || + (wcscmp(FontEntry->FaceNameAlt, FaceName) == 0)) + { + /* Return a match if we don't look at the code pages, or when they match */ + if ((CodePage == INVALID_CP) || (CodePage == FontEntry->CodePage)) + { + return FontEntry; + } + } + } + return NULL; +} + /* EOF */ diff --git a/win32ss/user/winsrv/concfg/font.h b/win32ss/user/winsrv/concfg/font.h index 09b076aff80..ee1aa92736c 100644 --- a/win32ss/user/winsrv/concfg/font.h +++ b/win32ss/user/winsrv/concfg/font.h @@ -11,16 +11,50 @@ /* DEFINES ********************************************************************/ -#define CP_SHIFTJIS 932 // Japanese Shift-JIS -#define CP_HANGUL 949 // Korean Hangul -#define CP_GB2312 936 // Chinese Simplified (GB2312) -#define CP_BIG5 950 // Chinese Traditional (Big5) +#define INVALID_CP ((UINT)-1) + +#define CP_SHIFTJIS 932 // Japanese Shift-JIS +#define CP_HANGUL 949 // Korean Hangul/Wansung +#define CP_JOHAB 1361 // Korean Johab +#define CP_GB2312 936 // Chinese Simplified (GB2312) +#define CP_BIG5 950 // Chinese Traditional (Big5) /* IsFarEastCP(CodePage) */ #define IsCJKCodePage(CodePage) \ ((CodePage) == CP_SHIFTJIS || (CodePage) == CP_HANGUL || \ + /* (CodePage) == CP_JOHAB || */ \ (CodePage) == CP_BIG5 || (CodePage) == CP_GB2312) +#if !defined(_WINGDI_) || defined(NOGDI) +#define SHIFTJIS_CHARSET 128 +#define HANGEUL_CHARSET 129 +#define HANGUL_CHARSET 129 // HANGEUL_CHARSET +#if(WINVER >= 0x0400) +#define JOHAB_CHARSET 130 +#endif /* WINVER */ +#define GB2312_CHARSET 134 +#define CHINESEBIG5_CHARSET 136 +#endif /* !defined(_WINGDI_) || defined(NOGDI) */ + +/* IsAnyDBCSCharSet(CharSet) */ +#define IsCJKCharSet(CharSet) \ + ((CharSet) == SHIFTJIS_CHARSET || (CharSet) == HANGUL_CHARSET || \ + /* (CharSet) == JOHAB_CHARSET || */ \ + (CharSet) == GB2312_CHARSET || (CharSet) == CHINESEBIG5_CHARSET) + +#define IsBoldFont(Weight) \ + ((Weight) >= FW_SEMIBOLD) /* Sometimes, just > FW_MEDIUM */ + +typedef struct _TT_FONT_ENTRY +{ + LIST_ENTRY Entry; + UINT CodePage; + BOOL DisableBold; + WCHAR FaceName[LF_FACESIZE]; + WCHAR FaceNameAlt[LF_FACESIZE]; +} TT_FONT_ENTRY, *PTT_FONT_ENTRY; + + /* FUNCTIONS ******************************************************************/ BYTE @@ -65,4 +99,33 @@ IsValidConsoleFont( IN LPCWSTR FaceName, IN UINT CodePage); +/* + * To install additional TrueType fonts to be available for the console, + * add entries of type REG_SZ named "0", "00" etc... in: + * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont + * The names of the fonts listed there should match those in: + * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts + * + * This function initializes the cache of the fonts listed there. + */ +VOID +InitTTFontCache(VOID); + +VOID +ClearTTFontCache(VOID); + +VOID +RefreshTTFontCache(VOID); + +PTT_FONT_ENTRY +FindCachedTTFont( + IN LPCWSTR FaceName, + IN UINT CodePage); + +#define IsAdditionalTTFont(FaceName) \ + (FindCachedTTFont((FaceName), INVALID_CP) != NULL) + +#define IsAdditionalTTFontCP(FaceName, CodePage) \ + (FindCachedTTFont((FaceName), (CodePage)) != NULL) + /* EOF */ diff --git a/win32ss/user/winsrv/concfg/precomp.h b/win32ss/user/winsrv/concfg/precomp.h index cfa0519ca36..5f6ca4a333e 100644 --- a/win32ss/user/winsrv/concfg/precomp.h +++ b/win32ss/user/winsrv/concfg/precomp.h @@ -31,7 +31,8 @@ #include <ndk/obfuncs.h> #include <ndk/rtlfuncs.h> -#include <stdio.h> // for swprintf +#include <stdio.h> // For swprintf() +#include <stdlib.h> // For wcstoul() #include <strsafe.h> /* EOF */ diff --git a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c index 13f5da948f8..6e3603fa360 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c @@ -20,7 +20,7 @@ #define NDEBUG #include <debug.h> -#include "font.h" +#include "concfg/font.h" #include "guiterm.h" #include "resource.h" diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c b/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c index e317334790a..1ccee596beb 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c @@ -14,6 +14,7 @@ #define NDEBUG #include <debug.h> +#include "concfg/font.h" #include "guiterm.h" #include "guisettings.h" @@ -331,7 +332,8 @@ GuiApplyUserSettings(PGUI_CONSOLE_DATA GuiData, /* Set the terminal informations */ - /* Change the font */ + /* Refresh the additional TrueType fonts cache and change the font */ + RefreshTTFontCache(); InitFonts(GuiData, pConInfo->FaceName, pConInfo->FontFamily, diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c index c811c4c030c..afca59331a6 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c @@ -16,6 +16,7 @@ #define NDEBUG #include <debug.h> +#include "concfg/font.h" #include "guiterm.h" #include "resource.h" @@ -294,12 +295,15 @@ GuiInit(IN PCONSOLE_INIT_INFO ConsoleInitInfo, HANDLE hInputThread; CLIENT_ID ClientId; - /* - * Initialize and register the console window class, if needed. - */ + /* Perform one-time initialization */ if (!ConsInitialized) { + /* Initialize and register the console window class */ if (!RegisterConWndClass(ConSrvDllInstance)) return FALSE; + + /* Initialize the font support -- additional TrueType fonts cache */ + InitTTFontCache(); + ConsInitialized = TRUE; }
5 years, 7 months
1
0
0
0
[reactos] 01/01: [TRANSLATIONS] Update/Add Portuguese translations. (#1564)
by Jose Carlos Jesus
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=73d7fd1415ba21b9c9b47…
commit 73d7fd1415ba21b9c9b4714ca86058914cfd409e Author: Jose Carlos Jesus <zecarlos1957(a)hotmail.com> AuthorDate: Sat May 11 21:23:06 2019 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun May 19 17:04:47 2019 +0200 [TRANSLATIONS] Update/Add Portuguese translations. (#1564) Translations for: deskadp, deskmon, reactos/setup, usetup, syssetup. Co-Authored-By: Bișoc George <fraizeraust99(a)gmail.com> --- base/setup/reactos/lang/pt-BR.rc | 2 +- base/setup/reactos/lang/{pt-BR.rc => pt-PT.rc} | 32 +- base/setup/reactos/reactos.rc | 3 + base/setup/usetup/lang/pt-PT.h | 1983 ++++++++++++++++++++++++ base/setup/usetup/muilanguages.h | 12 +- dll/shellext/deskadp/deskadp.rc | 5 +- dll/shellext/deskadp/lang/pt-PT.rc | 48 + dll/shellext/deskmon/deskmon.rc | 5 +- dll/shellext/deskmon/lang/pt-PT.rc | 23 + dll/win32/syssetup/lang/pt-BR.rc | 2 +- dll/win32/syssetup/lang/{pt-BR.rc => pt-PT.rc} | 15 - dll/win32/syssetup/syssetup.rc | 3 + 12 files changed, 2092 insertions(+), 41 deletions(-) diff --git a/base/setup/reactos/lang/pt-BR.rc b/base/setup/reactos/lang/pt-BR.rc index 5a53820e07c..3c57520ed03 100644 --- a/base/setup/reactos/lang/pt-BR.rc +++ b/base/setup/reactos/lang/pt-BR.rc @@ -1,4 +1,4 @@ -LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL +LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU diff --git a/base/setup/reactos/lang/pt-BR.rc b/base/setup/reactos/lang/pt-PT.rc similarity index 78% copy from base/setup/reactos/lang/pt-BR.rc copy to base/setup/reactos/lang/pt-PT.rc index 5a53820e07c..3be5384f355 100644 --- a/base/setup/reactos/lang/pt-BR.rc +++ b/base/setup/reactos/lang/pt-PT.rc @@ -6,7 +6,7 @@ CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Bem-vindo(a) ao Assistente de Instalação do ReactOS", IDC_STARTTITLE, 115, 8, 195, 24 - LTEXT "Você não pode instalar o ReactOS diretamente deste CD! Por favor reinicie seu computador a partir deste CD para instalar o ReactOS.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Não pode instalar o ReactOS directamente deste CD! Por favor reinicie o computador a partir deste CD para instalar o ReactOS.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Clique em Finalizar para sair da Instalação.", IDC_STATIC, 115, 169, 195, 17 END @@ -16,9 +16,9 @@ CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" BEGIN AUTORADIOBUTTON "Instalar ReactOS", IDC_INSTALL, 7, 7, 277, 10, WS_GROUP | WS_TABSTOP - LTEXT "Install a new copy of ReactOS. This option does not keep your files, settings and programs. You can make changes to disks and partitions.", IDC_INSTALLTEXT, 18, 18, 269, 25, NOT WS_GROUP - AUTORADIOBUTTON "Reparar ou atualizar uma instalação do ReactOS", IDC_UPDATE, 7, 50, 277, 10 - LTEXT "Update or repair an installed copy of ReactOS. This option keeps your files, settings and programs. This option is only available if ReactOS is already installed on this computer.", IDC_UPDATETEXT, 18, 61, 269, 30, NOT WS_GROUP + LTEXT "Instalar uma nova cópia do ReactOS. Esta opção não preserva os ficheiros, definições ou programas existentes. Pode fazer alterações nos discos ou partições.", IDC_INSTALLTEXT, 18, 18, 269, 25, NOT WS_GROUP + AUTORADIOBUTTON "Reparar ou actualizar uma instalação do ReactOS", IDC_UPDATE, 7, 50, 277, 10 + LTEXT "Reparar ou actualizar uma instalação do ReactOS. Esta opção preserva os ficheiros, definições e programas existentes. Esta opção só está disponivel se o ReactOS já está instalado neste computador.", IDC_UPDATETEXT, 18, 61, 269, 30, NOT WS_GROUP LTEXT "Clique em Próximo para configurar os dispositivos.", IDC_STATIC, 7, 128, 297, 8 END @@ -27,10 +27,10 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "The ReactOS Setup can upgrade one of the available ReactOS installations listed below, or, if a ReactOS installation is damaged, the Setup program can attempt to repair it.", IDC_STATIC, 6, 6, 300, 18 + LTEXT "O ReactOS Setup pode actualizar uma das instalações disponíveis listadas abaixo, ou, reparar uma instalação danificada do ReactOS.", IDC_STATIC, 6, 6, 300, 18 CONTROL "", IDC_NTOSLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP, 6, 30, 303, 90 - PUSHBUTTON "&Do not upgrade", IDC_SKIPUPGRADE, 230, 128, 80, 14 - LTEXT "Click Next to upgrade the selected OS installation, or on 'Do not upgrade' to continue a new installation without upgrading.", IDC_STATIC, 7, 124, 222, 16 + PUSHBUTTON "&Nova inst.", IDC_SKIPUPGRADE, 230, 128, 80, 14 + LTEXT "Clique Avançar para actualizar a installation seleccionada, ou 'Nova instalação' para uma nova instalação.", IDC_STATIC, 7, 124, 222, 16 END IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 143 @@ -108,13 +108,13 @@ BEGIN EDITTEXT IDC_DISPLAY, 95, 52, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "Keyboard:", IDC_STATIC, 18, 65, 74, 11 EDITTEXT IDC_KEYBOARD, 95, 64, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Destination volume:", IDC_STATIC, 18, 77, 74, 11 + LTEXT "Volume:", IDC_STATIC, 18, 77, 74, 11 EDITTEXT IDC_DESTDRIVE, 95, 76, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Destination directory:", IDC_STATIC, 18, 89, 74, 11 + LTEXT "Directório de destino:", IDC_STATIC, 18, 89, 74, 11 EDITTEXT IDC_PATH, 95, 88, 210, 13, ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE | NOT WS_BORDER | NOT WS_TABSTOP - AUTOCHECKBOX "I confirm that all the installation settings are correct. I also acknowledge that\nReactOS is alpha-quality software and may break on my computer or corrupt my data.", + AUTOCHECKBOX "Confirmo que todas as definições de instalação estão correctas. I also acknowledge that\nReactOS is alpha-quality software and may break on my computer or corrupt my data.", IDC_CONFIRM_INSTALL, 7, 104, 303, 18, BS_MULTILINE - LTEXT "Please confirm that all the installation settings are correct,\nthen click on Install to start the installation process.", IDC_STATIC, 7, 124, 303, 18 + LTEXT "Por favor confirme que todas as definições de instalação estão correctas,\nde seguida clique em Instalar para iniciar o processo de instalação.", IDC_STATIC, 7, 124, 303, 18 END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 143 @@ -132,8 +132,8 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Completing the ReactOS Setup Wizard", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "A primeira etapa de Instalação do ReactOS foi efetuada com sucesso.", IDC_STATIC, 20, 50, 277, 10 + LTEXT "Finalizando o ReactOS Setup Wizard", IDC_FINISHTITLE, 115, 8, 195, 24 + LTEXT "A primeira etapa de Instalação do ReactOS foi efectuada com exito.", IDC_STATIC, 20, 50, 277, 10 LTEXT "Clique em Finalizar para reiniciar o computador.", IDC_STATIC, 20, 80, 277, 10 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 LTEXT "Se houver um CD no drive, remova-o. Após isto, clique em Finalizar para reiniciar o computador.", IDC_STATIC, 10, 180, 297, 20 @@ -146,16 +146,16 @@ BEGIN IDS_DEVICETITLE "Instalar dispositivos básicos" IDS_DEVICESUBTITLE "Definir as configurações de monitor e teclado." IDS_DRIVETITLE "Configurar a partição de instalação e pasta do sistema" - IDS_DRIVESUBTITLE "Preparando partição de instalação, pasta do sistema e boot loader." + IDS_DRIVESUBTITLE "A preparar a partição de instalação, pasta do sistema e boot loader." IDS_PROCESSTITLE "Preparar partição, copiar arquivos e configurar sistema" IDS_PROCESSSUBTITLE "Criar e formatar partição, copiar arquivos, instalar e configurar boot loader" IDS_RESTARTTITLE "Primeira etapa de instalação finalizada" IDS_RESTARTSUBTITLE "A primeira etapada da instalação foi completada, reinicie o computador para prosseguir com a segunda estapa" IDS_SUMMARYTITLE "Sumário de Instalação" IDS_SUMMARYSUBTITLE "Listar propriedades da instalação para verificação antes de aplicá-las na instalação dos despositivos" - IDS_ABORTSETUP "ReactOS não está totalmente instalado em seu computador. Se você sair da Instalação agora, você precisará executar o Instalador novamente para instalar o ReactOS. Tem certeza que deseja sair?" + IDS_ABORTSETUP "ReactOS não está totalmente instalado em seu computador. Se sair da Instalação agora, para instalar o ReactOS precisará executar o Instalador novamente . Tem certeza que deseja sair?" IDS_ABORTSETUP2 "Abortar instalação?" - IDS_NO_TXTSETUP_SIF "Unable to find 'txtsetup.sif'.\nSetup is unable to continue." + IDS_NO_TXTSETUP_SIF " 'txtsetup.sif' não foi encontrado.\n o programa de instalação não pode continuar." IDS_CAPTION "Instalação do ReactOS" END diff --git a/base/setup/reactos/reactos.rc b/base/setup/reactos/reactos.rc index fd2281782ee..b5b15d0cb53 100644 --- a/base/setup/reactos/reactos.rc +++ b/base/setup/reactos/reactos.rc @@ -81,6 +81,9 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "reactos.exe.manifest" #ifdef LANGUAGE_PT_BR #include "lang/pt-BR.rc" #endif +#ifdef LANGUAGE_PT_PT + #include "lang/pt-PT.rc" +#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif diff --git a/base/setup/usetup/lang/pt-PT.h b/base/setup/usetup/lang/pt-PT.h new file mode 100644 index 00000000000..19f2c904d8f --- /dev/null +++ b/base/setup/usetup/lang/pt-PT.h @@ -0,0 +1,1983 @@ +// This file is converted by code7bit. +// code7bit:
https://github.com/katahiromz/code7bit
+// To revert conversion, please execute "code7bit -r <file>". +#pragma once + +static MUI_ENTRY ptPTSetupInitPageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 0, + 20, + "Por favor aguarde enquanto o ReactOS Setup inicializa", + TEXT_STYLE_NORMAL | TEXT_ALIGN_CENTER + }, + { + 0, + 21, + "e detecta os seus dispositivos...", + TEXT_STYLE_NORMAL | TEXT_ALIGN_CENTER + }, + { + 0, + 0, + "Por favor aguarde...", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG, + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTLanguagePageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "Selec\207\306o do idioma", + TEXT_STYLE_NORMAL + }, + { + 8, + 10, + "\x07 Por favor, seleccione o idioma a ser utilizado durante a instala\207\306o.", + TEXT_STYLE_NORMAL + }, + { + 8, + 11, + "\x07 O idioma seleccionado ser\240 o idioma padr\306o do sistema.", + TEXT_STYLE_NORMAL + }, + { + 8, + 13, + " Pressione ENTER para continuar.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continuar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTWelcomePageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "Bem-vindo ao assist\210nte de instala\207\306o do ReactOS.", + TEXT_STYLE_HIGHLIGHT + }, + { + 6, + 11, + "Esta parte da instala\207\306o prepara o ReactOS para ser", + TEXT_STYLE_NORMAL + }, + { + 6, + 12, + "executado no seu computador.", + TEXT_STYLE_NORMAL + }, + { + 8, + 15, + "\x07 Pressione ENTER para instalar ou actualizar o ReactOS.", + TEXT_STYLE_NORMAL + }, + { + 8, + 17, + "\x07 Para reparar uma instala\207\306o do ReactOS, pressione R.", + TEXT_STYLE_NORMAL + }, + { + 8, + 19, + "\x07 Para ver os termos e condi\207\344es da licen\207a, pressione L.", + TEXT_STYLE_NORMAL + }, + { + 8, + 21, + "\x07 Para sair sem instalar o ReactOS, pressione F3.", + TEXT_STYLE_NORMAL + }, + { + 6, + 23, + "Para mais informa\207\344es sobre o ReactOS, visite o s\241tio:", + TEXT_STYLE_NORMAL + }, + { + 6, + 24, + "
http://www.reactos.org
", + TEXT_STYLE_HIGHLIGHT + }, + { + 0, + 0, + "ENTER=Continuar R=Reparar L=Licen\207a F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTIntroPageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "ReactOS Version Status", + TEXT_STYLE_HIGHLIGHT + }, + { + 6, + 11, + "ReactOS is in Alpha stage, meaning it is not feature-complete", + TEXT_STYLE_NORMAL + }, + { + 6, + 12, + "and is under heavy development. It is recommended to use it only for", + TEXT_STYLE_NORMAL + }, + { + 6, + 13, + "evaluation and testing purposes and not as your daily-usage OS.", + TEXT_STYLE_NORMAL + }, + { + 6, + 15, + "Backup your data or test on a secondary computer if you attempt", + TEXT_STYLE_NORMAL + }, + { + 6, + 16, + "to run ReactOS on real hardware.", + TEXT_STYLE_NORMAL + }, + { + 8, + 19, + "\x07 Pressione ENTER para continuar o ReactOS Setup.", + TEXT_STYLE_NORMAL + }, + { + 8, + 21, + "\x07 Pressione F3 para terminar sem instalar o ReactOS.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER = Continue F3 = Quit", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTLicensePageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 6, + "Licen\207a:", + TEXT_STYLE_HIGHLIGHT + }, + { + 8, + 8, + "O ReactOS est\240 licenciado sob os termos da licen\207a", + TEXT_STYLE_NORMAL + }, + { + 8, + 9, + "GNU GPL contendo partes de c\242digo licenciados sob outras", + TEXT_STYLE_NORMAL + }, + { + 8, + 10, + "licen\207as compat\241veis, como X11 ou BSD e GNU LGPL.", + TEXT_STYLE_NORMAL + }, + { + 8, + 11, + "Todo o software que faz parte do ReactOS \202 portanto, livre", + TEXT_STYLE_NORMAL + }, + { + 8, + 12, + "sob a licen\207a GNU GPL, bem como a manuten\207\306o da licen\207a", + TEXT_STYLE_NORMAL + }, + { + 8, + 13, + "original.", + TEXT_STYLE_NORMAL + }, + { + 8, + 15, + "Este software vem sem NENHUMA GARANTIA ou restri\207\306o de uso", + TEXT_STYLE_NORMAL + }, + { + 8, + 16, + "excepto onde leis locais e internacionais s\306o aplicaveis. A licen\207a", + TEXT_STYLE_NORMAL + }, + { + 8, + 17, + "do ReactOS abrange apenas a distribui\207\306o a terceiros.", + TEXT_STYLE_NORMAL + }, + { + 8, + 18, + "Se por alguma raz\306o n\306o recebeu uma c\242pia da licen\207a", + TEXT_STYLE_NORMAL + }, + { + 8, + 19, + "GNU General Public License com o ReactOS por favor visite", + TEXT_STYLE_NORMAL + }, + { + 8, + 20, + "
http://www.gnu.org/licenses/licenses.html
", + TEXT_STYLE_HIGHLIGHT + }, + { + 6, + 22, + "Garantia:", + TEXT_STYLE_HIGHLIGHT + }, + { + 8, + 24, + "Este \202 um software livre; veja o c\242digo fonte para condi\207\344es de c\242pia.", + TEXT_STYLE_NORMAL + }, + { + 8, + 25, + "N\307O h\240 garantia; nem mesmo para COMERCIALIZA\200\307O ou", + TEXT_STYLE_NORMAL + }, + { + 8, + 26, + "ADEQUA\200\307O PARA UM PROP\340SITO PARTICULAR", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Voltar", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTDevicePageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "A lista a seguir mostra a configura\207\344o de dispositivos actual.", + TEXT_STYLE_NORMAL + }, + { + 24, + 11, + "Computador:", + TEXT_STYLE_NORMAL | TEXT_ALIGN_RIGHT + }, + { + 24, + 12, + "V\241deo:", + TEXT_STYLE_NORMAL | TEXT_ALIGN_RIGHT + }, + { + 24, + 13, + "Teclado:", + TEXT_STYLE_NORMAL | TEXT_ALIGN_RIGHT + }, + { + 24, + 14, + "Tipo de teclado:", + TEXT_STYLE_NORMAL | TEXT_ALIGN_RIGHT + }, + { + 24, + 16, + "Confirmar:", + TEXT_STYLE_NORMAL | TEXT_ALIGN_RIGHT + }, + { + 25, + 16, "Aceitar esta configura\207\344o de dispositivos", + TEXT_STYLE_NORMAL + }, + { + 6, + 19, + "Use as teclas SETA PARA CIMA e SETA PARA BAIXO para mudar de op\207\306o.", + TEXT_STYLE_NORMAL + }, + { + 6, + 20, + "Para escolher uma configura\207\306o alternativa, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 6, + 22, + "Quanto finalizar os ajustes, seleccione \"Aceitar essas configura\207\344es", + TEXT_STYLE_NORMAL + }, + { + 6, + 23, + "de dispositivo\" e pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continuar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTRepairPageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "O instalador do ReactOS est\240 em fase inicial de desenvolvimento e", + TEXT_STYLE_NORMAL + }, + { + 6, + 9, + "ainda n\306o suporta todas as fun\207\344es de instala\207\306o.", + TEXT_STYLE_NORMAL + }, + { + 6, + 12, + "As fun\207\344es repara\207\306o ainda n\306o foram implementadas.", + TEXT_STYLE_NORMAL + }, + { + 8, + 15, + "\x07 Para actualizar o sistema operacional, pressione U.", + TEXT_STYLE_NORMAL + }, + { + 8, + 17, + "\x07 Para abrir a consola de recupera\207\306o, pressione R.", + TEXT_STYLE_NORMAL + }, + { + 8, + 19, + "\x07 Para voltar para a p\240gina principal, pressione ESC.", + TEXT_STYLE_NORMAL + }, + { + 8, + 21, + "\x07 Para reiniciar o computador, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ESC=P\240gina principal U=Atualizar R=Recuperar ENTER=Reiniciar", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTUpgradePageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "Com o ReactOS Setup pode actualizar uma das instala\207\344es dispon\241veis", + TEXT_STYLE_NORMAL + }, + { + 6, + 9, + "listadas abaixo, ou, se tem uma instala\207\306o do ReactOS corrompida, ", + TEXT_STYLE_NORMAL + }, + { + 6, + 10, + "pode tentar a sua recupera\207\306o.", + TEXT_STYLE_NORMAL + }, + { + 6, + 12, + "The repair functions are not all implemented yet.", + TEXT_STYLE_HIGHLIGHT + }, + { + 8, + 15, + "\x07 Pressione UP or DOWN para seleccionar uma das instala\207\344es.", + TEXT_STYLE_NORMAL + }, + { + 8, + 17, + "\x07 Pressione U para actualizar a instala\207\306o seleccionada.", + TEXT_STYLE_NORMAL + }, + { + 8, + 19, + "\x07 Pressione ESC para executar uma nova instala\207\306o.", + TEXT_STYLE_NORMAL + }, + { + 8, + 21, + "\x07 Pressione F3 para terminar sem instalar o ReactOS.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "U = Actualizar ESC = Não actualizar F3 = Terminar", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTComputerPageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "A lista a seguir mostra os tipos de computadores dispon\241veis", + TEXT_STYLE_NORMAL + }, + { + 6, + 9, + "para instala\207\306o.", + TEXT_STYLE_NORMAL + }, + { + 6, + 11, + "Use as teclas SETA PARA CIMA e SETA PARA BAIXO para seleccionar", + TEXT_STYLE_NORMAL + }, + { + 6, + 12, + "um item na lista.", + TEXT_STYLE_NORMAL + }, + { + 8, + 14, + "\x07 Para escolher o item seleccionado, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 8, + 16, + "\x07 Para cancelar a altera\207\306o, pressione ESC.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continuar ESC=Cancelar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTFlushPageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 10, + 6, + "O sistema est\240 a certificar que todos os dados est\306 a ser", + TEXT_STYLE_NORMAL + }, + { + 10, + 7, + "armazenados correctamente no disco.", + TEXT_STYLE_NORMAL + }, + { + 10, + 8, + "Esta opera\207\306o pode demorar um minuto.", + TEXT_STYLE_NORMAL + }, + { + 10, + 9, + "Quando terminar, o computador ser\240 reiniciado automaticamente.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "A esvaziar o cache", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTQuitPageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 10, + 6, + "O ReactOS n\306o foi totalmente instalado neste computador.", + TEXT_STYLE_NORMAL + }, + { + 10, + 8, + "Se houver alguma disquete na unidade A: ou disco nas unidades", + TEXT_STYLE_NORMAL + }, + { + 10, + 9, + "de CD-ROM, remova-os.", + TEXT_STYLE_NORMAL + }, + { + 10, + 11, + "Para reiniciar o computador, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "Por favor, aguarde...", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG, + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTDisplayPageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "A lista a seguir mostra os tipos de v\241deo dispon\241veis para instala\207\306o.", + TEXT_STYLE_NORMAL + }, + { 6, + 10, + "Use as teclas SETA PARA CIMA e SETA PARA BAIXO para seleccionar", + TEXT_STYLE_NORMAL + }, + { + 6, + 11, + "um item na lista.", + TEXT_STYLE_NORMAL + }, + { + 8, + 13, + "\x07 Para escolher o item seleccionado, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 8, + 15, + "\x07 Para cancelar a altera\207\306o, pressione ESC.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continuar ESC=Cancelar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTSuccessPageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 10, + 6, + "Os componentes b\240sicos do ReactOS foram instalados com sucesso.", + TEXT_STYLE_NORMAL + }, + { + 10, + 8, + "Se houver alguma disquete na unidade A: ou disco nas unidades", + TEXT_STYLE_NORMAL + }, + { + 10, + 9, + "de CD-ROM, remova-os.", + TEXT_STYLE_NORMAL + }, + { + 10, + 11, + "Para reiniciar o computador, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Reiniciar", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTBootPageEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "O instalador n\306o pode instalar o ger\210nciador de inicializa\207\306o no disco", + TEXT_STYLE_NORMAL + }, + { + 6, + 9, + "r\241gido do computador.", + TEXT_STYLE_NORMAL + }, + { + 6, + 13, + "Por favor insira uma disquete formatada na unidade A: e", + TEXT_STYLE_NORMAL + }, + { + 6, + 14, + "pressione ENTER.", + TEXT_STYLE_NORMAL, + }, + { + 0, + 0, + "ENTER=Continuar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } + +}; + +static MUI_ENTRY ptPTSelectPartitionEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 7, + "A lista a seguir mostra as parti\207\344es existentes e os espa\207os", + TEXT_STYLE_NORMAL + }, + { + 6, + 8, + "n\306o-particionados neste computador.", + TEXT_STYLE_NORMAL + }, + { + 6, + 10, + "Use as teclas SETA PARA CIMA e SETA PARA BAIXO para seleccionar", + TEXT_STYLE_NORMAL + }, + { + 6, + 11, + "um item na lista.", + TEXT_STYLE_NORMAL + }, + { + 8, + 13, + "\x07 Para configurar o ReactOS no item seleccionado, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 8, + 15, + "\x07 Para criar uma parti\207\306o prim\240ria, pressione P.", +// "\x07 Para criar uma parti‡Æo no espa‡o nÆo particionado, pressione C.", + TEXT_STYLE_NORMAL + }, + { + 8, + 17, + "\x07 Para criar uma parti\207\306o extendida, pressione E.", + TEXT_STYLE_NORMAL + }, + { + 8, + 19, + "\x07 Para criar uma parti\207\3060 l\242gica, pressione L.", + TEXT_STYLE_NORMAL + }, + { + 8, + 21, + "\x07 Para excluir a parti\207\306o seleccionada, pressione D.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "Por favor, aguarde...", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTConfirmDeleteSystemPartitionEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "You have chosen to delete the system partition.", + TEXT_STYLE_NORMAL + }, + { + 6, + 10, + "System partitions can contain diagnostic programs, hardware configuration", + TEXT_STYLE_NORMAL + }, + { + 6, + 11, + "programs, programs to start an operating system (like ReactOS) or other", + TEXT_STYLE_NORMAL + }, + { + 6, + 12, + "programs provided by the hardware manufacturer.", + TEXT_STYLE_NORMAL + }, + { + 6, + 14, + "Delete a system partition only when you are sure that there are no such", + TEXT_STYLE_NORMAL + }, + { + 6, + 15, + "programs on the partition, or when you are sure you want to delete them.", + TEXT_STYLE_NORMAL + }, + { + 6, + 16, + "When you delete the partition, you might not be able to boot the", + TEXT_STYLE_NORMAL + }, + { + 6, + 17, + "computer from the harddisk until you finished the ReactOS Setup.", + TEXT_STYLE_NORMAL + }, + { + 8, + 20, + "\x07 Press ENTER to delete the system partition. You will be asked", + TEXT_STYLE_NORMAL + }, + { + 8, + 21, + " to confirm the deletion of the partition again later.", + TEXT_STYLE_NORMAL + }, + { + 8, + 24, + "\x07 Press ESC to return to the previous page. The partition will", + TEXT_STYLE_NORMAL + }, + { + 8, + 25, + " not be deleted.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continue ESC=Cancel", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTFormatPartitionEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "Formatar parti\207\306o", + TEXT_STYLE_NORMAL + }, + { + 6, + 10, + "O instalador ir\240 formatar a parti\207\306o. Para continuar, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continuar F3=Sair", + TEXT_TYPE_STATUS + }, + { + 0, + 0, + NULL, + TEXT_STYLE_NORMAL + } +}; + +static MUI_ENTRY ptPTInstallDirectoryEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "O instalador ir\240 copiar os arquivos para a parti\207\306o seleccionada.", + TEXT_STYLE_NORMAL + }, + { + 6, + 9, + "Seleccione o diret\242rio onde deseja que o ReactOS seja instalado:", + TEXT_STYLE_NORMAL + }, + { + 6, + 14, + "Para mudar o diret\242rio sugerido, pressione a tecla BACKSPACE para apagar", + TEXT_STYLE_NORMAL + }, + { + 6, + 15, + "o texto e escreva o nome do diret\242rio onde deseja que o ReactOS", + TEXT_STYLE_NORMAL + }, + { + 6, + 16, + "seja instalado.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continuar F3 = Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTFileCopyEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 0, + 12, + "Por favor aguarde enquanto o instalador copia os", + TEXT_STYLE_NORMAL | TEXT_ALIGN_CENTER + }, + { + 0, + 13, + "arquivos do ReactOS para a pasta de instala\207\306o.", + TEXT_STYLE_NORMAL | TEXT_ALIGN_CENTER + }, + { + 0, + 14, + "Esta opera\207\306o pode demorar alguns minutos.", + TEXT_STYLE_NORMAL | TEXT_ALIGN_CENTER + }, + { + 50, + 0, + "\xB3 Por favor, aguarde...", + TEXT_TYPE_STATUS + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTBootLoaderEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "O instalador ir\240 configurar o ger\210nciador de inicializa\207\306o", + TEXT_STYLE_NORMAL + }, + { + 8, + 12, + "Instalar o ger\210nciador de inicializa\207\306o no disco r\241gido (MBR e VBR)", + TEXT_STYLE_NORMAL + }, + { + 8, + 13, + "Instalar o ger\210nciador de inicializa\207\306o no disco r\241gido (apenas VBR)", + TEXT_STYLE_NORMAL + }, + { + 8, + 14, + "Instalar o ger\210nciador de inicializa\207\306o numa disquete", + TEXT_STYLE_NORMAL + }, + { + 8, + 15, + "Saltar a instala\207\306o do ger\210nciador de inicializa\207\306o", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continuar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTKeyboardSettingsEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "A lista a seguir mostra os tipos de teclados dispon\241veis para instala\207\306o.", + TEXT_STYLE_NORMAL + }, + { + 6, + 10, + "Use as teclas SETA PARA CIMA e SETA PARA BAIXO para seleccionar", + TEXT_STYLE_NORMAL + }, + { + 6, + 11, + "um item na lista.", + TEXT_STYLE_NORMAL + }, + { + 8, + 13, + "\x07 Para escolher o item seleccionado, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 8, + 15, + "\x07 Para cancelar a altera\207\306o, pressione ESC.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continuar ESC=Cancelar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTLayoutSettingsEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "A lista a seguir mostra os tipos de leiautes de teclado dispon\241veis", + TEXT_STYLE_NORMAL + }, + { + 6, + 9, + "para instala\207\306o.", + TEXT_STYLE_NORMAL + }, + { + 6, + 11, + "Use as teclas SETA PARA CIMA e SETA PARA BAIXO para seleccionar", + TEXT_STYLE_NORMAL + }, + { + 6, + 12, + "um item na lista.", + TEXT_STYLE_NORMAL + }, + { + 8, + 14, + "\x07 Para escolher o item seleccionado, pressione ENTER.", + TEXT_STYLE_NORMAL + }, + { + 8, + 16, + "\x07 Para cancelar a altera\207\306o, pressione ESC.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "ENTER=Continuar ESC=Cancelar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + }, + +}; + +static MUI_ENTRY ptPTPrepareCopyEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "O instalador est\240 preparando o computador para copiar os arquivos", + TEXT_STYLE_NORMAL + }, + { + 6, + 9, + "do ReactOS.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "Montando a lista de arquivos a serem copiados...", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + }, + +}; + +static MUI_ENTRY ptPTSelectFSEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 16, + "Seleccione um sistema de arquivos para a nova parti\207\306o na lista abaixo.", + 0 + }, + { + 6, + 17, + "Use as teclas SETA PARA CIMA e SETA PARA BAIXO para seleccionar o", + 0 + }, + { + 6, + 18, + "sistema de arquivos de arquivos desejado e pressione ENTER.", + 0 + }, + { + 8, + 20, + "Se desejar seleccionar uma parti\207\306o diferente, pressione ESC.", + 0 + }, + { + 0, + 0, + "ENTER=Continuar ESC=Cancelar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTDeletePartitionEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "Voc\210 solicitou a exclus\306o da parti\207\306o", + TEXT_STYLE_NORMAL + }, + { + 8, + 18, + "\x07 Para excluir esta parti\207\306o, pressione D", + TEXT_STYLE_NORMAL + }, + { + 11, + 19, + "CUIDADO: todos os dados da parti\207\306o ser\306o perdidos!", + TEXT_STYLE_NORMAL + }, + { + 8, + 21, + "\x07 Para retornar \205 tela anterior sem excluir", + TEXT_STYLE_NORMAL + }, + { + 11, + 22, + "a parti\207\306o, pressione ESC.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "D=Excluir ESC=Cancelar F3=Sair", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + } +}; + +static MUI_ENTRY ptPTRegistryEntries[] = +{ + { + 4, + 3, + " Instala\207\306o do ReactOS " KERNEL_VERSION_STR " ", + TEXT_STYLE_UNDERLINE + }, + { + 6, + 8, + "O instalador est\240 atualizando a configura\207\306o do sistema.", + TEXT_STYLE_NORMAL + }, + { + 0, + 0, + "Criando a estrutura de registo...", + TEXT_TYPE_STATUS | TEXT_PADDING_BIG + }, + { + 0, + 0, + NULL, + 0 + }, + +}; + +MUI_ERROR ptPTErrorEntries[] = +{ + { + // NOT_AN_ERROR + "Success\n" + }, + { + // ERROR_NOT_INSTALLED + "O ReactOS n\306o est\240 completamente instalado no computador.\n" + "Se voc\210 sair da instala\207\306o agora, precisar\240 executa-la\n" + "novamente para instalar o ReactOS.\n" + "\n" + " \x07 Para continuar a instala\207\306o, pressione ENTER.\n" + " \x07 Para sair da instala\207\306o, pressione F3.", + "F3=Sair ENTER=Continuar" + }, + { + // ERROR_NO_HDD + "N\306o foi poss\241vel localizar um disco r\241digo.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_NO_SOURCE_DRIVE + "N\306o foi poss\241vel localizar a unidade de origem.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_LOAD_TXTSETUPSIF + "N\306o foi poss\241vel carregar o arquivo TXTSETUP.SIF.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_CORRUPT_TXTSETUPSIF + "O arquivos TXTSETUP.SIF est\240 corrompido.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_SIGNATURE_TXTSETUPSIF, + "O arquivo TXTSETUP.SIF est\240 com a assinatura incorreta.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_DRIVE_INFORMATION + "N\306o foi poss\241vel obter as informa\207\344es sobre o disco do sistema.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_WRITE_BOOT, + "Erro ao escrever o c\242digo de inicializa\207\306o %S na parti\207\306o do sistema.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_LOAD_COMPUTER, + "N\306o foi poss\241vel carregar a lista de tipos de computadores.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_LOAD_DISPLAY, + "N\306o foi poss\241vel carregar a lista de tipos de v\241deo.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_LOAD_KEYBOARD, + "N\306o foi poss\241vel carregar a lista de tipos de teclado.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_LOAD_KBLAYOUT, + "N\306o foi poss\241vel carregar a lista de leiautes de teclado.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_WARN_PARTITION, + "O instalador encontrou uma tabela de parti\207\306o incompat\241vel\n" + "que n\306o pode ser utilizada corretamente!\n" + "\n" + "Criar ou excluir parti\207\344es pode destruir a tabela de parti\207\306o.\n" + "\n" + " \x07 Para sair da instala\207\306o, pressione F3.\n" + " \x07 Para continuar, pressione ENTER.", + "F3=Sair ENTER=Continuar" + }, + { + // ERROR_NEW_PARTITION, + "Voc\210 n\306o pode criar uma parti\207\306o dentro de\n" + "outra parti\207\306o j\240 existente!\n" + "\n" + " * Pressione qualquer tecla para continuar.", + NULL + }, + { + // ERROR_DELETE_SPACE, + "Voc\210 n\306o pode excluir um espa\207o n\306o-particionado!\n" + "\n" + " * Pressione qualquer tecla para continuar.", + NULL + }, + { + // ERROR_INSTALL_BOOTCODE, + "Erro ao instalar o c\242digo de inicializa\207\306o %S na parti\207\306o do sistema.", + "ENTER=Reiniciar" + }, + { + // ERROR_NO_FLOPPY, + "N\306o h\240 disco na unidade A:.", + "ENTER=Continuar" + }, + { + // ERROR_UPDATE_KBSETTINGS, + "N\306o foi poss\241vel atualizar a configura\207\306o de leiaute de teclado.", + "ENTER=Reiniciar" + }, + { + // ERROR_UPDATE_DISPLAY_SETTINGS, + "N\306o foi poss\241vel atualizar a configura\207\306o de v\241deo.", + "ENTER=Reiniciar" + }, + { + // ERROR_IMPORT_HIVE, + "N\306o foi poss\241vel importar o arquivo de estrutura.", + "ENTER=Reiniciar" + }, + { + // ERROR_FIND_REGISTRY + "N\306o foi poss\241vel encontrar os arquivos do registo.", + "ENTER=Reiniciar" + }, + { + // ERROR_CREATE_HIVE, + "N\306o foi poss\241vel criar as estruturas do registo.", + "ENTER=Reiniciar" + }, + { + // ERROR_INITIALIZE_REGISTRY, + "N\306o foi poss\241vel inicializar o registo.", + "ENTER=Reiniciar" + }, + { + // ERROR_INVALID_CABINET_INF, + "O arquivo cab n\306o cont\202m um arquivo inf v\240lido.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_CABINET_MISSING, + "N\306o foi poss\241vel econtrar o arquivo cab.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_CABINET_SCRIPT, + "O arquivo cab n\306o cont\202m um script de instala\207\306o.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_COPY_QUEUE, + "N\306o foi poss\241vel abrir a lista de arquivos para c\242pia.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_CREATE_DIR, + "N\306o foi poss\241vel criar os direct\242rios de instala\207\306o.", + "ENTER=Reiniciar" + }, + { + // ERROR_TXTSETUP_SECTION, + "N\306o foi poss\241vel encontrar a se\207\306o '%S' no\n" + "arquivo TXTSETUP.SIF.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_CABINET_SECTION, + "N\306o foi poss\241vel encontrar a se\207\306o '%S' no\n" + "arquivo cab.\n", + "ENTER=Reiniciar" + }, + { + // ERROR_CREATE_INSTALL_DIR + "N\306o foi poss\241vel criar o diret\242rio de instala\207\306o.", + "ENTER=Reiniciar" + }, + { + // ERROR_WRITE_PTABLE, + "N\306o foi poss\241vel escrever a tabela de parti\207\344es.\n" + "ENTER=Reiniciar" + }, + { + // ERROR_ADDING_CODEPAGE, + "N\306o foi poss\241vel adicionar o c\242digo de localidade no registo.\n" + "ENTER=Reiniciar" + }, + { + // ERROR_UPDATE_LOCALESETTINGS, + "N\306o foi poss\241vel configurar o idioma do sistema.\n" + "ENTER=Reiniciar" + }, + { + // ERROR_ADDING_KBLAYOUTS, + "N\306o foi poss\241vel adicionar o tipo do teclado no registo.\n" + "ENTER=Reiniciar" + }, + { + // ERROR_UPDATE_GEOID, + "N\306o foi poss\241vel configurar a identifica\207\306o geogr\240fica.\n" + "ENTER=Reiniciar" + }, + { + // ERROR_DIRECTORY_NAME, + "Invalid directory name.\n" + "\n" + " * Press any key to continue." + }, + { + // ERROR_INSUFFICIENT_PARTITION_SIZE, + "The selected partition is not large enough to install ReactOS.\n" + "The install partition must have a size of at least %lu MB.\n" + "\n" + " * Pressione qualquer tecla para continuar.", + NULL + }, + { + // ERROR_PARTITION_TABLE_FULL, + "You can not create a new primary or extended partition in the\n" + "partition table of this disk because the partition table is full.\n" + "\n" + " * Press any key to continue." + }, + { + // ERROR_ONLY_ONE_EXTENDED, + "You can not create more than one extended partition per disk.\n" + "\n" + " * Press any key to continue." + }, + { + // ERROR_FORMATTING_PARTITION, + "Setup is unable to format the partition:\n" + " %S\n" + "\n" + "ENTER = Reboot computer" + }, + { + NULL, + NULL + } +}; + +MUI_PAGE ptPTPages[] = +{ + { + SETUP_INIT_PAGE, + ptPTSetupInitPageEntries + }, + { + LANGUAGE_PAGE, + ptPTLanguagePageEntries + }, + { + WELCOME_PAGE, + ptPTWelcomePageEntries + }, + { + INSTALL_INTRO_PAGE, + ptPTIntroPageEntries + }, + { + LICENSE_PAGE, + ptPTLicensePageEntries + }, + { + DEVICE_SETTINGS_PAGE, + ptPTDevicePageEntries + }, + { + REPAIR_INTRO_PAGE, + ptPTRepairPageEntries + }, + { + UPGRADE_REPAIR_PAGE, + ptPTUpgradePageEntries + }, + { + COMPUTER_SETTINGS_PAGE, + ptPTComputerPageEntries + }, + { + DISPLAY_SETTINGS_PAGE, + ptPTDisplayPageEntries + }, + { + FLUSH_PAGE, + ptPTFlushPageEntries + }, + { + SELECT_PARTITION_PAGE, + ptPTSelectPartitionEntries + }, + { + CONFIRM_DELETE_SYSTEM_PARTITION_PAGE, + ptPTConfirmDeleteSystemPartitionEntries + }, + { + SELECT_FILE_SYSTEM_PAGE, + ptPTSelectFSEntries + }, + { + FORMAT_PARTITION_PAGE, + ptPTFormatPartitionEntries + }, + { + DELETE_PARTITION_PAGE, + ptPTDeletePartitionEntries + }, + { + INSTALL_DIRECTORY_PAGE, + ptPTInstallDirectoryEntries + }, + { + PREPARE_COPY_PAGE, + ptPTPrepareCopyEntries + }, + { + FILE_COPY_PAGE, + ptPTFileCopyEntries + }, + { + KEYBOARD_SETTINGS_PAGE, + ptPTKeyboardSettingsEntries + }, + { + BOOT_LOADER_PAGE, + ptPTBootLoaderEntries + }, + { + LAYOUT_SETTINGS_PAGE, + ptPTLayoutSettingsEntries + }, + { + QUIT_PAGE, + ptPTQuitPageEntries + }, + { + SUCCESS_PAGE, + ptPTSuccessPageEntries + }, + { + BOOT_LOADER_FLOPPY_PAGE, + ptPTBootPageEntries + }, + { + REGISTRY_PAGE, + ptPTRegistryEntries + }, + { + -1, + NULL + } +}; + +MUI_STRING ptPTStrings[] = +{ + {STRING_PLEASEWAIT, + " Por favor, aguarde..."}, + {STRING_INSTALLCREATEPARTITION, + " ENTER = Install P = Create Primary E = Create Extended F3 = Quit"}, +// " ENTER=Instalar C=Criar parti‡Æo F3=Sair"}, + {STRING_INSTALLCREATELOGICAL, + " ENTER = Install L = Create Logical Partition F3 = Quit"}, + {STRING_INSTALLDELETEPARTITION, + " ENTER=Instalar D=Apagar parti\207\306o F3=Sair"}, + {STRING_DELETEPARTITION, + " D = Delete Partition F3 = Quit"}, + {STRING_PARTITIONSIZE, + "Tamanho da nova parti\207\306o:"}, + {STRING_CHOOSENEWPARTITION, + "Seleccionou criar uma parti\207\306o prim\240ria"}, +// "Vocˆ solicitou a cria‡Æo de uma nova parti‡Æo em"}, + {STRING_CHOOSE_NEW_EXTENDED_PARTITION, + "Seleccionou criar uma parti\207\306o extendida"}, + {STRING_CHOOSE_NEW_LOGICAL_PARTITION, + "Seleccionou criar uma parti\207\306o l\242gica"}, + {STRING_HDDSIZE, + "Por favor, insira o tamanho da nova parti\207\306o em megabytes (MB)."}, + {STRING_CREATEPARTITION, + " ENTER=Criar parti\207\306o ESC=Cancelar F3=Sair"}, + {STRING_PARTFORMAT, + "Esta parti\207\306o ser\240 formatada logo em seguida."}, + {STRING_NONFORMATTEDPART, + "Solicitou instalar o ReactOS numa parti\207\306o nova ou sem formato."}, + {STRING_NONFORMATTEDSYSTEMPART, + "A parti\207\306o ainda n\306o est\240 formatada."}, + {STRING_NONFORMATTEDOTHERPART, + "A nova parti\207\306o ainda n\306o est\240 formatada."}, + {STRING_INSTALLONPART, + "O instalador instala o ReactOS na parti\207\306o"}, + {STRING_CHECKINGPART, + "O instalador est\240 a verificar a parti\207\306o seleccionada."}, + {STRING_CONTINUE, + "ENTER=Continuar"}, + {STRING_QUITCONTINUE, + "F3=Sair ENTER=Continuar"}, + {STRING_REBOOTCOMPUTER, + "ENTER=Reiniciar"}, + {STRING_DELETING, + " Deleting file: %S"}, + {STRING_MOVING, + " Moving file: %S to: %S"}, + {STRING_RENAMING, + " Renaming file: %S to: %S"}, + {STRING_COPYING, + " Copiando arquivo: %S"}, + {STRING_SETUPCOPYINGFILES, + "O instalador est\240 a copiar os arquivos..."}, + {STRING_REGHIVEUPDATE, + " A actualizar a estrutura do registo..."}, + {STRING_IMPORTFILE, + " A importar %S..."}, + {STRING_DISPLAYSETTINGSUPDATE, + " A actualizar a configura\207\344o de v\241deo..."}, + {STRING_LOCALESETTINGSUPDATE, + " A actualizar as configura\207\344es regionais..."}, + {STRING_KEYBOARDSETTINGSUPDATE, + " A actualizar as configura\207\344es do teclado..."}, + {STRING_CODEPAGEINFOUPDATE, + " A adicionar as informa\207\344es de localiza\207\306o no registo..."}, + {STRING_DONE, + " Pronto..."}, + {STRING_REBOOTCOMPUTER2, + " ENTER=Reiniciar"}, + {STRING_REBOOTPROGRESSBAR, + " O computador ir\240 reiniciar em %li segundo(s)... "}, + {STRING_CONSOLEFAIL1, + "N\306o foi poss\241vel abrir o console\r\n\r\n"}, + {STRING_CONSOLEFAIL2, + "A causa mais com\243m \202 a utiliza\207\306o de um teclado USB\r\n"}, + {STRING_CONSOLEFAIL3, + "Os teclados USB ainda n\306o s\306o completamente suportados\r\n"}, + {STRING_FORMATTINGDISK, + "O instalador est\240 a formatar o disco"}, + {STRING_CHECKINGDISK, + "O instalador est\240 a verificar o disco"}, + {STRING_FORMATDISK1, + " Formatar a parti\207\306o utilizando o sistema de arquivos %S (R\240pido) "}, + {STRING_FORMATDISK2, + " Formatar a parti\207\306o utilizando o sistema de arquivos %S "}, + {STRING_KEEPFORMAT, + " Manter o sistema de arquivos actual (sem altera\207\344es) "}, + {STRING_HDINFOPARTCREATE_1, + "%I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) em %wZ [%s]."}, + {STRING_HDINFOPARTCREATE_2, + "%I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) [%s]."}, + {STRING_HDDINFOUNK2, + " %c%c Tipo 0x%02X %I64u %s"}, + {STRING_HDINFOPARTDELETE_1, + "em %I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) em %wZ [%s]."}, + {STRING_HDINFOPARTDELETE_2, + "em %I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) [%s]."}, + {STRING_HDINFOPARTZEROED_1, + "Disco %lu (%I64u %s), Porta=%hu, Barramento=%hu, Id=%hu (%wZ) [%s]."}, + {STRING_HDDINFOUNK4, + "%c%c Tipo 0x%02X %I64u %s"}, + {STRING_HDINFOPARTEXISTS_1, + "em Disco %lu (%I64u %s), Porta=%hu, Barramento=%hu, Id=%hu (%wZ) [%s]."}, + {STRING_HDDINFOUNK5, + "%c%c %c %sTipo %-3u%s %6lu %s"}, + {STRING_HDINFOPARTSELECT_1, + "%6lu %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) em %wZ [%s]"}, + {STRING_HDINFOPARTSELECT_2, + "%6lu %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) [%s]"}, + {STRING_NEWPARTITION, + "O instalador criou uma nova parti\207\306o em"}, + {STRING_UNPSPACE, + " %sEspa\207o n\306o particionado%s %6lu %s"}, + {STRING_MAXSIZE, + "MB (max. %lu MB)"}, + {STRING_EXTENDED_PARTITION, + "Extended Partition"}, + {STRING_UNFORMATTED, + "Novo (sem formato)"}, + {STRING_FORMATUNUSED, + "Livre"}, + {STRING_FORMATUNKNOWN, + "desconhecido"}, + {STRING_KB, + "KB"}, + {STRING_MB, + "MB"}, + {STRING_GB, + "GB"}, + {STRING_ADDKBLAYOUTS, + "Adicionando tipos de teclado"}, + {0, 0} +}; diff --git a/base/setup/usetup/muilanguages.h b/base/setup/usetup/muilanguages.h index 2dca81c300e..5c67c0c8fb3 100644 --- a/base/setup/usetup/muilanguages.h +++ b/base/setup/usetup/muilanguages.h @@ -326,9 +326,9 @@ #ifdef LANGUAGE_PT_BR #include "lang/pt-BR.h" #endif -// #ifdef LANGUAGE_PT_PT - // #include "lang/pt-PT.h" -// #endif +#ifdef LANGUAGE_PT_PT + #include "lang/pt-PT.h" +#endif // #ifdef LANGUAGE_RM_CH // #include "lang/rm-CH.h" // #endif @@ -699,12 +699,12 @@ const MUI_LANGUAGE_RESOURCE ResourceList[] = #ifdef LANGUAGE_PL_PL {L"00000415", L"Polish", plPLPages, plPLErrorEntries, plPLStrings}, #endif -#ifdef LANGUAGE_PT_PT - {L"00000816", L"Portuguese (Portugal)", enUSPages, enUSErrorEntries, enUSStrings}, -#endif #ifdef LANGUAGE_PT_BR {L"00000416", L"Portuguese (Brazil)", ptBRPages, ptBRErrorEntries, ptBRStrings}, #endif +#ifdef LANGUAGE_PT_PT + {L"00000816", L"Portuguese (Portugal)", ptPTPages, ptPTErrorEntries, ptPTStrings}, +#endif #ifdef LANGUAGE_PA_IN {L"00000446", L"Punjabi (India)", enUSPages, enUSErrorEntries, enUSStrings}, #endif diff --git a/dll/shellext/deskadp/deskadp.rc b/dll/shellext/deskadp/deskadp.rc index a50e26eaf1d..5ecb2ac49d7 100644 --- a/dll/shellext/deskadp/deskadp.rc +++ b/dll/shellext/deskadp/deskadp.rc @@ -55,6 +55,9 @@ IDC_DESK_ADAPTER ICON "resources/adapter.ico" #ifdef LANGUAGE_PL_PL #include "lang/pl-PL.rc" #endif +#ifdef LANGUAGE_PT_PT + #include "lang/pt-PT.rc" +#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif @@ -78,4 +81,4 @@ IDC_DESK_ADAPTER ICON "resources/adapter.ico" #endif #ifdef LANGUAGE_ZH_TW #include "lang/zh-TW.rc" -#endif \ No newline at end of file +#endif diff --git a/dll/shellext/deskadp/lang/pt-PT.rc b/dll/shellext/deskadp/lang/pt-PT.rc new file mode 100644 index 00000000000..bec057f42f1 --- /dev/null +++ b/dll/shellext/deskadp/lang/pt-PT.rc @@ -0,0 +1,48 @@ +LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL + +IDD_DISPLAYADAPTER DIALOGEX 0, 0, 252, 226 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Placa" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tipo de placa gráfica", -1, 7, 3, 237, 50 + ICON IDC_DESK_ADAPTER, IDC_DESK_ADAPTER, 13, 11, 21, 20, SS_ICON + LTEXT "", IDC_ADAPTERNAME, 40, 17, 190, 20, SS_NOPREFIX + PUSHBUTTON "&Propriedades", IDC_ADAPTERPROPERTIES, 177, 33, 59, 14 + GROUPBOX "Informações do Adaptador", -1, 7, 56, 237, 75 + LTEXT "Tipo de chip:", -1, 13, 68, 58, 8 + LTEXT "", IDC_CHIPTYPE, 71, 68, 160, 8, SS_NOPREFIX + LTEXT "Tipo de DAC:", -1, 13, 80, 58, 8 + LTEXT "", IDC_DACTYPE, 71, 80, 160, 8, SS_NOPREFIX + LTEXT "Tamanho da memória:", -1, 13, 92, 58, 8 + LTEXT "", IDC_MEMORYSIZE, 71, 92, 160, 8, SS_NOPREFIX + LTEXT "Cadeia da placa gráfica:", -1, 13, 104, 58, 8 + LTEXT "", IDC_ADAPTERSTRING, 71, 104, 160, 8, SS_NOPREFIX + LTEXT "Informação sobre o BIOS:", -1, 13, 116, 58, 8 + LTEXT "", IDC_BIOSINFORMATION, 71, 116, 160, 8, SS_NOPREFIX + PUSHBUTTON "&Modos...", IDC_LISTALLMODES, 7, 139, 75, 14 +END + +IDD_LISTALLMODES DIALOGEX 0, 0, 225, 135 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME +CAPTION "Lista Todos os Modos" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK", IDOK, 112, 115, 50, 15 + PUSHBUTTON "Cancelar", IDCANCEL, 167, 115, 50, 15 + GROUPBOX "Lista de modos válidos", -1, 6, 7, 212, 98 + LISTBOX IDC_ALLVALIDMODES, 10, 20, 204, 87, LBS_NOTIFY | WS_VSCROLL +END + +STRINGTABLE +BEGIN + IDS_MODEFMT "%d by %d, %s, %s" + IDS_DEFREFRESHRATE "Default Refresh" + IDES_REFRESHRATEFMT "%d Hertz" + IDS_4BPP "16 Colors" + IDS_8BPP "256 Colors" + IDS_15BPP "High Color (15 bit)" + IDS_16BPP "High Color (16 bit)" + IDS_24BPP "True Color (24 bit)" + IDS_32BPP "True Color (32 bit)" +END diff --git a/dll/shellext/deskmon/deskmon.rc b/dll/shellext/deskmon/deskmon.rc index 77964cf114b..8d39e819f97 100644 --- a/dll/shellext/deskmon/deskmon.rc +++ b/dll/shellext/deskmon/deskmon.rc @@ -55,6 +55,9 @@ IDC_MONITORICO ICON "resources/monitor.ico" #ifdef LANGUAGE_PL_PL #include "lang/pl-PL.rc" #endif +#ifdef LANGUAGE_PT_PT + #include "lang/pt-PT.rc" +#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif @@ -78,4 +81,4 @@ IDC_MONITORICO ICON "resources/monitor.ico" #endif #ifdef LANGUAGE_ZH_TW #include "lang/zh-TW.rc" -#endif \ No newline at end of file +#endif diff --git a/dll/shellext/deskmon/lang/pt-PT.rc b/dll/shellext/deskmon/lang/pt-PT.rc new file mode 100644 index 00000000000..6e046a926df --- /dev/null +++ b/dll/shellext/deskmon/lang/pt-PT.rc @@ -0,0 +1,23 @@ +LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL + +IDD_MONITOR DIALOGEX 0, 0, 252, 226 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Monitor" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tipo de monitor", -1, 7, 3, 237, 52 + ICON IDC_MONITORICO, IDC_MONITORICO, 13, 11, 21, 20, SS_ICON + LTEXT "", IDC_MONITORNAME, 40, 17, 190, 20, SS_NOPREFIX + LISTBOX IDC_MONITORLIST, 40, 13, 196, 30, WS_VSCROLL + PUSHBUTTON "&Propriedades", IDC_MONITORPROPERTIES, 177, 35, 59, 14, WS_DISABLED + GROUPBOX "Definições do monitor", IDS_MONITORSETTINGSGROUP, 7, 58, 237, 63 + LTEXT "&Frequencia de actualização do ecrã:", IDS_REFRESHRATELABEL, 13, 73, 225, 8 + COMBOBOX IDC_REFRESHRATE, 13, 85, 225, 200, WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT + AUTOCHECKBOX "&Ocultar modos que este monitor não possa apresentar", IDC_PRUNINGCHECK, 13, 106, 225, 10 +END + +STRINGTABLE +BEGIN + IDS_USEDEFFRQUENCY "Utilizar definições de hardware predefinidas" + IDS_FREQFMT "%u Hertz" +END diff --git a/dll/win32/syssetup/lang/pt-BR.rc b/dll/win32/syssetup/lang/pt-BR.rc index 12da09db7d2..0f5569fa537 100644 --- a/dll/win32/syssetup/lang/pt-BR.rc +++ b/dll/win32/syssetup/lang/pt-BR.rc @@ -1,4 +1,4 @@ -LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL +LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN IDD_WELCOMEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU diff --git a/dll/win32/syssetup/lang/pt-BR.rc b/dll/win32/syssetup/lang/pt-PT.rc similarity index 97% copy from dll/win32/syssetup/lang/pt-BR.rc copy to dll/win32/syssetup/lang/pt-PT.rc index 12da09db7d2..c215fddba74 100644 --- a/dll/win32/syssetup/lang/pt-BR.rc +++ b/dll/win32/syssetup/lang/pt-PT.rc @@ -209,18 +209,3 @@ BEGIN IDS_PROGRAMFILES "%SystemDrive%\\Arquivos de programas" IDS_COMMONFILES "Arquivos comuns" END - -STRINGTABLE -BEGIN - IDS_DETECTIONDISABLED "Detection disabled" - IDS_LOOKFORWHEEL "Look for wheel" - IDS_ASSUMEPRESENT "Assume wheel is present" -END - -STRINGTABLE -BEGIN - IDS_CLASSIC "Classic" - IDS_LAUTUS "Lautus" - IDS_LUNAR "Lunar" - IDS_MIZU "Mizu" -END diff --git a/dll/win32/syssetup/syssetup.rc b/dll/win32/syssetup/syssetup.rc index 55593ede9a3..7d002554769 100644 --- a/dll/win32/syssetup/syssetup.rc +++ b/dll/win32/syssetup/syssetup.rc @@ -108,6 +108,9 @@ IDR_GPL RT_TEXT "COPYING" #ifdef LANGUAGE_PT_BR #include "lang/pt-BR.rc" #endif +#ifdef LANGUAGE_PT_PT + #include "lang/pt-PT.rc" +#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif
5 years, 7 months
1
0
0
0
[reactos] 01/01: [MMSYS] Reset the speaker volume to its initial value when the user clicks the "Cancel" button
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bb4fc96939acaa234ec44…
commit bb4fc96939acaa234ec44c61fabaf91373d27e30 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun May 19 16:26:22 2019 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun May 19 16:27:10 2019 +0200 [MMSYS] Reset the speaker volume to its initial value when the user clicks the "Cancel" button CORE-13815 --- dll/cpl/mmsys/volume.c | 82 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 63 insertions(+), 19 deletions(-) diff --git a/dll/cpl/mmsys/volume.c b/dll/cpl/mmsys/volume.c index b8e546e2763..17c86808269 100644 --- a/dll/cpl/mmsys/volume.c +++ b/dll/cpl/mmsys/volume.c @@ -37,7 +37,8 @@ typedef struct _GLOBAL_DATA DWORD volumeStep; DWORD maxVolume; - PMIXERCONTROLDETAILS_UNSIGNED volumeInitValues; + PMIXERCONTROLDETAILS_UNSIGNED volumeInitialValues; + PMIXERCONTROLDETAILS_UNSIGNED volumePreviousValues; PMIXERCONTROLDETAILS_UNSIGNED volumeCurrentValues; } GLOBAL_DATA, *PGLOBAL_DATA; @@ -176,10 +177,16 @@ GetVolumeControl(PGLOBAL_DATA pGlobalData) pGlobalData->volumeControlID = mxc.dwControlID; pGlobalData->volumeStep = (pGlobalData->volumeMaximum - pGlobalData->volumeMinimum) / (VOLUME_MAX - VOLUME_MIN); - pGlobalData->volumeInitValues = HeapAlloc(GetProcessHeap(), - 0, - mxln.cChannels * sizeof(MIXERCONTROLDETAILS_UNSIGNED)); - if (pGlobalData->volumeInitValues == NULL) + pGlobalData->volumeInitialValues = HeapAlloc(GetProcessHeap(), + 0, + mxln.cChannels * sizeof(MIXERCONTROLDETAILS_UNSIGNED)); + if (pGlobalData->volumeInitialValues == NULL) + return; + + pGlobalData->volumePreviousValues = HeapAlloc(GetProcessHeap(), + 0, + mxln.cChannels * sizeof(MIXERCONTROLDETAILS_UNSIGNED)); + if (pGlobalData->volumePreviousValues == NULL) return; pGlobalData->volumeCurrentValues = HeapAlloc(GetProcessHeap(), @@ -191,7 +198,9 @@ GetVolumeControl(PGLOBAL_DATA pGlobalData) VOID -GetVolumeValue(PGLOBAL_DATA pGlobalData) +GetVolumeValue( + PGLOBAL_DATA pGlobalData, + BOOL bInit) { MIXERCONTROLDETAILS mxcd; DWORD i; @@ -204,7 +213,7 @@ GetVolumeValue(PGLOBAL_DATA pGlobalData) mxcd.cChannels = pGlobalData->volumeChannels; mxcd.cMultipleItems = 0; mxcd.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED); - mxcd.paDetails = pGlobalData->volumeInitValues; + mxcd.paDetails = pGlobalData->volumePreviousValues; if (mixerGetControlDetails((HMIXEROBJ)pGlobalData->hMixer, &mxcd, MIXER_OBJECTF_HMIXER | MIXER_GETCONTROLDETAILSF_VALUE) != MMSYSERR_NOERROR) @@ -213,10 +222,13 @@ GetVolumeValue(PGLOBAL_DATA pGlobalData) pGlobalData->maxVolume = 0; for (i = 0; i < pGlobalData->volumeChannels; i++) { - pGlobalData->volumeCurrentValues[i].dwValue = pGlobalData->volumeInitValues[i].dwValue; + pGlobalData->volumeCurrentValues[i].dwValue = pGlobalData->volumePreviousValues[i].dwValue; - if (pGlobalData->volumeInitValues[i].dwValue > pGlobalData->maxVolume) - pGlobalData->maxVolume = pGlobalData->volumeInitValues[i].dwValue; + if (pGlobalData->volumePreviousValues[i].dwValue > pGlobalData->maxVolume) + pGlobalData->maxVolume = pGlobalData->volumePreviousValues[i].dwValue; + + if (bInit) + pGlobalData->volumeInitialValues[i].dwValue = pGlobalData->volumeCurrentValues[i].dwValue; } } @@ -240,14 +252,14 @@ SetVolumeValue(PGLOBAL_DATA pGlobalData, for (i = 0; i < pGlobalData->volumeChannels; i++) { - if (pGlobalData->volumeInitValues[i].dwValue == pGlobalData->maxVolume) + if (pGlobalData->volumePreviousValues[i].dwValue == pGlobalData->maxVolume) { pGlobalData->volumeCurrentValues[i].dwValue = dwVolume; } else { pGlobalData->volumeCurrentValues[i].dwValue = - pGlobalData->volumeInitValues[i].dwValue * dwVolume / pGlobalData-> maxVolume; + pGlobalData->volumePreviousValues[i].dwValue * dwVolume / pGlobalData-> maxVolume; } } @@ -264,6 +276,29 @@ SetVolumeValue(PGLOBAL_DATA pGlobalData, } +static +VOID +RestoreVolumeValue( + PGLOBAL_DATA pGlobalData) +{ + MIXERCONTROLDETAILS mxcd; + + if (pGlobalData->hMixer == NULL) + return; + + mxcd.cbStruct = sizeof(MIXERCONTROLDETAILS); + mxcd.dwControlID = pGlobalData->volumeControlID; + mxcd.cChannels = pGlobalData->volumeChannels; + mxcd.cMultipleItems = 0; + mxcd.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED); + mxcd.paDetails = pGlobalData->volumeInitialValues; + + mixerSetControlDetails((HMIXEROBJ)pGlobalData->hMixer, + &mxcd, + MIXER_OBJECTF_HMIXER | MIXER_SETCONTROLDETAILSF_VALUE); +} + + static VOID SetSystrayVolumeIconState(BOOL bEnabled) @@ -352,7 +387,7 @@ InitVolumeControls(HWND hwndDlg, PGLOBAL_DATA pGlobalData) } GetVolumeControl(pGlobalData); - GetVolumeValue(pGlobalData); + GetVolumeValue(pGlobalData, TRUE); SendDlgItemMessage(hwndDlg, IDC_DEVICE_NAME, WM_SETTEXT, 0, (LPARAM)mxc.szPname); SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)(pGlobalData->maxVolume - pGlobalData->volumeMinimum) / pGlobalData->volumeStep); @@ -410,7 +445,7 @@ VolumeDlgProc(HWND hwndDlg, } case MM_MIXM_CONTROL_CHANGE: { - GetVolumeValue(pGlobalData); + GetVolumeValue(pGlobalData, FALSE); SendDlgItemMessage(hwndDlg, IDC_VOLUME_TRACKBAR, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)(pGlobalData->maxVolume - pGlobalData->volumeMinimum) / pGlobalData->volumeStep); break; } @@ -524,12 +559,15 @@ VolumeDlgProc(HWND hwndDlg, case WM_DESTROY: if (pGlobalData) { - if (pGlobalData->volumeInitValues) - HeapFree(GetProcessHeap(), 0, pGlobalData->volumeInitValues); - if (pGlobalData->volumeCurrentValues) HeapFree(GetProcessHeap(), 0, pGlobalData->volumeCurrentValues); + if (pGlobalData->volumePreviousValues) + HeapFree(GetProcessHeap(), 0, pGlobalData->volumePreviousValues); + + if (pGlobalData->volumeInitialValues) + HeapFree(GetProcessHeap(), 0, pGlobalData->volumeInitialValues); + mixerClose(pGlobalData->hMixer); DestroyIcon(pGlobalData->hIconMuted); DestroyIcon(pGlobalData->hIconUnMuted); @@ -539,9 +577,15 @@ VolumeDlgProc(HWND hwndDlg, break; case WM_NOTIFY: - if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY) + switch (((LPNMHDR)lParam)->code) { - SaveData(hwndDlg); + case PSN_APPLY: + SaveData(hwndDlg); + break; + + case PSN_RESET: + RestoreVolumeValue(pGlobalData); + break; } return TRUE; }
5 years, 7 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200