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
b8d01f9e
Commit
b8d01f9e
authored
Nov 20, 2017
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Detect and handle an RTL locale.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ddd18823
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
propsheet.c
dlls/comctl32/tests/propsheet.c
+29
-3
No files found.
dlls/comctl32/tests/propsheet.c
View file @
b8d01f9e
...
...
@@ -29,11 +29,19 @@
static
HWND
parenthwnd
;
static
HWND
sheethwnd
;
static
BOOL
rtl
;
static
LONG
active_page
=
-
1
;
#define IDC_APPLY_BUTTON 12321
static
void
detect_locale
(
void
)
{
DWORD
reading_layout
;
rtl
=
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_IREADINGLAYOUT
|
LOCALE_RETURN_NUMBER
,
(
void
*
)
&
reading_layout
,
sizeof
(
reading_layout
))
&&
reading_layout
==
1
;
}
/* try to make sure pending X events have been processed before continuing */
static
void
flush_events
(
void
)
{
...
...
@@ -496,19 +504,28 @@ static void test_buttons(void)
button
=
GetDlgItem
(
hdlg
,
IDCANCEL
);
GetWindowRect
(
button
,
&
rc
);
ok
(
rc
.
top
==
top
,
"Cancel button should have same top as OK button
\n
"
);
ok
(
rc
.
left
>
prevRight
,
"Cancel button should be to the right of OK button
\n
"
);
if
(
rtl
)
ok
(
rc
.
left
<
prevRight
,
"Cancel button should be to the left of OK button
\n
"
);
else
ok
(
rc
.
left
>
prevRight
,
"Cancel button should be to the right of OK button
\n
"
);
prevRight
=
rc
.
right
;
button
=
GetDlgItem
(
hdlg
,
IDC_APPLY_BUTTON
);
GetWindowRect
(
button
,
&
rc
);
ok
(
rc
.
top
==
top
,
"Apply button should have same top as OK button
\n
"
);
ok
(
rc
.
left
>
prevRight
,
"Apply button should be to the right of Cancel button
\n
"
);
if
(
rtl
)
ok
(
rc
.
left
<
prevRight
,
"Apply button should be to the left of Cancel button
\n
"
);
else
ok
(
rc
.
left
>
prevRight
,
"Apply button should be to the right of Cancel button
\n
"
);
prevRight
=
rc
.
right
;
button
=
GetDlgItem
(
hdlg
,
IDHELP
);
GetWindowRect
(
button
,
&
rc
);
ok
(
rc
.
top
==
top
,
"Help button should have same top as OK button
\n
"
);
ok
(
rc
.
left
>
prevRight
,
"Help button should be to the right of Apply button
\n
"
);
if
(
rtl
)
ok
(
rc
.
left
<
prevRight
,
"Help button should be to the left of Apply button
\n
"
);
else
ok
(
rc
.
left
>
prevRight
,
"Help button should be to the right of Apply button
\n
"
);
DestroyWindow
(
hdlg
);
}
...
...
@@ -1124,6 +1141,15 @@ static void test_CreatePropertySheetPage(void)
START_TEST
(
propsheet
)
{
detect_locale
();
if
(
rtl
)
{
/* use locale-specific RTL resources when on an RTL locale */
/* without this, propsheets on RTL locales use English LTR resources */
trace
(
"RTL locale detected
\n
"
);
SetProcessDefaultLayout
(
LAYOUT_RTL
);
}
test_title
();
test_nopage
();
test_disableowner
();
...
...
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