Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
af48d90a
Commit
af48d90a
authored
Sep 22, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Sep 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme: Use wide character string literals.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a6227531
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
44 deletions
+43
-44
system.c
dlls/uxtheme/system.c
+43
-44
No files found.
dlls/uxtheme/system.c
View file @
af48d90a
...
...
@@ -199,39 +199,39 @@ static void UXTHEME_LoadTheme(void)
/***********************************************************************/
static
const
char
*
const
SysColorsNames
[]
=
static
const
WCHAR
*
const
SysColorsNames
[]
=
{
"Scrollbar"
,
/* COLOR_SCROLLBAR */
"Background"
,
/* COLOR_BACKGROUND */
"ActiveTitle"
,
/* COLOR_ACTIVECAPTION */
"InactiveTitle"
,
/* COLOR_INACTIVECAPTION */
"Menu"
,
/* COLOR_MENU */
"Window"
,
/* COLOR_WINDOW */
"WindowFrame"
,
/* COLOR_WINDOWFRAME */
"MenuText"
,
/* COLOR_MENUTEXT */
"WindowText"
,
/* COLOR_WINDOWTEXT */
"TitleText"
,
/* COLOR_CAPTIONTEXT */
"ActiveBorder"
,
/* COLOR_ACTIVEBORDER */
"InactiveBorder"
,
/* COLOR_INACTIVEBORDER */
"AppWorkSpace"
,
/* COLOR_APPWORKSPACE */
"Hilight"
,
/* COLOR_HIGHLIGHT */
"HilightText"
,
/* COLOR_HIGHLIGHTTEXT */
"ButtonFace"
,
/* COLOR_BTNFACE */
"ButtonShadow"
,
/* COLOR_BTNSHADOW */
"GrayText"
,
/* COLOR_GRAYTEXT */
"ButtonText"
,
/* COLOR_BTNTEXT */
"InactiveTitleText"
,
/* COLOR_INACTIVECAPTIONTEXT */
"ButtonHilight"
,
/* COLOR_BTNHIGHLIGHT */
"ButtonDkShadow"
,
/* COLOR_3DDKSHADOW */
"ButtonLight"
,
/* COLOR_3DLIGHT */
"InfoText"
,
/* COLOR_INFOTEXT */
"InfoWindow"
,
/* COLOR_INFOBK */
"ButtonAlternateFace"
,
/* COLOR_ALTERNATEBTNFACE */
"HotTrackingColor"
,
/* COLOR_HOTLIGHT */
"GradientActiveTitle"
,
/* COLOR_GRADIENTACTIVECAPTION */
"GradientInactiveTitle"
,
/* COLOR_GRADIENTINACTIVECAPTION */
"MenuHilight"
,
/* COLOR_MENUHILIGHT */
"MenuBar"
,
/* COLOR_MENUBAR */
L"Scrollbar"
,
/* COLOR_SCROLLBAR */
L"Background"
,
/* COLOR_BACKGROUND */
L"ActiveTitle"
,
/* COLOR_ACTIVECAPTION */
L"InactiveTitle"
,
/* COLOR_INACTIVECAPTION */
L"Menu"
,
/* COLOR_MENU */
L"Window"
,
/* COLOR_WINDOW */
L"WindowFrame"
,
/* COLOR_WINDOWFRAME */
L"MenuText"
,
/* COLOR_MENUTEXT */
L"WindowText"
,
/* COLOR_WINDOWTEXT */
L"TitleText"
,
/* COLOR_CAPTIONTEXT */
L"ActiveBorder"
,
/* COLOR_ACTIVEBORDER */
L"InactiveBorder"
,
/* COLOR_INACTIVEBORDER */
L"AppWorkSpace"
,
/* COLOR_APPWORKSPACE */
L"Hilight"
,
/* COLOR_HIGHLIGHT */
L"HilightText"
,
/* COLOR_HIGHLIGHTTEXT */
L"ButtonFace"
,
/* COLOR_BTNFACE */
L"ButtonShadow"
,
/* COLOR_BTNSHADOW */
L"GrayText"
,
/* COLOR_GRAYTEXT */
L"ButtonText"
,
/* COLOR_BTNTEXT */
L"InactiveTitleText"
,
/* COLOR_INACTIVECAPTIONTEXT */
L"ButtonHilight"
,
/* COLOR_BTNHIGHLIGHT */
L"ButtonDkShadow"
,
/* COLOR_3DDKSHADOW */
L"ButtonLight"
,
/* COLOR_3DLIGHT */
L"InfoText"
,
/* COLOR_INFOTEXT */
L"InfoWindow"
,
/* COLOR_INFOBK */
L"ButtonAlternateFace"
,
/* COLOR_ALTERNATEBTNFACE */
L"HotTrackingColor"
,
/* COLOR_HOTLIGHT */
L"GradientActiveTitle"
,
/* COLOR_GRADIENTACTIVECAPTION */
L"GradientInactiveTitle"
,
/* COLOR_GRADIENTINACTIVECAPTION */
L"MenuHilight"
,
/* COLOR_MENUHILIGHT */
L"MenuBar"
,
/* COLOR_MENUBAR */
};
static
const
WCHAR
strColorKey
[]
=
L"Control Panel
\\
Colors"
;
...
...
@@ -251,9 +251,9 @@ static const struct BackupSysParam
static
void
save_sys_colors
(
HKEY
baseKey
)
{
char
colorStr
[
13
];
WCHAR
colorStr
[
13
];
HKEY
hKey
;
int
i
;
int
i
,
length
;
if
(
RegCreateKeyExW
(
baseKey
,
strColorKey
,
0
,
0
,
0
,
KEY_ALL_ACCESS
,
...
...
@@ -262,12 +262,11 @@ static void save_sys_colors (HKEY baseKey)
for
(
i
=
0
;
i
<
NUM_SYS_COLORS
;
i
++
)
{
COLORREF
col
=
GetSysColor
(
i
);
sprintf
(
colorStr
,
"%d %d %d"
,
GetRValue
(
col
),
GetGValue
(
col
),
GetBValue
(
col
));
RegSetValueExA
(
hKey
,
SysColorsNames
[
i
],
0
,
REG_SZ
,
(
BYTE
*
)
colorStr
,
strlen
(
colorStr
)
+
1
);
length
=
swprintf
(
colorStr
,
ARRAY_SIZE
(
colorStr
),
L"%d %d %d"
,
GetRValue
(
col
),
GetGValue
(
col
),
GetBValue
(
col
));
RegSetValueExW
(
hKey
,
SysColorsNames
[
i
],
0
,
REG_SZ
,
(
BYTE
*
)
colorStr
,
(
length
+
1
)
*
sizeof
(
WCHAR
));
}
RegCloseKey
(
hKey
);
}
...
...
@@ -350,14 +349,14 @@ static void UXTHEME_RestoreSystemMetrics(void)
for
(
i
=
0
;
i
<
NUM_SYS_COLORS
;
i
++
)
{
DWORD
type
;
char
colorStr
[
13
];
WCHAR
colorStr
[
13
];
DWORD
count
=
sizeof
(
colorStr
);
if
(
RegQueryValueEx
A
(
colorKey
,
SysColorsNames
[
i
],
0
,
&
type
,
(
LPBYTE
)
colorStr
,
&
count
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueEx
W
(
colorKey
,
SysColorsNames
[
i
],
0
,
&
type
,
(
LPBYTE
)
colorStr
,
&
count
)
==
ERROR_SUCCESS
)
{
int
r
,
g
,
b
;
if
(
s
scanf
(
colorStr
,
"%d %d %d"
,
&
r
,
&
g
,
&
b
)
==
3
)
if
(
s
wscanf
(
colorStr
,
L
"%d %d %d"
,
&
r
,
&
g
,
&
b
)
==
3
)
{
sysColsIndices
[
sysColCount
]
=
i
;
sysCols
[
sysColCount
]
=
RGB
(
r
,
g
,
b
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment