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
b84f2288
Commit
b84f2288
authored
Jun 28, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Use notification message to clean up item data.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b25337e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
listview.c
programs/regedit/listview.c
+9
-10
No files found.
programs/regedit/listview.c
View file @
b84f2288
...
...
@@ -411,6 +411,14 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
HeapFree
(
GetProcessHeap
(),
0
,
oldName
);
return
0
;
}
case
LVN_DELETEITEM
:
{
NMLISTVIEW
*
nmlv
=
(
NMLISTVIEW
*
)
lParam
;
LINE_INFO
*
info
=
(
LINE_INFO
*
)
nmlv
->
lParam
;
HeapFree
(
GetProcessHeap
(),
0
,
info
->
name
);
HeapFree
(
GetProcessHeap
(),
0
,
info
);
}
break
;
case
NM_RETURN
:
{
int
cnt
=
SendMessageW
(
hWnd
,
LVM_GETNEXTITEM
,
-
1
,
MAKELPARAM
(
LVNI_FOCUSED
|
LVNI_SELECTED
,
0
));
if
(
cnt
!=
-
1
)
...
...
@@ -515,7 +523,6 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR highli
BYTE
*
valBuf
=
0
;
HKEY
hKey
=
0
;
LONG
errCode
;
INT
count
,
i
;
LVITEMW
item
;
if
(
!
hwndLV
)
return
FALSE
;
...
...
@@ -525,16 +532,8 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR highli
errCode
=
RegOpenKeyExW
(
hKeyRoot
,
keyPath
,
0
,
KEY_READ
,
&
hKey
);
if
(
errCode
!=
ERROR_SUCCESS
)
goto
done
;
count
=
SendMessageW
(
hwndLV
,
LVM_GETITEMCOUNT
,
0
,
0
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
item
.
mask
=
LVIF_PARAM
;
item
.
iItem
=
i
;
SendMessageW
(
hwndLV
,
LVM_GETITEMW
,
0
,
(
LPARAM
)
&
item
);
HeapFree
(
GetProcessHeap
(),
0
,
((
LINE_INFO
*
)
item
.
lParam
)
->
name
);
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
item
.
lParam
);
}
g_columnToSort
=
~
0U
;
SendMessageW
(
hwndLV
,
LVM_DELETEALLITEMS
,
0
,
0L
);
SendMessageW
(
hwndLV
,
LVM_DELETEALLITEMS
,
0
,
0
);
/* get size information and resize the buffers if necessary */
errCode
=
RegQueryInfoKeyW
(
hKey
,
NULL
,
NULL
,
NULL
,
NULL
,
&
max_sub_key_len
,
NULL
,
...
...
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