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
January 2018
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
37 participants
372 discussions
Start a n
N
ew thread
01/01: [DESK.CPL] Update de-DE.rc for flat menus option
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2382435e884e117577e89…
commit 2382435e884e117577e899374c9f38d9312e085e Author: Joachim Henze <Joachim.Henze(a)reactos.org> AuthorDate: Tue Jan 23 19:29:28 2018 +0100 Commit: Joachim Henze <Joachim.Henze(a)reactos.org> CommitDate: Tue Jan 23 19:29:28 2018 +0100 [DESK.CPL] Update de-DE.rc for flat menus option --- dll/cpl/desk/lang/de-DE.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/cpl/desk/lang/de-DE.rc b/dll/cpl/desk/lang/de-DE.rc index f555dfe55b..9b9a325ff1 100644 --- a/dll/cpl/desk/lang/de-DE.rc +++ b/dll/cpl/desk/lang/de-DE.rc @@ -109,7 +109,7 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "Ver&stecke Unterstrich der Tastaturnavigation bis zum Druck der Alt-Taste", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 - CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + CONTROL "Ver&wende flache Menüs", IDC_EFFAPPEARANCE_FLATMENUS, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Abbrechen", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14
6 years, 11 months
1
0
0
0
01/01: [UXTHEME] Add missing THEME_BUTTON_STATES
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=25564cda9d2389595ddf3…
commit 25564cda9d2389595ddf3fc65214824b380d5d46 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Tue Jan 23 14:05:09 2018 +0300 Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org> CommitDate: Tue Jan 23 14:46:57 2018 +0200 [UXTHEME] Add missing THEME_BUTTON_STATES CORE-14245 #resolve --- dll/win32/uxtheme/nonclient.c | 12 +++++------- dll/win32/uxtheme/uxthemep.h | 5 ++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dll/win32/uxtheme/nonclient.c b/dll/win32/uxtheme/nonclient.c index fb40624fcb..b777d02e41 100644 --- a/dll/win32/uxtheme/nonclient.c +++ b/dll/win32/uxtheme/nonclient.c @@ -289,7 +289,7 @@ ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext, if (!(pcontext->wi.dwStyle & WS_MINIMIZEBOX)) return; else - iStateId = BUTTON_DISABLED; + iStateId = (pcontext->Active ? BUTTON_DISABLED : BUTTON_INACTIVE_DISABLED); } iPartId = pcontext->wi.dwStyle & WS_MAXIMIZE ? WP_RESTOREBUTTON : WP_MAXBUTTON; @@ -301,7 +301,7 @@ ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext, if (!(pcontext->wi.dwStyle & WS_MAXIMIZEBOX)) return; else - iStateId = BUTTON_DISABLED; + iStateId = (pcontext->Active ? BUTTON_DISABLED : BUTTON_INACTIVE_DISABLED); } iPartId = pcontext->wi.dwStyle & WS_MINIMIZE ? WP_RESTOREBUTTON : WP_MINBUTTON; @@ -322,13 +322,11 @@ static DWORD ThemeGetButtonState(DWORD htCurrect, DWORD htHot, DWORD htDown, BOOL Active) { if (htHot == htCurrect) - return BUTTON_HOT; - if (!Active) - return BUTTON_INACTIVE; + return (Active ? BUTTON_HOT : BUTTON_INACTIVE_HOT); if (htDown == htCurrect) - return BUTTON_PRESSED; + return (Active ? BUTTON_PRESSED : BUTTON_INACTIVE_PRESSED); - return BUTTON_NORMAL; + return (Active ? BUTTON_NORMAL : BUTTON_INACTIVE); } /* Used only from mouse event handlers */ diff --git a/dll/win32/uxtheme/uxthemep.h b/dll/win32/uxtheme/uxthemep.h index 2708cdd48f..31e50566b9 100644 --- a/dll/win32/uxtheme/uxthemep.h +++ b/dll/win32/uxtheme/uxthemep.h @@ -205,7 +205,10 @@ typedef enum { BUTTON_HOT , BUTTON_PRESSED , BUTTON_DISABLED , - BUTTON_INACTIVE + BUTTON_INACTIVE , + BUTTON_INACTIVE_HOT , + BUTTON_INACTIVE_PRESSED , + BUTTON_INACTIVE_DISABLED } THEME_BUTTON_STATES; #define HT_ISBUTTON(ht) ((ht) == HTMINBUTTON || (ht) == HTMAXBUTTON || (ht) == HTCLOSE || (ht) == HTHELP)
6 years, 11 months
1
0
0
0
01/01: [SHLWAPI] Partly revert SHLWAPI Wine 3.0 sync b725032 .
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9e07da5ccb84b5aad5d3c…
commit 9e07da5ccb84b5aad5d3ca1dee82af5efaffdd30 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Jan 22 20:54:31 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Jan 22 21:07:21 2018 +0100 [SHLWAPI] Partly revert SHLWAPI Wine 3.0 sync b725032 . This Wine sync (that was not done against WineStaging) erased code that had been submitted to WineStaging by the ReactOS team (clist.c fixes, see r73565 a05881c and r73976 7b6b597) or added in r68042 9a78054. To that aim I add explicit #if(n)def __REACTOS__ guards around the code. --- dll/win32/shlwapi/assoc.c | 234 ++++++++++++++++++++++++++++++++++++++++++++++ dll/win32/shlwapi/clist.c | 32 ++++++- 2 files changed, 265 insertions(+), 1 deletion(-) diff --git a/dll/win32/shlwapi/assoc.c b/dll/win32/shlwapi/assoc.c index b34c272455..a6d03a1a4b 100644 --- a/dll/win32/shlwapi/assoc.c +++ b/dll/win32/shlwapi/assoc.c @@ -89,6 +89,177 @@ HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface) return SHCoCreateInstance( NULL, &clsid, NULL, refiid, lpInterface ); } +#ifdef __REACTOS__ + +struct AssocPerceivedInfo +{ + PCWSTR Type; + PERCEIVED Perceived; + INT FlagHardcoded; + INT FlagSoftcoded; + PCWSTR Extensions; +}; + +static const WCHAR unspecified_exts[] = { + '.','l','n','k',0, + '.','s','e','a','r','c','h','-','m','s',0, + 0 +}; + +static const WCHAR image_exts[] = { + '.','b','m','p',0, + '.','d','i','b',0, + '.','e','m','f',0, + '.','g','i','f',0, + '.','i','c','o',0, + '.','j','f','i','f',0, + '.','j','p','e',0, + '.','j','p','e','g',0, + '.','j','p','g',0, + '.','p','n','g',0, + '.','r','l','e',0, + '.','t','i','f',0, + '.','t','i','f','f',0, + '.','w','m','f',0, + 0 +}; + +static const WCHAR audio_exts[] = { + '.','a','i','f',0, + '.','a','i','f','c',0, + '.','a','i','f','f',0, + '.','a','u',0, + '.','m','3','u',0, + '.','m','i','d',0, + '.','m','i','d','i',0, +#if _WIN32_WINNT > 0x602 + '.','m','p','2',0, +#endif + '.','m','p','3',0, + '.','r','m','i',0, + '.','s','n','d',0, + '.','w','a','v',0, + '.','w','a','x',0, + '.','w','m','a',0, + 0 +}; + +static const WCHAR video_exts[] = { + '.','a','s','f',0, + '.','a','s','x',0, + '.','a','v','i',0, + '.','d','v','r','-','m','s',0, + '.','I','V','F',0, + '.','m','1','v',0, +#if _WIN32_WINNT <= 0x602 + '.','m','p','2',0, +#endif + '.','m','p','2','v',0, + '.','m','p','a',0, + '.','m','p','e',0, + '.','m','p','e','g',0, + '.','m','p','g',0, + '.','m','p','v','2',0, + '.','w','m',0, + '.','w','m','v',0, + '.','w','m','x',0, + '.','w','v','x',0, + 0 +}; + +static const WCHAR compressed_exts[] = { + '.','z','i','p',0, + 0 +}; + +static const WCHAR document_exts[] = { +#if _WIN32_WINNT >= 0x600 + '.','h','t','m',0, + '.','h','t','m','l',0, +#endif + '.','m','h','t',0, + 0 +}; + +static const WCHAR system_exts[] = { + '.','c','p','l',0, + 0 +}; + +static const WCHAR application_exts[] = { + '.','b','a','s',0, + '.','b','a','t',0, + '.','c','m','d',0, + '.','c','o','m',0, + '.','e','x','e',0, + '.','h','t','a',0, + '.','m','s','i',0, + '.','p','i','f',0, + '.','r','e','g',0, + '.','s','c','r',0, + '.','v','b',0, + 0 +}; + +const WCHAR type_text[] = {'t','e','x','t',0}; +const WCHAR type_image[] = {'i','m','a','g','e',0}; +const WCHAR type_audio[] = {'a','u','d','i','o',0}; +const WCHAR type_video[] = {'v','i','d','e','o',0}; +const WCHAR type_compressed[] = {'c','o','m','p','r','e','s','s','e','d',0}; +const WCHAR type_document[] = {'d','o','c','u','m','e','n','t',0}; +const WCHAR type_system[] = {'s','y','s','t','e','m',0}; +const WCHAR type_application[] = {'a','p','p','l','i','c','a','t','i','o','n',0}; + +#define HARDCODED_NATIVE_WMSDK (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_WMSDK) +#define HARDCODED_NATIVE_GDIPLUS (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_GDIPLUS) +#define HARDCODED_NATIVE_ZIPFLDR (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_ZIPFOLDER) +#define SOFTCODED_NATIVESUPPORT (PERCEIVEDFLAG_SOFTCODED | PERCEIVEDFLAG_NATIVESUPPORT) + +static const struct AssocPerceivedInfo known_types[] = { + { NULL, PERCEIVED_TYPE_UNSPECIFIED, PERCEIVEDFLAG_HARDCODED, PERCEIVEDFLAG_SOFTCODED, unspecified_exts }, + { type_text, PERCEIVED_TYPE_TEXT, PERCEIVEDFLAG_HARDCODED, SOFTCODED_NATIVESUPPORT, NULL }, + { type_image, PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, PERCEIVEDFLAG_SOFTCODED, image_exts }, + { type_audio, PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, PERCEIVEDFLAG_SOFTCODED, audio_exts }, + { type_video, PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, PERCEIVEDFLAG_SOFTCODED, video_exts }, + { type_compressed, PERCEIVED_TYPE_COMPRESSED, HARDCODED_NATIVE_ZIPFLDR, PERCEIVEDFLAG_SOFTCODED, compressed_exts }, + { type_document, PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_HARDCODED, PERCEIVEDFLAG_SOFTCODED, document_exts }, + { type_system, PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_HARDCODED, PERCEIVEDFLAG_SOFTCODED, system_exts }, + { type_application, PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, PERCEIVEDFLAG_SOFTCODED, application_exts }, +}; + +static const struct AssocPerceivedInfo* AssocFindByBuiltinExtension(LPCWSTR pszExt) +{ + UINT n; + for (n = 0; n < sizeof(known_types) / sizeof(known_types[0]); ++n) + { + PCWSTR Ext = known_types[n].Extensions; + while (Ext && *Ext) + { + if (!StrCmpIW(Ext, pszExt)) + return &known_types[n]; + Ext += (strlenW(Ext) + 1); + } + } + return NULL; +} + +static const struct AssocPerceivedInfo* AssocFindByType(LPCWSTR pszType) +{ + UINT n; + for (n = 0; n < sizeof(known_types) / sizeof(known_types[0]); ++n) + { + if (known_types[n].Type) + { + if (!StrCmpIW(known_types[n].Type, pszType)) + return &known_types[n]; + } + } + return NULL; +} + +#endif + + /************************************************************************* * AssocGetPerceivedType [SHLWAPI.@] * @@ -111,18 +282,81 @@ HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface) * if lpType or lpFlag are NULL, the function will crash. * if lpszExt is NULL, an error is returned. * +#ifndef __REACTOS__ * BUGS * Unimplemented. +#endif */ HRESULT WINAPI AssocGetPerceivedType(LPCWSTR lpszExt, PERCEIVED *lpType, INT *lpFlag, LPWSTR *lppszType) { +#ifndef __REACTOS__ + FIXME("(%s, %p, %p, %p) not supported\n", debugstr_w(lpszExt), lpType, lpFlag, lppszType); if (lpszExt == NULL) return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); return E_NOTIMPL; + +#else + + static const WCHAR PerceivedTypeKey[] = {'P','e','r','c','e','i','v','e','d','T','y','p','e',0}; + static const WCHAR SystemFileAssociationsKey[] = {'S','y','s','t','e','m','F','i','l','e', + 'A','s','s','o','c','i','a','t','i','o','n','s','\\','%','s',0}; + const struct AssocPerceivedInfo *Info; + + TRACE("(%s,%p,%p,%p)\n", debugstr_w(lpszExt), lpType, lpFlag, lppszType); + + Info = AssocFindByBuiltinExtension(lpszExt); + if (Info) + { + *lpType = Info->Perceived; + *lpFlag = Info->FlagHardcoded; + } + else + { + WCHAR Buffer[100] = { 0 }; + DWORD Size = sizeof(Buffer); + if (RegGetValueW(HKEY_CLASSES_ROOT, lpszExt, PerceivedTypeKey, + RRF_RT_REG_SZ, NULL, Buffer, &Size) == ERROR_SUCCESS) + { + Info = AssocFindByType(Buffer); + } + if (!Info) + { + WCHAR KeyName[MAX_PATH] = { 0 }; + snprintfW(KeyName, MAX_PATH, SystemFileAssociationsKey, lpszExt); + Size = sizeof(Buffer); + if (RegGetValueW(HKEY_CLASSES_ROOT, KeyName, PerceivedTypeKey, + RRF_RT_REG_SZ, NULL, Buffer, &Size) == ERROR_SUCCESS) + { + Info = AssocFindByType(Buffer); + } + } + if (Info) + { + *lpType = Info->Perceived; + *lpFlag = Info->FlagSoftcoded; + } + } + + if (Info) + { + if (lppszType && Info->Type) + { + return SHStrDupW(Info->Type, lppszType); + } + return Info->Type ? S_OK : E_FAIL; + } + else + { + *lpType = PERCEIVED_TYPE_UNSPECIFIED; + *lpFlag = 0; + } + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + +#endif } /************************************************************************* diff --git a/dll/win32/shlwapi/clist.c b/dll/win32/shlwapi/clist.c index 763a40e349..52c5f6107f 100644 --- a/dll/win32/shlwapi/clist.c +++ b/dll/win32/shlwapi/clist.c @@ -45,8 +45,13 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList) * lpNewItem [I] The new item to add to the list * * RETURNS +#ifndef __REACTOS__ * Success: S_OK. The item is added to the list. * Failure: An HRESULT error code. +#else + * Success: TRUE. The item is added to the list. + * Failure: FALSE. +#endif * * NOTES * If the size of the element to be inserted is less than the size of a @@ -54,7 +59,12 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList) * the call returns S_OK but does not actually add the element. * See SHWriteDataBlockList. */ -HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem) +#ifndef __REACTOS__ +HRESULT +#else +BOOL +#endif +WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem) { LPDATABLOCK_HEADER lpInsertAt = NULL; ULONG ulSize; @@ -62,11 +72,19 @@ HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewIt TRACE("(%p,%p)\n", lppList, lpNewItem); if(!lppList || !lpNewItem ) +#ifndef __REACTOS__ return E_INVALIDARG; +#else + return FALSE; +#endif if (lpNewItem->cbSize < sizeof(DATABLOCK_HEADER) || lpNewItem->dwSignature == CLIST_ID_CONTAINER) +#ifndef __REACTOS__ return S_OK; +#else + return FALSE; +#endif ulSize = lpNewItem->cbSize; @@ -123,9 +141,17 @@ HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewIt lpInsertAt = NextItem(lpInsertAt); lpInsertAt->cbSize = 0; +#ifndef __REACTOS__ return lpNewItem->cbSize; +#else + return TRUE; +#endif } +#ifndef __REACTOS__ return S_OK; +#else + return FALSE; +#endif } /************************************************************************* @@ -343,7 +369,11 @@ VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList) */ BOOL WINAPI SHRemoveDataBlock(LPDBLIST* lppList, DWORD dwSignature) { +#ifndef __REACTOS__ LPDATABLOCK_HEADER lpList = 0; +#else + LPDATABLOCK_HEADER lpList = NULL; +#endif LPDATABLOCK_HEADER lpItem = NULL; LPDATABLOCK_HEADER lpNext; ULONG ulNewSize;
6 years, 11 months
1
0
0
0
01/01: [WIN32K:NTUSER] Fix color indices for themes
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c22c6e3ba349c4db4b5d7…
commit c22c6e3ba349c4db4b5d7dda2dbe28636da0dabb Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Mon Jan 22 00:09:16 2018 +0300 Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org> CommitDate: Mon Jan 22 21:45:50 2018 +0200 [WIN32K:NTUSER] Fix color indices for themes CORE-14231 #resolve --- win32ss/user/ntuser/menu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c index 1407ef1d0a..4de96e892a 100644 --- a/win32ss/user/ntuser/menu.c +++ b/win32ss/user/ntuser/menu.c @@ -2511,11 +2511,11 @@ static void FASTCALL MENU_DrawMenuItem(PWND Wnd, PMENU Menu, PWND WndOwner, HDC if (!(lpitem->fState & MF_HILITE) ) { ++rect.left; ++rect.top; ++rect.right; ++rect.bottom; - IntGdiSetTextColor(hdc, IntGetSysColor(COLOR_HIGHLIGHTTEXT)); + IntGdiSetTextColor(hdc, IntGetSysColor(COLOR_BTNHIGHLIGHT)); DrawTextW( hdc, Text, i, &rect, uFormat ); --rect.left; --rect.top; --rect.right; --rect.bottom; } - IntGdiSetTextColor(hdc, IntGetSysColor(COLOR_GRAYTEXT)); + IntGdiSetTextColor(hdc, IntGetSysColor(COLOR_BTNSHADOW)); } DrawTextW( hdc, Text, i, &rect, uFormat); @@ -2538,11 +2538,11 @@ static void FASTCALL MENU_DrawMenuItem(PWND Wnd, PMENU Menu, PWND WndOwner, HDC if (!(lpitem->fState & MF_HILITE) ) { ++rect.left; ++rect.top; ++rect.right; ++rect.bottom; - IntGdiSetTextColor(hdc, IntGetSysColor(COLOR_HIGHLIGHTTEXT)); + IntGdiSetTextColor(hdc, IntGetSysColor(COLOR_BTNHIGHLIGHT)); DrawTextW( hdc, Text + i + 1, -1, &rect, uFormat); --rect.left; --rect.top; --rect.right; --rect.bottom; } - IntGdiSetTextColor(hdc, IntGetSysColor(COLOR_GRAYTEXT)); + IntGdiSetTextColor(hdc, IntGetSysColor(COLOR_BTNSHADOW)); } DrawTextW( hdc, Text + i + 1, -1, &rect, uFormat ); }
6 years, 11 months
1
0
0
0
01/01: [DESK.CPL] Fix hardcoded colors in classic theme preview
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e8ec23fcd224024070d5e…
commit e8ec23fcd224024070d5e9a13621538aa6b7742a Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Mon Jan 22 14:41:51 2018 +0300 Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org> CommitDate: Mon Jan 22 21:45:03 2018 +0200 [DESK.CPL] Fix hardcoded colors in classic theme preview CORE-14238 #resolve --- dll/cpl/desk/draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/cpl/desk/draw.c b/dll/cpl/desk/draw.c index f055832148..891b91d7dc 100644 --- a/dll/cpl/desk/draw.c +++ b/dll/cpl/desk/draw.c @@ -611,10 +611,10 @@ MyDrawMenuBarTemp(HWND Wnd, HDC DC, LPRECT Rect, HMENU Menu, HFONT Font, COLOR_S if (i == 1) { ++rect.left; ++rect.top; ++rect.right; ++rect.bottom; - SetTextColor(DC, RGB(0xff, 0xff, 0xff)); + SetTextColor(DC, scheme->crColor[COLOR_BTNHIGHLIGHT]); DrawTextW(DC, Text, -1, &rect, uFormat); --rect.left; --rect.top; --rect.right; --rect.bottom; - SetTextColor(DC, RGB(0x80, 0x80, 0x80)); + SetTextColor(DC, scheme->crColor[COLOR_BTNSHADOW]); } DrawTextW(DC, Text, -1, &rect, uFormat); }
6 years, 11 months
1
0
0
0
01/01: [DESK.CPL] Add flat menus option to effects dialog
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=46c40d4cb5eec5147b9a0…
commit 46c40d4cb5eec5147b9a0da051bfbff7f8aa5846 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Mon Jan 22 21:06:53 2018 +0300 Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org> CommitDate: Mon Jan 22 20:42:10 2018 +0200 [DESK.CPL] Add flat menus option to effects dialog --- dll/cpl/desk/effappdlg.c | 17 +++++++++++++++++ dll/cpl/desk/lang/bg-BG.rc | 2 ++ dll/cpl/desk/lang/cs-CZ.rc | 2 ++ dll/cpl/desk/lang/de-DE.rc | 2 ++ dll/cpl/desk/lang/el-GR.rc | 2 ++ dll/cpl/desk/lang/en-GB.rc | 2 ++ dll/cpl/desk/lang/en-US.rc | 2 ++ dll/cpl/desk/lang/es-ES.rc | 2 ++ dll/cpl/desk/lang/fr-FR.rc | 2 ++ dll/cpl/desk/lang/he-IL.rc | 2 ++ dll/cpl/desk/lang/hu-HU.rc | 2 ++ dll/cpl/desk/lang/id-ID.rc | 2 ++ dll/cpl/desk/lang/it-IT.rc | 2 ++ dll/cpl/desk/lang/ja-JP.rc | 2 ++ dll/cpl/desk/lang/nl-NL.rc | 2 ++ dll/cpl/desk/lang/no-NO.rc | 2 ++ dll/cpl/desk/lang/pl-PL.rc | 2 ++ dll/cpl/desk/lang/pt-BR.rc | 2 ++ dll/cpl/desk/lang/ro-RO.rc | 2 ++ dll/cpl/desk/lang/ru-RU.rc | 2 ++ dll/cpl/desk/lang/sk-SK.rc | 2 ++ dll/cpl/desk/lang/sq-AL.rc | 2 ++ dll/cpl/desk/lang/sv-SE.rc | 2 ++ dll/cpl/desk/lang/tr-TR.rc | 2 ++ dll/cpl/desk/lang/uk-UA.rc | 2 ++ dll/cpl/desk/lang/zh-CN.rc | 2 ++ dll/cpl/desk/lang/zh-TW.rc | 2 ++ dll/cpl/desk/resource.h | 1 + 28 files changed, 70 insertions(+) diff --git a/dll/cpl/desk/effappdlg.c b/dll/cpl/desk/effappdlg.c index e5856a2d48..e34ae4eea6 100644 --- a/dll/cpl/desk/effappdlg.c +++ b/dll/cpl/desk/effappdlg.c @@ -23,6 +23,12 @@ do { \ ((state == BST_CHECKED) != (__CONTROL_ID == IDC_EFFAPPEARANCE_KEYBOARDCUES)); \ } while(0) +#define SAVE_CHECKBOX_SCH(__CONTROL_ID, __MEMBER) \ +do { \ + state = SendDlgItemMessageW(hwndDlg, __CONTROL_ID, BM_GETCHECK, 0, 0); \ + g->SchemeAdv.__MEMBER = (state == BST_CHECKED); \ +} while(0) + #define RSET_COMBOBOX(__CONTROL_ID, __PARENT_MEMBER, __MEMBER) \ do { \ SendDlgItemMessageW(hwndDlg, __CONTROL_ID, CB_SETCURSEL, (WPARAM)g->SchemeAdv.Effects.__MEMBER, 0); \ @@ -41,6 +47,7 @@ do { \ SAVE_CHECKBOX(IDC_EFFAPPEARANCE_SETDROPSHADOW, bDropShadow); SAVE_CHECKBOX(IDC_EFFAPPEARANCE_DRAGFULLWINDOWS, bDragFullWindows); SAVE_CHECKBOX(IDC_EFFAPPEARANCE_KEYBOARDCUES, bKeyboardCues); + SAVE_CHECKBOX_SCH(IDC_EFFAPPEARANCE_FLATMENUS, bFlatMenus); #undef SAVE_CHECKBOX #undef RSET_COMBOBOX @@ -85,6 +92,14 @@ do { \ SendDlgItemMessageW(hwndDlg, __CONTROL_ID, BM_SETCHECK, state, 0); \ } while(0) +#define INIT_CHECKBOX_SCH(__CONTROL_ID, __MEMBER) \ +do { \ + state = /* Do a XOR of both the conditions */ \ + ((g->SchemeAdv.__MEMBER) == TRUE) \ + ? BST_CHECKED : BST_UNCHECKED; \ + SendDlgItemMessageW(hwndDlg, __CONTROL_ID, BM_SETCHECK, state, 0); \ +} while(0) + #define FILL_COMBOBOX(__CONTROL_ID, __FIRST_STR, __LAST_STR) \ AddToCombobox(__CONTROL_ID, hwndDlg, __FIRST_STR, __LAST_STR) @@ -102,6 +117,7 @@ do { \ INIT_CHECKBOX(IDC_EFFAPPEARANCE_SETDROPSHADOW, bDropShadow); INIT_CHECKBOX(IDC_EFFAPPEARANCE_DRAGFULLWINDOWS, bDragFullWindows); INIT_CHECKBOX(IDC_EFFAPPEARANCE_KEYBOARDCUES, bKeyboardCues); + INIT_CHECKBOX_SCH(IDC_EFFAPPEARANCE_FLATMENUS, bFlatMenus); #undef INIT_CHECKBOX #undef FILL_COMBOBOX @@ -146,6 +162,7 @@ EffAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case IDC_EFFAPPEARANCE_SETDROPSHADOW: case IDC_EFFAPPEARANCE_DRAGFULLWINDOWS: case IDC_EFFAPPEARANCE_KEYBOARDCUES: + case IDC_EFFAPPEARANCE_FLATMENUS: if (HIWORD(wParam) == BN_CLICKED) { EffAppearanceDlgUpdateControls(hwndDlg, g); diff --git a/dll/cpl/desk/lang/bg-BG.rc b/dll/cpl/desk/lang/bg-BG.rc index 780247ecd9..e946ca5983 100644 --- a/dll/cpl/desk/lang/bg-BG.rc +++ b/dll/cpl/desk/lang/bg-BG.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "С&криване на подчертаването за клавиатурното насочване, до натискане на Alt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Отказ", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "Добре", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/cs-CZ.rc b/dll/cpl/desk/lang/cs-CZ.rc index 95c5bd907c..107c682255 100644 --- a/dll/cpl/desk/lang/cs-CZ.rc +++ b/dll/cpl/desk/lang/cs-CZ.rc @@ -115,6 +115,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Nezobrazovat podtržení písmen u klávesových zkratek, dokud nestisknu klávesu Alt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Storno", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/de-DE.rc b/dll/cpl/desk/lang/de-DE.rc index c49ebeb932..f555dfe55b 100644 --- a/dll/cpl/desk/lang/de-DE.rc +++ b/dll/cpl/desk/lang/de-DE.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "Ver&stecke Unterstrich der Tastaturnavigation bis zum Druck der Alt-Taste", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Abbrechen", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/el-GR.rc b/dll/cpl/desk/lang/el-GR.rc index 304a15f168..6b15f528df 100644 --- a/dll/cpl/desk/lang/el-GR.rc +++ b/dll/cpl/desk/lang/el-GR.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Hide underlined letters for keyboard navigation until I press the Alt key", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Cancel", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/en-GB.rc b/dll/cpl/desk/lang/en-GB.rc index 75a53f3e5b..fdae5dfc99 100644 --- a/dll/cpl/desk/lang/en-GB.rc +++ b/dll/cpl/desk/lang/en-GB.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Hide underlined letters for keyboard navigation until I press the Alt key", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Cancel", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/en-US.rc b/dll/cpl/desk/lang/en-US.rc index c29493c1bd..87f7f7ddbc 100644 --- a/dll/cpl/desk/lang/en-US.rc +++ b/dll/cpl/desk/lang/en-US.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Hide underlined letters for keyboard navigation until I press the Alt key", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Cancel", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/es-ES.rc b/dll/cpl/desk/lang/es-ES.rc index 815192ea1f..1188713443 100644 --- a/dll/cpl/desk/lang/es-ES.rc +++ b/dll/cpl/desk/lang/es-ES.rc @@ -111,6 +111,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Ocultar el subrayado de acceso rápido hasta presionar la tecla Alt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Cancelar", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "Aceptar", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/fr-FR.rc b/dll/cpl/desk/lang/fr-FR.rc index 820eb254d6..b5d4d35672 100644 --- a/dll/cpl/desk/lang/fr-FR.rc +++ b/dll/cpl/desk/lang/fr-FR.rc @@ -111,6 +111,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Cacher les lettres soulignées pour la navigation du clavier jusqu'à ce que j'appuie sur la touche Alt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Annuler", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "Accepter", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/he-IL.rc b/dll/cpl/desk/lang/he-IL.rc index cd5b9adbbe..c37d2c94ab 100644 --- a/dll/cpl/desk/lang/he-IL.rc +++ b/dll/cpl/desk/lang/he-IL.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Hide underlined letters for keyboard navigation until I press the Alt key", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "ביטול", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "אישור", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/hu-HU.rc b/dll/cpl/desk/lang/hu-HU.rc index fd99370fc4..141e8b90e7 100644 --- a/dll/cpl/desk/lang/hu-HU.rc +++ b/dll/cpl/desk/lang/hu-HU.rc @@ -111,6 +111,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Hide underlined letters for keyboard navigation until I press the Alt key", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Cancel", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/id-ID.rc b/dll/cpl/desk/lang/id-ID.rc index fbae9c9b88..e97de4556d 100644 --- a/dll/cpl/desk/lang/id-ID.rc +++ b/dll/cpl/desk/lang/id-ID.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Hide underlined letters for keyboard navigation until I press the Alt key", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Cancel", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/it-IT.rc b/dll/cpl/desk/lang/it-IT.rc index 0d44f3da77..41109ebf3f 100644 --- a/dll/cpl/desk/lang/it-IT.rc +++ b/dll/cpl/desk/lang/it-IT.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Nascondere la sottolineatura delle lettere di navigazione finche non è premuto il tasto Alt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Annulla", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/ja-JP.rc b/dll/cpl/desk/lang/ja-JP.rc index 20ff2aa926..b54c0df6c5 100644 --- a/dll/cpl/desk/lang/ja-JP.rc +++ b/dll/cpl/desk/lang/ja-JP.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "Alt キーを押すまでキーボード ナビゲーションの下線を隠しておく(&H)", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "キャンセル", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/nl-NL.rc b/dll/cpl/desk/lang/nl-NL.rc index 2cd1033e31..4e80c3eca0 100644 --- a/dll/cpl/desk/lang/nl-NL.rc +++ b/dll/cpl/desk/lang/nl-NL.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "Onderstreepte letters voor toetsenbordnavigatie &verbergen tot ALT wordt ingedrukt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Annuleren", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/no-NO.rc b/dll/cpl/desk/lang/no-NO.rc index 210f49f7ae..71816e4bf5 100644 --- a/dll/cpl/desk/lang/no-NO.rc +++ b/dll/cpl/desk/lang/no-NO.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Skjul visning av understrekning for tastatur hurtigtast til jeg trykker på Alt tasten", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Avbryt", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/pl-PL.rc b/dll/cpl/desk/lang/pl-PL.rc index a108d91f0a..3702194b57 100644 --- a/dll/cpl/desk/lang/pl-PL.rc +++ b/dll/cpl/desk/lang/pl-PL.rc @@ -118,6 +118,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "Ukryj podkreślenie liter do nawigacji &klawiaturą, dopóki nie nacisnę klawisza Alt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Anuluj", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/pt-BR.rc b/dll/cpl/desk/lang/pt-BR.rc index fffaca84bf..9aacdf4739 100644 --- a/dll/cpl/desk/lang/pt-BR.rc +++ b/dll/cpl/desk/lang/pt-BR.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Ocultar sublinhados para navegação do teclado até eu pressionar a tecla Alt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Cancelar", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/ro-RO.rc b/dll/cpl/desk/lang/ro-RO.rc index 0dfbb37cb5..7c8a975a20 100644 --- a/dll/cpl/desk/lang/ro-RO.rc +++ b/dll/cpl/desk/lang/ro-RO.rc @@ -114,6 +114,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Amână sublinierea literelor navigării din tastatură până la apăsarea tastei «Alt»", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "A&nulează", IDCANCEL, 130, 165, 50, 14 DEFPUSHBUTTON "Con&firmă", IDOK, 77, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/ru-RU.rc b/dll/cpl/desk/lang/ru-RU.rc index 78c9b5bbc7..62925bbbe9 100644 --- a/dll/cpl/desk/lang/ru-RU.rc +++ b/dll/cpl/desk/lang/ru-RU.rc @@ -109,6 +109,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "Скр&ывать указатели вызова с клавиатуры до нажатия <Alt>", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Отмена", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/sk-SK.rc b/dll/cpl/desk/lang/sk-SK.rc index 5c6311dad8..32b43cb9a0 100644 --- a/dll/cpl/desk/lang/sk-SK.rc +++ b/dll/cpl/desk/lang/sk-SK.rc @@ -111,6 +111,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Skrývať podčiarknuté písmená (klávesové skratky) až do stlačenia klávesu Alt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Zrušiť", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/sq-AL.rc b/dll/cpl/desk/lang/sq-AL.rc index 0a9fc973ab..c04ec0794d 100644 --- a/dll/cpl/desk/lang/sq-AL.rc +++ b/dll/cpl/desk/lang/sq-AL.rc @@ -113,6 +113,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "Fsheh gërma të nënvizuara për kërkimin e tastierës deri sa të shtypni butonin Alt", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Anulo", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/sv-SE.rc b/dll/cpl/desk/lang/sv-SE.rc index f286b2a921..d7530faa56 100644 --- a/dll/cpl/desk/lang/sv-SE.rc +++ b/dll/cpl/desk/lang/sv-SE.rc @@ -111,6 +111,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Hide underlined letters for keyboard navigation until I press the Alt key", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Cancel", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/tr-TR.rc b/dll/cpl/desk/lang/tr-TR.rc index e257e4c578..acb07dc767 100644 --- a/dll/cpl/desk/lang/tr-TR.rc +++ b/dll/cpl/desk/lang/tr-TR.rc @@ -111,6 +111,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "S&eçenek Düğmesine Basana Dek Düğme Takımıyla Gezinme İçin Altı Çizili Harfleri Gizle", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "İptal", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "Tamam", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/uk-UA.rc b/dll/cpl/desk/lang/uk-UA.rc index f768d29008..0763067d8f 100644 --- a/dll/cpl/desk/lang/uk-UA.rc +++ b/dll/cpl/desk/lang/uk-UA.rc @@ -117,6 +117,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "&Приховувати покажчики виклику з клавіатури до натиснення <Alt>", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "Скасувати", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/zh-CN.rc b/dll/cpl/desk/lang/zh-CN.rc index 15c121b48d..7fb48832e3 100644 --- a/dll/cpl/desk/lang/zh-CN.rc +++ b/dll/cpl/desk/lang/zh-CN.rc @@ -117,6 +117,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "直到我按 Alt 键之前,请隐藏有下划线的字母供键盘使用", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "取消", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "确定", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/lang/zh-TW.rc b/dll/cpl/desk/lang/zh-TW.rc index fb057d3053..6b64aa6665 100644 --- a/dll/cpl/desk/lang/zh-TW.rc +++ b/dll/cpl/desk/lang/zh-TW.rc @@ -111,6 +111,8 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "直到我按 Alt 鍵之前,請隱藏有下劃線的字母供鍵盤使用", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "取消", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "確定", IDOK, 172, 165, 50, 14 END diff --git a/dll/cpl/desk/resource.h b/dll/cpl/desk/resource.h index 6884290e16..816ab45311 100644 --- a/dll/cpl/desk/resource.h +++ b/dll/cpl/desk/resource.h @@ -160,6 +160,7 @@ #define IDC_EFFAPPEARANCE_LARGEICONS 3606 #define IDC_EFFAPPEARANCE_SETDROPSHADOW 3607 #define IDC_EFFAPPEARANCE_DRAGFULLWINDOWS 3608 +#define IDC_EFFAPPEARANCE_FLATMENUS 3609 #define IDS_SLIDEEFFECT 3701 #define IDS_FADEEFFECT 3702
6 years, 11 months
1
0
0
0
01/01: [WINSRV] -Fix inline functions definitions This fixes -O0 compilation
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c4ee1a3460e55d1f16bd6…
commit c4ee1a3460e55d1f16bd6ef1b6223070ad3ced57 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Mon Jan 22 18:14:36 2018 +0100 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Mon Jan 22 18:17:50 2018 +0100 [WINSRV] -Fix inline functions definitions This fixes -O0 compilation --- win32ss/user/winsrv/consrv/frontends/gui/guiterm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h index 627237237d..1d29d352c7 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h +++ b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h @@ -14,7 +14,7 @@ #include "guisettings.h" #include "conwnd.h" -extern inline +FORCEINLINE VOID GetScreenBufferSizeUnits(IN PCONSOLE_SCREEN_BUFFER Buffer, IN PGUI_CONSOLE_DATA GuiData, @@ -35,7 +35,7 @@ GetScreenBufferSizeUnits(IN PCONSOLE_SCREEN_BUFFER Buffer, } } -extern inline +FORCEINLINE VOID SmallRectToRect(PGUI_CONSOLE_DATA GuiData, PRECT Rect, PSMALL_RECT SmallRect) {
6 years, 11 months
1
0
0
0
01/01: [KBSWITCH] Update tray icon on color scheme change
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=20a782b7b191ed57a4877…
commit 20a782b7b191ed57a4877107faeba29bdd0ef6fa Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Mon Jan 22 17:49:33 2018 +0300 Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org> CommitDate: Mon Jan 22 18:56:41 2018 +0200 [KBSWITCH] Update tray icon on color scheme change CORE-14240 #resolve --- base/applications/kbswitch/kbswitch.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/base/applications/kbswitch/kbswitch.c b/base/applications/kbswitch/kbswitch.c index d06cd5f9a2..61fa5cc4cb 100644 --- a/base/applications/kbswitch/kbswitch.c +++ b/base/applications/kbswitch/kbswitch.c @@ -396,11 +396,28 @@ GetNextLayout(VOID) return -1; } +LRESULT +UpdateLanguageDisplay(HWND hwnd, HKL hKl) +{ + static TCHAR szLCID[MAX_PATH], szLangName[MAX_PATH]; + + GetLayoutIDByHkl(hKl, szLCID, ARRAYSIZE(szLCID)); + GetLocaleInfo((LANGID)_tcstoul(szLCID, NULL, 16), LOCALE_SLANGUAGE, (LPTSTR)szLangName, ARRAYSIZE(szLangName)); + UpdateTrayIcon(hwnd, szLCID, szLangName); + + return 0; +} + +LRESULT +UpdateLanguageDisplayCurrent(HWND hwnd, WPARAM wParam) +{ + return UpdateLanguageDisplay(hwnd, GetKeyboardLayout(GetWindowThreadProcessId((HWND)wParam, 0))); +} + LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { static HMENU hRightPopupMenu; - static TCHAR szLCID[MAX_PATH], szLangName[MAX_PATH]; static UINT s_uTaskbarRestart; switch (Message) @@ -419,11 +436,7 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) case WM_LANG_CHANGED: { - GetLayoutIDByHkl((HKL)lParam, szLCID, ARRAYSIZE(szLCID)); - GetLocaleInfo((LANGID)_tcstoul(szLCID, NULL, 16), LOCALE_SLANGUAGE, (LPTSTR)szLangName, ARRAYSIZE(szLangName)); - UpdateTrayIcon(hwnd, szLCID, szLangName); - - return 0; + return UpdateLanguageDisplay(hwnd, (HKL)lParam); } case WM_LOAD_LAYOUT: @@ -435,11 +448,7 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) case WM_WINDOW_ACTIVATE: { - GetLayoutIDByHkl(GetKeyboardLayout(GetWindowThreadProcessId((HWND)wParam, 0)), szLCID, ARRAYSIZE(szLCID)); - GetLocaleInfo((LANGID)_tcstoul(szLCID, NULL, 16), LOCALE_SLANGUAGE, (LPTSTR)szLangName, ARRAYSIZE(szLangName)); - UpdateTrayIcon(hwnd, szLCID, szLangName); - - return 0; + return UpdateLanguageDisplayCurrent(hwnd, wParam); } case WM_NOTIFYICONMSG: @@ -508,6 +517,10 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { //FIXME: Should detect default language changes by CPL applet or by other tools and update UI } + if (wParam == SPI_SETNONCLIENTMETRICS) + { + return UpdateLanguageDisplayCurrent(hwnd, wParam); + } } break;
6 years, 11 months
1
0
0
0
01/01: [DEVMGR] Implement missing device power information (current power state, power capabilities and power state mappings).
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9d29ee3a62d13feb71ffd…
commit 9d29ee3a62d13feb71ffda9cd2fd5bb13e383175 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Jan 21 12:55:13 2018 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Mon Jan 22 00:35:21 2018 +0100 [DEVMGR] Implement missing device power information (current power state, power capabilities and power state mappings). --- dll/win32/devmgr/properties/advprop.cpp | 234 +++++++++++++++++++++++++++++++- 1 file changed, 230 insertions(+), 4 deletions(-) diff --git a/dll/win32/devmgr/properties/advprop.cpp b/dll/win32/devmgr/properties/advprop.cpp index 0b59ad8634..44d8d0fa21 100644 --- a/dll/win32/devmgr/properties/advprop.cpp +++ b/dll/win32/devmgr/properties/advprop.cpp @@ -33,6 +33,28 @@ #include <winver.h> +#define PDCAP_D0_SUPPORTED 0x00000001 +#define PDCAP_D1_SUPPORTED 0x00000002 +#define PDCAP_D2_SUPPORTED 0x00000004 +#define PDCAP_D3_SUPPORTED 0x00000008 +#define PDCAP_WAKE_FROM_D0_SUPPORTED 0x00000010 +#define PDCAP_WAKE_FROM_D1_SUPPORTED 0x00000020 +#define PDCAP_WAKE_FROM_D2_SUPPORTED 0x00000040 +#define PDCAP_WAKE_FROM_D3_SUPPORTED 0x00000080 +#define PDCAP_WARM_EJECT_SUPPORTED 0x00000100 + +typedef struct CM_Power_Data_s +{ + ULONG PD_Size; + DEVICE_POWER_STATE PD_MostRecentPowerState; + ULONG PD_Capabilities; + ULONG PD_D1Latency; + ULONG PD_D2Latency; + ULONG PD_D3Latency; + DEVICE_POWER_STATE PD_PowerStateMapping[PowerSystemMaximum]; + SYSTEM_POWER_STATE PD_DeepestSystemWake; +} CM_POWER_DATA, *PCM_POWER_DATA; + static UINT WINAPI EnumDeviceDriverFilesCallback(IN PVOID Context, @@ -1381,6 +1403,204 @@ DisplayDeviceRelations( } +static VOID +DisplayCurrentPowerState( + IN PDEVADVPROP_INFO dap, + IN HWND hwndListView) +{ + HDEVINFO DeviceInfoSet; + PSP_DEVINFO_DATA DeviceInfoData; + CM_POWER_DATA PowerData; + DWORD dwSize, dwType; + PCWSTR lpText = NULL; + + if (dap->CurrentDeviceInfoSet != INVALID_HANDLE_VALUE) + { + DeviceInfoSet = dap->CurrentDeviceInfoSet; + DeviceInfoData = &dap->CurrentDeviceInfoData; + } + else + { + DeviceInfoSet = dap->DeviceInfoSet; + DeviceInfoData = &dap->DeviceInfoData; + } + + dwSize = sizeof(CM_POWER_DATA); + if (!SetupDiGetDeviceRegistryProperty(DeviceInfoSet, + DeviceInfoData, + SPDRP_DEVICE_POWER_DATA, + &dwType, + (LPBYTE)&PowerData, + dwSize, + &dwSize)) + return; + + switch (PowerData.PD_MostRecentPowerState) + { +// case PowerDeviceUnspecified: + + case PowerDeviceD0: + lpText = L"D0"; + break; + + case PowerDeviceD1: + lpText = L"D1"; + break; + + case PowerDeviceD2: + lpText = L"D2"; + break; + + case PowerDeviceD3: + lpText = L"D3"; + break; + + default: + break; + } + + if (lpText != NULL) + SetListViewText(hwndListView, 0, lpText); +} + + +static VOID +DisplayPowerCapabilities( + IN PDEVADVPROP_INFO dap, + IN HWND hwndListView) +{ + HDEVINFO DeviceInfoSet; + PSP_DEVINFO_DATA DeviceInfoData; + CM_POWER_DATA PowerData; + DWORD dwSize, dwType; + INT index = 0; + + if (dap->CurrentDeviceInfoSet != INVALID_HANDLE_VALUE) + { + DeviceInfoSet = dap->CurrentDeviceInfoSet; + DeviceInfoData = &dap->CurrentDeviceInfoData; + } + else + { + DeviceInfoSet = dap->DeviceInfoSet; + DeviceInfoData = &dap->DeviceInfoData; + } + + dwSize = sizeof(CM_POWER_DATA); + if (!SetupDiGetDeviceRegistryProperty(DeviceInfoSet, + DeviceInfoData, + SPDRP_DEVICE_POWER_DATA, + &dwType, + (LPBYTE)&PowerData, + dwSize, + &dwSize)) + return; + + if (PowerData.PD_Capabilities & PDCAP_D0_SUPPORTED) + SetListViewText(hwndListView, index++, L"PDCAP_D0_SUPPORTED"); + + if (PowerData.PD_Capabilities & PDCAP_D1_SUPPORTED) + SetListViewText(hwndListView, index++, L"PDCAP_D1_SUPPORTED"); + + if (PowerData.PD_Capabilities & PDCAP_D2_SUPPORTED) + SetListViewText(hwndListView, index++, L"PDCAP_D2_SUPPORTED"); + + if (PowerData.PD_Capabilities & PDCAP_D3_SUPPORTED) + SetListViewText(hwndListView, index++, L"PDCAP_D3_SUPPORTED"); + + if (PowerData.PD_Capabilities & PDCAP_WAKE_FROM_D0_SUPPORTED) + SetListViewText(hwndListView, index++, L"PDCAP_WAKE_FROM_D0_SUPPORTED"); + + if (PowerData.PD_Capabilities & PDCAP_WAKE_FROM_D1_SUPPORTED) + SetListViewText(hwndListView, index++, L"PDCAP_WAKE_FROM_D1_SUPPORTED"); + + if (PowerData.PD_Capabilities & PDCAP_WAKE_FROM_D2_SUPPORTED) + SetListViewText(hwndListView, index++, L"PDCAP_WAKE_FROM_D2_SUPPORTED"); + + if (PowerData.PD_Capabilities & PDCAP_WAKE_FROM_D3_SUPPORTED) + SetListViewText(hwndListView, index++, L"PDCAP_WAKE_FROM_D3_SUPPORTED"); + + if (PowerData.PD_Capabilities & PDCAP_WARM_EJECT_SUPPORTED) + SetListViewText(hwndListView, index++, L"PDCAP_WARM_EJECT_SUPPORTED"); +} + + +static VOID +DisplayPowerStateMappings( + IN PDEVADVPROP_INFO dap, + IN HWND hwndListView) +{ + HDEVINFO DeviceInfoSet; + PSP_DEVINFO_DATA DeviceInfoData; + CM_POWER_DATA PowerData; + DWORD dwSize, dwType; + INT i; + DEVICE_POWER_STATE PowerState; + WCHAR szSystemStateBuffer[40]; + WCHAR szDeviceStateBuffer[40]; + WCHAR szOutBuffer[100]; + + if (dap->CurrentDeviceInfoSet != INVALID_HANDLE_VALUE) + { + DeviceInfoSet = dap->CurrentDeviceInfoSet; + DeviceInfoData = &dap->CurrentDeviceInfoData; + } + else + { + DeviceInfoSet = dap->DeviceInfoSet; + DeviceInfoData = &dap->DeviceInfoData; + } + + dwSize = sizeof(CM_POWER_DATA); + if (!SetupDiGetDeviceRegistryProperty(DeviceInfoSet, + DeviceInfoData, + SPDRP_DEVICE_POWER_DATA, + &dwType, + (LPBYTE)&PowerData, + dwSize, + &dwSize)) + return; + + for (i = PowerSystemWorking; i < PowerSystemMaximum; i++) + { + PowerState = PowerData.PD_PowerStateMapping[i]; + if ((PowerState >= PowerDeviceUnspecified) && (PowerState <= PowerDeviceD3)) + { + swprintf(szSystemStateBuffer, L"S%u", i - 1); + + switch (PowerState) + { + case PowerDeviceUnspecified: + wcscpy(szDeviceStateBuffer, L"Not specified"); + break; + + case PowerDeviceD0: + wcscpy(szDeviceStateBuffer, L"D0"); + break; + + case PowerDeviceD1: + wcscpy(szDeviceStateBuffer, L"D1"); + break; + + case PowerDeviceD2: + wcscpy(szDeviceStateBuffer, L"D2"); + break; + + case PowerDeviceD3: + wcscpy(szDeviceStateBuffer, L"D3"); + break; + + default: + break; + } + + swprintf(szOutBuffer, L"%s -> %s", szSystemStateBuffer, szDeviceStateBuffer); + SetListViewText(hwndListView, i, szOutBuffer); + } + } +} + + static VOID DisplayDeviceProperties(IN PDEVADVPROP_INFO dap, IN HWND hwndComboBox, @@ -1399,7 +1619,7 @@ DisplayDeviceProperties(IN PDEVADVPROP_INFO dap, switch (Index) { - case 0: + case 0: /* Device ID */ SetListViewText(hwndListView, 0, dap->szDeviceID); break; @@ -1514,16 +1734,22 @@ DisplayDeviceProperties(IN PDEVADVPROP_INFO dap, #if 0 case 20: /* Firmware Revision */ break; +#endif case 21: /* Current Power State */ + DisplayCurrentPowerState(dap, + hwndListView); break; - case 20: /* Power Capabilities */ + case 22: /* Power Capabilities */ + DisplayPowerCapabilities(dap, + hwndListView); break; - case 21: /* Power State Mappings */ + case 23: /* Power State Mappings */ + DisplayPowerStateMappings(dap, + hwndListView); break; -#endif default: SetListViewText(hwndListView, 0, L"<Not implemented yet>");
6 years, 11 months
1
0
0
0
01/01: [SECUR32_WINETEST] Sync with Wine 3.0. CORE-14225
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=46598fe04a39d68d6a9d7…
commit 46598fe04a39d68d6a9d7fa6ab8de504474d9d5b Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Jan 21 22:45:12 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Jan 21 22:45:12 2018 +0100 [SECUR32_WINETEST] Sync with Wine 3.0. CORE-14225 --- modules/rostests/winetests/secur32/negotiate.c | 18 +++++++- modules/rostests/winetests/secur32/ntlm.c | 64 ++++++++++++++++++++++++-- modules/rostests/winetests/secur32/schannel.c | 14 +++--- 3 files changed, 83 insertions(+), 13 deletions(-) diff --git a/modules/rostests/winetests/secur32/negotiate.c b/modules/rostests/winetests/secur32/negotiate.c index a1c430d527..2f1228ced2 100644 --- a/modules/rostests/winetests/secur32/negotiate.c +++ b/modules/rostests/winetests/secur32/negotiate.c @@ -284,13 +284,16 @@ static void test_authentication(void) memset( &info, 0, sizeof(info) ); status_c = QueryContextAttributesA( &client.ctxt, SECPKG_ATTR_NEGOTIATION_INFO, &info ); - ok( status_c == SEC_E_OK, "pQueryContextAttributesA returned %08x\n", status_c ); + ok( status_c == SEC_E_OK, "QueryContextAttributesA returned %08x\n", status_c ); pi = info.PackageInfo; ok( info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %u\n", info.NegotiationState ); ok( pi != NULL, "expected non-NULL PackageInfo\n" ); if (pi) { + UINT expected, got; + char *eob; + ok( pi->fCapabilities == NTLM_BASE_CAPS || pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_READONLY_WITH_CHECKSUM) || pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS) || @@ -300,6 +303,19 @@ static void test_authentication(void) ok( pi->wVersion == 1, "got %u\n", pi->wVersion ); ok( pi->wRPCID == RPC_C_AUTHN_WINNT, "got %u\n", pi->wRPCID ); ok( !lstrcmpA( pi->Name, "NTLM" ), "got %s\n", pi->Name ); + + expected = sizeof(*pi) + lstrlenA(pi->Name) + 1 + lstrlenA(pi->Comment) + 1; + got = HeapSize(GetProcessHeap(), 0, pi); +todo_wine + ok( got == expected, "got %u, expected %u\n", got, expected ); + eob = (char *)pi + expected; +todo_wine + ok( pi->Name + lstrlenA(pi->Name) < eob, "Name doesn't fit into allocated block\n" ); +todo_wine + ok( pi->Comment + lstrlenA(pi->Comment) < eob, "Comment doesn't fit into allocated block\n" ); + + status = FreeContextBuffer( pi ); + ok( status == SEC_E_OK, "FreeContextBuffer error %#x\n", status ); } done: diff --git a/modules/rostests/winetests/secur32/ntlm.c b/modules/rostests/winetests/secur32/ntlm.c index 254b668516..c060420a3f 100644 --- a/modules/rostests/winetests/secur32/ntlm.c +++ b/modules/rostests/winetests/secur32/ntlm.c @@ -36,6 +36,29 @@ #include "wine/test.h" +#define NEGOTIATE_BASE_CAPS ( \ + SECPKG_FLAG_INTEGRITY | \ + SECPKG_FLAG_PRIVACY | \ + SECPKG_FLAG_CONNECTION | \ + SECPKG_FLAG_MULTI_REQUIRED | \ + SECPKG_FLAG_EXTENDED_ERROR | \ + SECPKG_FLAG_IMPERSONATION | \ + SECPKG_FLAG_ACCEPT_WIN32_NAME | \ + SECPKG_FLAG_NEGOTIABLE | \ + SECPKG_FLAG_GSS_COMPATIBLE | \ + SECPKG_FLAG_LOGON ) + +#define NTLM_BASE_CAPS ( \ + SECPKG_FLAG_INTEGRITY | \ + SECPKG_FLAG_PRIVACY | \ + SECPKG_FLAG_TOKEN_ONLY | \ + SECPKG_FLAG_CONNECTION | \ + SECPKG_FLAG_MULTI_REQUIRED | \ + SECPKG_FLAG_IMPERSONATION | \ + SECPKG_FLAG_ACCEPT_WIN32_NAME | \ + SECPKG_FLAG_NEGOTIABLE | \ + SECPKG_FLAG_LOGON ) + static HMODULE secdll; static PSecurityFunctionTableA (SEC_ENTRY * pInitSecurityInterfaceA)(void); static SECURITY_STATUS (SEC_ENTRY * pFreeContextBuffer)(PVOID pv); @@ -797,6 +820,8 @@ static void testAuth(ULONG data_rep, BOOL fake) SspiData client = {{0}}, server = {{0}}; SEC_WINNT_AUTH_IDENTITY_A id; SecPkgContext_Sizes ctxt_sizes; + SecPkgContext_NegotiationInfoA info; + SecPkgInfoA *pi; if(pQuerySecurityPackageInfoA( sec_pkg_name, &pkg_info)!= SEC_E_OK) { @@ -889,6 +914,41 @@ static void testAuth(ULONG data_rep, BOOL fake) "cbBlockSize should be 0 but is %u\n", ctxt_sizes.cbBlockSize); + memset(&info, 0, sizeof(info)); + sec_status = QueryContextAttributesA(&client.ctxt, SECPKG_ATTR_NEGOTIATION_INFO, &info); +todo_wine + ok(sec_status == SEC_E_OK, "QueryContextAttributesA returned %08x\n", sec_status); + + pi = info.PackageInfo; + ok(info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %u\n", info.NegotiationState); +todo_wine + ok(pi != NULL, "expected non-NULL PackageInfo\n"); + if (pi) + { + UINT expected, got; + char *eob; + + ok(pi->fCapabilities == NTLM_BASE_CAPS || + pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_READONLY_WITH_CHECKSUM) || + pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS) || + pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS| + SECPKG_FLAG_APPCONTAINER_CHECKS), + "got %08x\n", pi->fCapabilities); + ok(pi->wVersion == 1, "got %u\n", pi->wVersion); + ok(pi->wRPCID == RPC_C_AUTHN_WINNT, "got %u\n", pi->wRPCID); + ok(!lstrcmpA( pi->Name, "NTLM" ), "got %s\n", pi->Name); + + expected = sizeof(*pi) + lstrlenA(pi->Name) + 1 + lstrlenA(pi->Comment) + 1; + got = HeapSize(GetProcessHeap(), 0, pi); + ok(got == expected, "got %u, expected %u\n", got, expected); + eob = (char *)pi + expected; + ok(pi->Name + lstrlenA(pi->Name) < eob, "Name doesn't fit into allocated block\n"); + ok(pi->Comment + lstrlenA(pi->Comment) < eob, "Comment doesn't fit into allocated block\n"); + + sec_status = FreeContextBuffer(pi); + ok(sec_status == SEC_E_OK, "FreeContextBuffer error %#x\n", sec_status); + } + tAuthend: cleanupBuffers(&client); cleanupBuffers(&server); @@ -1181,10 +1241,6 @@ end: pDeleteSecurityContext(&client.ctxt); pFreeCredentialsHandle(&client.cred); - HeapFree(GetProcessHeap(), 0, fake_data[0].pvBuffer); - HeapFree(GetProcessHeap(), 0, fake_data[1].pvBuffer); - HeapFree(GetProcessHeap(), 0, data[0].pvBuffer); - HeapFree(GetProcessHeap(), 0, data[1].pvBuffer); HeapFree(GetProcessHeap(), 0, complex_data[1].pvBuffer); HeapFree(GetProcessHeap(), 0, complex_data[3].pvBuffer); } diff --git a/modules/rostests/winetests/secur32/schannel.c b/modules/rostests/winetests/secur32/schannel.c index 3a2c55db2e..800edd3a7f 100644 --- a/modules/rostests/winetests/secur32/schannel.c +++ b/modules/rostests/winetests/secur32/schannel.c @@ -686,6 +686,7 @@ static void test_communication(void) SecPkgContext_ConnectionInfo conn_info; SecPkgContext_KeyInfoA key_info; CERT_CONTEXT *cert; + SecPkgContext_NegotiationInfoA info; SecBufferDesc buffers[2]; SecBuffer *buf; @@ -771,6 +772,7 @@ todo_wine ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL); ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status); +todo_wine ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n"); buffers[0].pBuffers[0].cbBuffer = 0; @@ -780,15 +782,9 @@ todo_wine todo_wine ok(status == SEC_E_INSUFFICIENT_MEMORY || status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INSUFFICIENT_MEMORY or SEC_E_INVALID_TOKEN, got %08x\n", status); - ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n"); - - status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", - ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, - 0, 0, NULL, 0, &context, NULL, &attrs, NULL); -todo_wine - ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status); buffers[0].pBuffers[0].cbBuffer = buf_size; + status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, NULL, 0, &context, &buffers[0], &attrs, NULL); @@ -863,7 +859,6 @@ todo_wine buffers[1].pBuffers[0].cbBuffer = buf_size; } - ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n"); ok(status == SEC_E_OK || broken(status == SEC_E_INVALID_TOKEN) /* WinNT */, "InitializeSecurityContext failed: %08x\n", status); if(status != SEC_E_OK) { @@ -945,6 +940,9 @@ todo_wine status = pQueryContextAttributesA(&context, SECPKG_ATTR_STREAM_SIZES, &sizes); ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_STREAM_SIZES) failed: %08x\n", status); + status = QueryContextAttributesA(&context, SECPKG_ATTR_NEGOTIATION_INFO, &info); + ok(status == SEC_E_UNSUPPORTED_FUNCTION, "QueryContextAttributesA returned %08x\n", status); + reset_buffers(&buffers[0]); /* Send a simple request so we get data for testing DecryptMessage */
6 years, 11 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
38
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Results per page:
10
25
50
100
200