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
3a352719
Commit
3a352719
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 function to update the orientation buttons.
parent
b6ed969e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
printdlg.c
dlls/comdlg32/printdlg.c
+14
-11
No files found.
dlls/comdlg32/printdlg.c
View file @
3a352719
...
...
@@ -2567,7 +2567,7 @@ static void pagesetup_set_orientation(PageSetupDataA *pda, WORD orient)
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
}
static
WORD
pagesetup_get_orientation
(
PageSetupDataA
*
pda
)
static
WORD
pagesetup_get_orientation
(
const
PageSetupDataA
*
pda
)
{
DEVMODEA
*
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
WORD
orient
=
dm
->
u1
.
s1
.
dmOrientation
;
...
...
@@ -2582,7 +2582,7 @@ static void pagesetup_set_papersize(PageSetupDataA *pda, WORD paper)
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
}
static
WORD
pagesetup_get_papersize
(
PageSetupDataA
*
pda
)
static
WORD
pagesetup_get_papersize
(
const
PageSetupDataA
*
pda
)
{
DEVMODEA
*
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
WORD
paper
=
dm
->
u1
.
s1
.
dmPaperSize
;
...
...
@@ -2998,6 +2998,14 @@ static void set_margin_groupbox_title(HWND hDlg, const PageSetupDataA *pda)
SetDlgItemTextW
(
hDlg
,
grp4
,
title
);
}
static
void
pagesetup_update_orientation_buttons
(
HWND
hDlg
,
const
PageSetupDataA
*
pda
)
{
if
(
pagesetup_get_orientation
(
pda
)
==
DMORIENT_LANDSCAPE
)
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad2
);
else
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad1
);
}
/********************************************************************************
* PRINTDLG_PS_WMCommandA
* process WM_COMMAND message for PageSetupDlgA
...
...
@@ -3104,10 +3112,8 @@ PRINTDLG_PS_WMCommandA(
ClosePrinter
(
hPrinter
);
/* Changing paper */
pagesetup_update_papersize
(
pda
);
if
(
pagesetup_get_orientation
(
pda
)
==
DMORIENT_LANDSCAPE
)
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad2
);
else
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad1
);
pagesetup_update_orientation_buttons
(
hDlg
,
pda
);
/* Changing paper preview */
PRINTDLG_PS_ChangePaperPrev
(
pda
);
/* Selecting paper in combo */
...
...
@@ -3464,11 +3470,8 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
EnableWindow
(
GetDlgItem
(
hDlg
,
edt7
),
FALSE
);
}
/* Set orientation radiobutton properly */
if
(
pagesetup_get_orientation
(
pda
)
==
DMORIENT_LANDSCAPE
)
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad2
);
else
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad1
);
/* Set orientation radiobuttons properly */
pagesetup_update_orientation_buttons
(
hDlg
,
pda
);
/* 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