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
4144847a
Commit
4144847a
authored
May 31, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
May 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Update handling of the 'Delete' menu item.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
948278cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
framewnd.c
programs/regedit/framewnd.c
+20
-1
No files found.
programs/regedit/framewnd.c
View file @
4144847a
...
...
@@ -132,6 +132,25 @@ update:
SetMenuItemInfoW
(
hMenu
,
ID_TREE_EXPAND_COLLAPSE
,
FALSE
,
&
info
);
}
static
void
update_delete_item
(
HMENU
hMenu
,
WCHAR
*
keyName
)
{
unsigned
int
state
=
MF_ENABLED
;
if
(
!
g_pChildWnd
->
nFocusPanel
)
{
if
(
!
keyName
||
!*
keyName
)
state
=
MF_GRAYED
;
}
else
{
if
(
SendMessageW
(
g_pChildWnd
->
hListWnd
,
LVM_GETNEXTITEM
,
-
1
,
MAKELPARAM
(
LVIS_FOCUSED
|
LVIS_SELECTED
,
0
))
==
-
1
)
state
=
MF_GRAYED
;
}
EnableMenuItem
(
hMenu
,
ID_EDIT_DELETE
,
state
|
MF_BYCOMMAND
);
}
static
void
UpdateMenuItems
(
HMENU
hMenu
)
{
HWND
hwndTV
=
g_pChildWnd
->
hTreeWnd
;
BOOL
bAllowEdit
=
FALSE
;
...
...
@@ -147,7 +166,7 @@ static void UpdateMenuItems(HMENU hMenu) {
update_expand_or_collapse_item
(
hwndTV
,
selection
,
hMenu
);
EnableMenuItem
(
hMenu
,
ID_EDIT_MODIFY
,
(
bAllowEdit
?
MF_ENABLED
:
MF_GRAYED
)
|
MF_BYCOMMAND
);
EnableMenuItem
(
hMenu
,
ID_EDIT_DELETE
,
(
bAllowEdit
?
MF_ENABLED
:
MF_GRAYED
)
|
MF_BYCOMMAND
);
update_delete_item
(
hMenu
,
keyName
);
EnableMenuItem
(
hMenu
,
ID_EDIT_RENAME
,
(
bAllowEdit
?
MF_ENABLED
:
MF_GRAYED
)
|
MF_BYCOMMAND
);
EnableMenuItem
(
hMenu
,
ID_FAVORITES_ADDTOFAVORITES
,
(
hRootKey
?
MF_ENABLED
:
MF_GRAYED
)
|
MF_BYCOMMAND
);
EnableMenuItem
(
hMenu
,
ID_FAVORITES_REMOVEFAVORITE
,
...
...
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