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
25100a85
Commit
25100a85
authored
Sep 15, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Sep 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Improve the current UI language detection a bit.
parent
74459389
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+10
-3
No files found.
dlls/mshtml/tests/htmldoc.c
View file @
25100a85
...
...
@@ -283,16 +283,23 @@ static BSTR a2bstr(const char *str)
return
ret
;
}
static
BOOL
is_english
(
void
)
/* Returns true if the user interface is in English. Note that this does not
* presume of the formatting of dates, numbers, etc.
*/
static
BOOL
is_lang_english
(
void
)
{
static
HMODULE
hkernel32
=
NULL
;
static
LANGID
(
WINAPI
*
pGetThreadUILanguage
)(
void
)
=
NULL
;
static
LANGID
(
WINAPI
*
pGetUserDefaultUILanguage
)(
void
)
=
NULL
;
if
(
!
hkernel32
)
{
hkernel32
=
GetModuleHandleA
(
"kernel32.dll"
);
pGetThreadUILanguage
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetThreadUILanguage"
);
pGetUserDefaultUILanguage
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetUserDefaultUILanguage"
);
}
if
(
pGetThreadUILanguage
)
return
PRIMARYLANGID
(
pGetThreadUILanguage
())
==
LANG_ENGLISH
;
if
(
pGetUserDefaultUILanguage
)
return
PRIMARYLANGID
(
pGetUserDefaultUILanguage
())
==
LANG_ENGLISH
;
...
...
@@ -1629,7 +1636,7 @@ static HRESULT WINAPI InPlaceUIWindow_SetActiveObject(IOleInPlaceFrame *iface,
if
(
expect_InPlaceUIWindow_SetActiveObject_active
)
{
ok
(
pActiveObject
!=
NULL
,
"pActiveObject = NULL
\n
"
);
if
(
pActiveObject
&&
is_english
())
if
(
pActiveObject
&&
is_
lang_
english
())
ok
(
!
lstrcmpW
(
wszHTML_Document
,
pszObjName
),
"%s !=
\"
HTML Document
\"\n
"
,
wine_dbgstr_w
(
pszObjName
));
}
else
{
...
...
@@ -1649,7 +1656,7 @@ static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface,
if
(
pActiveObject
)
{
CHECK_EXPECT2
(
SetActiveObject
);
if
(
pActiveObject
&&
is_english
())
if
(
pActiveObject
&&
is_
lang_
english
())
ok
(
!
lstrcmpW
(
wszHTML_Document
,
pszObjName
),
"%s !=
\"
HTML Document
\"\n
"
,
wine_dbgstr_w
(
pszObjName
));
}
else
{
CHECK_EXPECT
(
SetActiveObject_null
);
...
...
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