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
c33dfc2d
Commit
c33dfc2d
authored
Jan 07, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Jan 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptui: Enable/disable controls based on selection in certificate manager dialog.
parent
0a58167b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
main.c
dlls/cryptui/main.c
+30
-2
No files found.
dlls/cryptui/main.c
View file @
c33dfc2d
...
...
@@ -767,6 +767,18 @@ static LRESULT CALLBACK cert_mgr_advanced_dlg_proc(HWND hwnd, UINT msg,
return
0
;
}
static
void
cert_mgr_clear_cert_selection
(
HWND
hwnd
)
{
WCHAR
empty
[]
=
{
0
};
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_MGR_EXPORT
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_MGR_REMOVE
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_MGR_VIEW
),
FALSE
);
SendMessageW
(
GetDlgItem
(
hwnd
,
IDC_MGR_PURPOSES
),
WM_SETTEXT
,
0
,
(
LPARAM
)
empty
);
refresh_store_certs
(
hwnd
);
}
static
LRESULT
CALLBACK
cert_mgr_dlg_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
{
...
...
@@ -809,8 +821,24 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
switch
(
hdr
->
code
)
{
case
TCN_SELCHANGE
:
refresh_store_certs
(
hwnd
);
cert_mgr_clear_cert_selection
(
hwnd
);
break
;
case
LVN_ITEMCHANGED
:
{
NMITEMACTIVATE
*
nm
;
HWND
lv
=
GetDlgItem
(
hwnd
,
IDC_MGR_CERTS
);
nm
=
(
NMITEMACTIVATE
*
)
lp
;
if
(
nm
->
uNewState
&
LVN_ITEMACTIVATE
)
{
int
numSelected
=
SendMessageW
(
lv
,
LVM_GETSELECTEDCOUNT
,
0
,
0
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_MGR_EXPORT
),
numSelected
>
0
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_MGR_REMOVE
),
numSelected
>
0
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_MGR_VIEW
),
numSelected
==
1
);
}
break
;
}
}
break
;
}
...
...
@@ -818,7 +846,7 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
switch
(
wp
)
{
case
((
CBN_SELCHANGE
<<
16
)
|
IDC_MGR_PURPOSE_SELECTION
):
refresh_store_certs
(
hwnd
);
cert_mgr_clear_cert_selection
(
hwnd
);
break
;
case
IDC_MGR_ADVANCED
:
if
(
DialogBoxW
(
hInstance
,
MAKEINTRESOURCEW
(
IDD_CERT_MGR_ADVANCED
),
...
...
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