Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f13f2534
Commit
f13f2534
authored
Oct 31, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Set the WS_EX_LAYOUTRTL flag when translating a dialog to a RTL language.
parent
413f5ccb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
po.c
tools/wrc/po.c
+15
-0
No files found.
tools/wrc/po.c
View file @
f13f2534
...
...
@@ -59,6 +59,11 @@ static int is_english( const language_t *lan )
return
lan
->
id
==
LANG_ENGLISH
&&
lan
->
sub
==
SUBLANG_DEFAULT
;
}
static
int
is_rtl_language
(
const
language_t
*
lan
)
{
return
lan
->
id
==
LANG_ARABIC
||
lan
->
id
==
LANG_HEBREW
||
lan
->
id
==
LANG_PERSIAN
;
}
static
version_t
*
get_dup_version
(
language_t
*
lang
)
{
/* English "translations" take precedence over the original rc contents */
...
...
@@ -674,6 +679,8 @@ static void compare_dialogs( const dialog_t *english_dlg, const dialog_t *dlg )
if
(
dlg
->
gotexstyle
)
exstyle
=
dlg
->
exstyle
->
or_mask
;
if
(
english_dlg
->
gotstyle
)
english_style
=
english_dlg
->
style
->
or_mask
;
if
(
english_dlg
->
gotexstyle
)
english_exstyle
=
english_dlg
->
exstyle
->
or_mask
;
if
(
is_rtl_language
(
dlg
->
lvc
.
language
))
english_exstyle
|=
WS_EX_LAYOUTRTL
;
if
(
english_style
!=
style
)
warning
(
"%s: dialog %s doesn't have the same style (%08x vs %08x)
\n
"
,
get_language_name
(
dlg
->
lvc
.
language
),
title
,
style
,
english_style
);
...
...
@@ -1061,6 +1068,14 @@ static stringtable_t *translate_stringtable( stringtable_t *stt, language_t *lan
static
void
translate_dialog
(
dialog_t
*
dlg
,
dialog_t
*
new
,
int
*
found
)
{
if
(
dlg
->
title
)
new
->
title
=
translate_string
(
dlg
->
title
,
found
);
if
(
is_rtl_language
(
new
->
lvc
.
language
))
{
new
->
gotexstyle
=
TRUE
;
if
(
dlg
->
gotexstyle
)
new
->
exstyle
=
new_style
(
dlg
->
exstyle
->
or_mask
|
WS_EX_LAYOUTRTL
,
dlg
->
exstyle
->
and_mask
);
else
new
->
exstyle
=
new_style
(
WS_EX_LAYOUTRTL
,
0
);
}
if
(
dlg
->
font
)
{
new
->
font
=
xmalloc
(
sizeof
(
*
dlg
->
font
)
);
...
...
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