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
06eceb3a
Commit
06eceb3a
authored
May 29, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
May 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Delete a listview item without refreshing the listview.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9cd1fc3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
+23
-19
framewnd.c
programs/regedit/framewnd.c
+23
-19
No files found.
programs/regedit/framewnd.c
View file @
06eceb3a
...
...
@@ -699,8 +699,6 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HKEY
hKeyRoot
=
0
;
DWORD
valueType
;
int
curIndex
;
BOOL
firstItem
=
TRUE
;
if
(
LOWORD
(
wParam
)
>=
ID_FAVORITE_FIRST
&&
LOWORD
(
wParam
)
<=
ID_FAVORITE_LAST
)
{
HKEY
hKey
;
...
...
@@ -744,29 +742,35 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
HeapFree
(
GetProcessHeap
(),
0
,
keyPath
);
}
else
if
(
hWndDelete
==
g_pChildWnd
->
hListWnd
)
{
WCHAR
*
keyPath
=
GetItemPath
(
g_pChildWnd
->
hTreeWnd
,
0
,
&
hKeyRoot
)
;
curIndex
=
SendMessageW
(
g_pChildWnd
->
hListWnd
,
LVM_GETNEXTITEM
,
-
1
,
MAKELPARAM
(
LVNI_SELECTED
,
0
))
;
while
(
curIndex
!=
-
1
)
{
WCHAR
*
valueName
=
GetItemText
(
g_pChildWnd
->
hListWnd
,
curIndex
);
curIndex
=
SendMessageW
(
g_pChildWnd
->
hListWnd
,
LVM_GETNEXTITEM
,
curIndex
,
MAKELPARAM
(
LVNI_SELECTED
,
0
));
if
(
curIndex
!=
-
1
&&
firstItem
)
{
if
(
MessageBoxW
(
hWnd
,
MAKEINTRESOURCEW
(
IDS_DELETE_VALUE_TEXT_MULTIPLE
),
MAKEINTRESOURCEW
(
IDS_DELETE_VALUE_TITLE
)
,
MB_YESNO
|
MB_ICONEXCLAMATION
)
!=
IDYES
)
unsigned
int
num_selected
,
index
;
WCHAR
*
keyPath
;
if
(
!
(
num_selected
=
SendMessageW
(
g_pChildWnd
->
hListWnd
,
LVM_GETSELECTEDCOUNT
,
0
,
0L
)))
break
;
if
(
num_selected
>
1
)
{
if
(
messagebox
(
hWnd
,
MB_YESNO
|
MB_ICONEXCLAMATION
,
IDS_DELETE_VALUE_TITLE
,
IDS_DELETE_VALUE_TEXT_MULTIPLE
)
!=
IDYES
)
break
;
}
if
(
!
DeleteValue
(
hWnd
,
hKeyRoot
,
keyPath
,
valueName
,
curIndex
==-
1
&&
firstItem
))
keyPath
=
GetItemPath
(
g_pChildWnd
->
hTreeWnd
,
0
,
&
hKeyRoot
);
index
=
SendMessageW
(
g_pChildWnd
->
hListWnd
,
LVM_GETNEXTITEM
,
-
1
,
MAKELPARAM
(
LVNI_SELECTED
,
0
));
while
(
index
!=
-
1
)
{
WCHAR
*
valueName
=
GetItemText
(
g_pChildWnd
->
hListWnd
,
index
);
if
(
!
DeleteValue
(
hWnd
,
hKeyRoot
,
keyPath
,
valueName
,
num_selected
==
1
))
{
HeapFree
(
GetProcessHeap
(),
0
,
valueName
);
break
;
}
HeapFree
(
GetProcessHeap
(),
0
,
valueName
);
break
;
SendMessageW
(
g_pChildWnd
->
hListWnd
,
LVM_DELETEITEM
,
index
,
0L
);
index
=
SendMessageW
(
g_pChildWnd
->
hListWnd
,
LVM_GETNEXTITEM
,
-
1
,
MAKELPARAM
(
LVNI_SELECTED
,
0
));
}
firstItem
=
FALSE
;
HeapFree
(
GetProcessHeap
(),
0
,
valueName
);
}
RefreshListView
(
g_pChildWnd
->
hListWnd
,
hKeyRoot
,
keyPath
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
keyPath
);
HeapFree
(
GetProcessHeap
(),
0
,
keyPath
);
}
else
if
(
IsChild
(
g_pChildWnd
->
hTreeWnd
,
hWndDelete
)
||
IsChild
(
g_pChildWnd
->
hListWnd
,
hWndDelete
))
{
SendMessageW
(
hWndDelete
,
WM_KEYDOWN
,
VK_DELETE
,
0
);
...
...
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