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
c1209a68
Commit
c1209a68
authored
Jan 19, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Jan 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Add a helper for getting the orientation.
parent
6b6adccc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
printdlg.c
dlls/comdlg32/printdlg.c
+17
-13
No files found.
dlls/comdlg32/printdlg.c
View file @
c1209a68
...
...
@@ -2567,6 +2567,14 @@ static void pagesetup_set_orientation(PageSetupDataA *pda, WORD orient)
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
}
static
WORD
pagesetup_get_orientation
(
PageSetupDataA
*
pda
)
{
DEVMODEA
*
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
WORD
orient
=
dm
->
u1
.
s1
.
dmOrientation
;
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
return
orient
;
}
static
BOOL
pagesetup_update_papersize
(
PageSetupDataA
*
pda
)
{
DEVNAMES
*
dn
;
...
...
@@ -2618,7 +2626,7 @@ static BOOL pagesetup_update_papersize(PageSetupDataA *pda)
pda
->
dlga
->
ptPaperSize
.
x
=
_c_10mm2size
(
pda
->
dlga
,
points
[
i
].
x
);
pda
->
dlga
->
ptPaperSize
.
y
=
_c_10mm2size
(
pda
->
dlga
,
points
[
i
].
y
);
if
(
dm
->
u1
.
s1
.
dmOrientation
==
DMORIENT_LANDSCAPE
)
if
(
pagesetup_get_orientation
(
pda
)
==
DMORIENT_LANDSCAPE
)
{
LONG
tmp
=
pda
->
dlga
->
ptPaperSize
.
x
;
pda
->
dlga
->
ptPaperSize
.
x
=
pda
->
dlga
->
ptPaperSize
.
y
;
...
...
@@ -3014,8 +3022,8 @@ PRINTDLG_PS_WMCommandA(
}
case
rad1
:
case
rad2
:
if
((
id
==
rad1
&&
p
da
->
dlga
->
ptPaperSize
.
x
>
pda
->
dlga
->
ptPaperSize
.
y
)
||
(
id
==
rad2
&&
p
da
->
dlga
->
ptPaperSize
.
y
>
pda
->
dlga
->
ptPaperSize
.
x
))
if
((
id
==
rad1
&&
p
agesetup_get_orientation
(
pda
)
==
DMORIENT_LANDSCAPE
)
||
(
id
==
rad2
&&
p
agesetup_get_orientation
(
pda
)
==
DMORIENT_PORTRAIT
))
{
pagesetup_set_orientation
(
pda
,
(
id
==
rad1
)
?
DMORIENT_PORTRAIT
:
DMORIENT_LANDSCAPE
);
pagesetup_update_papersize
(
pda
);
...
...
@@ -3074,7 +3082,7 @@ PRINTDLG_PS_WMCommandA(
ClosePrinter
(
hPrinter
);
/* Changing paper */
pagesetup_update_papersize
(
pda
);
if
(
dm
->
u1
.
s1
.
dmOrientation
==
DMORIENT_LANDSCAPE
)
if
(
pagesetup_get_orientation
(
pda
)
==
DMORIENT_LANDSCAPE
)
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad2
);
else
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad1
);
...
...
@@ -3433,16 +3441,12 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
EnableWindow
(
GetDlgItem
(
hDlg
,
edt6
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hDlg
,
edt7
),
FALSE
);
}
/* Set orientation radiobutton properly */
if
(
pda
->
dlga
->
hDevMode
)
{
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
if
(
dm
->
u1
.
s1
.
dmOrientation
==
DMORIENT_LANDSCAPE
)
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad2
);
else
/* this is default if papersize is not set */
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad1
);
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
}
if
(
pagesetup_get_orientation
(
pda
)
==
DMORIENT_LANDSCAPE
)
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad2
);
else
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad1
);
/* if orientation disabled */
if
(
pda
->
dlga
->
Flags
&
PSD_DISABLEORIENTATION
)
{
...
...
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