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
1b044299
Commit
1b044299
authored
Mar 25, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Hide Read-only checkbox for Save dialogs.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8e64c7bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
filedlg.c
dlls/comdlg32/filedlg.c
+8
-3
No files found.
dlls/comdlg32/filedlg.c
View file @
1b044299
...
...
@@ -158,6 +158,11 @@ static BOOL is_dialog_hooked(const FileOpenDlgInfos *info)
return
(
info
->
ofnInfos
->
Flags
&
OFN_ENABLEHOOK
)
&&
info
->
ofnInfos
->
lpfnHook
;
}
static
BOOL
filedialog_is_readonly_hidden
(
const
FileOpenDlgInfos
*
info
)
{
return
(
info
->
ofnInfos
->
Flags
&
OFN_HIDEREADONLY
)
||
(
info
->
DlgInfos
.
dwDlgProp
&
FODPROP_SAVEDLG
);
}
/***********************************************************************
* Prototypes
*/
...
...
@@ -1838,7 +1843,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
}
/* Must the open as read only check box be hidden? */
if
(
fodInfos
->
ofnInfos
->
Flags
&
OFN_HIDEREADONLY
)
if
(
filedialog_is_readonly_hidden
(
fodInfos
)
)
{
ShowWindow
(
GetDlgItem
(
hwnd
,
IDC_OPENREADONLY
),
SW_HIDE
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_OPENREADONLY
),
FALSE
);
...
...
@@ -1882,7 +1887,7 @@ static LRESULT FILEDLG95_ResizeControls(HWND hwnd, WPARAM wParam, LPARAM lParam)
UINT
flags
=
SWP_NOACTIVATE
;
ArrangeCtrlPositions
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
,
hwnd
,
(
fodInfos
->
ofnInfos
->
Flags
&
(
OFN_HIDEREADONLY
|
OFN_SHOWHELP
))
==
OFN_HIDEREADONLY
);
filedialog_is_readonly_hidden
(
fodInfos
)
&&
!
(
fodInfos
->
ofnInfos
->
Flags
&
OFN_SHOWHELP
)
);
/* resize the custom dialog to the parent size */
if
(
fodInfos
->
ofnInfos
->
Flags
&
(
OFN_ENABLETEMPLATE
|
OFN_ENABLETEMPLATEHANDLE
))
...
...
@@ -1903,7 +1908,7 @@ static LRESULT FILEDLG95_ResizeControls(HWND hwnd, WPARAM wParam, LPARAM lParam)
/* Resize the height; if opened as read-only, checkbox and help button are
* hidden and we are not using a custom template nor a customDialog
*/
if
(
(
fodInfos
->
ofnInfos
->
Flags
&
OFN_HIDEREADONLY
)
&&
if
(
filedialog_is_readonly_hidden
(
fodInfos
)
&&
(
!
(
fodInfos
->
ofnInfos
->
Flags
&
(
OFN_SHOWHELP
|
OFN_ENABLETEMPLATE
|
OFN_ENABLETEMPLATEHANDLE
))))
{
...
...
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