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
4c55ea3e
Commit
4c55ea3e
authored
Feb 06, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleview: Use Treeview notifications to release created instances.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
455f5f23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
35 deletions
+15
-35
oleview.c
programs/oleview/oleview.c
+1
-1
tree.c
programs/oleview/tree.c
+14
-34
No files found.
programs/oleview/oleview.c
View file @
4c55ea3e
...
@@ -469,8 +469,8 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg,
...
@@ -469,8 +469,8 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg,
MenuCommand
(
LOWORD
(
wParam
),
hWnd
);
MenuCommand
(
LOWORD
(
wParam
),
hWnd
);
break
;
break
;
case
WM_DESTROY
:
case
WM_DESTROY
:
OleUninitialize
();
EmptyTree
();
EmptyTree
();
OleUninitialize
();
PostQuitMessage
(
0
);
PostQuitMessage
(
0
);
break
;
break
;
case
WM_MENUSELECT
:
case
WM_MENUSELECT
:
...
...
programs/oleview/tree.c
View file @
4c55ea3e
...
@@ -604,40 +604,7 @@ static void AddBaseEntries(void)
...
@@ -604,40 +604,7 @@ static void AddBaseEntries(void)
void
EmptyTree
(
void
)
void
EmptyTree
(
void
)
{
{
HTREEITEM
cur
,
del
;
SendMessageW
(
globals
.
hTree
,
TVM_DELETEITEM
,
0
,
(
LPARAM
)
TVI_ROOT
);
TVITEMW
tvi
;
tvi
.
mask
=
TVIF_PARAM
;
cur
=
(
HTREEITEM
)
SendMessageW
(
globals
.
hTree
,
TVM_GETNEXTITEM
,
TVGN_CHILD
,
(
LPARAM
)
TVI_ROOT
);
while
(
TRUE
)
{
del
=
cur
;
cur
=
(
HTREEITEM
)
SendMessageW
(
globals
.
hTree
,
TVM_GETNEXTITEM
,
TVGN_CHILD
,
(
LPARAM
)
del
);
if
(
!
cur
)
cur
=
(
HTREEITEM
)
SendMessageW
(
globals
.
hTree
,
TVM_GETNEXTITEM
,
TVGN_NEXT
,
(
LPARAM
)
del
);
if
(
!
cur
)
{
cur
=
(
HTREEITEM
)
SendMessageW
(
globals
.
hTree
,
TVM_GETNEXTITEM
,
TVGN_PREVIOUS
,
(
LPARAM
)
del
);
if
(
!
cur
)
cur
=
(
HTREEITEM
)
SendMessageW
(
globals
.
hTree
,
TVM_GETNEXTITEM
,
TVGN_PARENT
,
(
LPARAM
)
del
);
tvi
.
hItem
=
del
;
if
(
SendMessageW
(
globals
.
hTree
,
TVM_GETITEMW
,
0
,
(
LPARAM
)
&
tvi
)
&&
tvi
.
lParam
)
{
if
(((
ITEM_INFO
*
)
tvi
.
lParam
)
->
loaded
)
ReleaseInst
(
del
);
HeapFree
(
GetProcessHeap
(),
0
,
(
ITEM_INFO
*
)
tvi
.
lParam
);
SendMessageW
(
globals
.
hTree
,
TVM_DELETEITEM
,
0
,
(
LPARAM
)
del
);
}
if
(
!
cur
)
break
;
}
}
}
}
void
AddTreeEx
(
void
)
void
AddTreeEx
(
void
)
...
@@ -678,6 +645,19 @@ static LRESULT CALLBACK TreeProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
...
@@ -678,6 +645,19 @@ static LRESULT CALLBACK TreeProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
RefreshMenu
(((
NMTREEVIEWW
*
)
lParam
)
->
itemNew
.
hItem
);
RefreshMenu
(((
NMTREEVIEWW
*
)
lParam
)
->
itemNew
.
hItem
);
RefreshDetails
(((
NMTREEVIEWW
*
)
lParam
)
->
itemNew
.
hItem
);
RefreshDetails
(((
NMTREEVIEWW
*
)
lParam
)
->
itemNew
.
hItem
);
break
;
break
;
case
TVN_DELETEITEMW
:
{
NMTREEVIEWW
*
nm
=
(
NMTREEVIEWW
*
)
lParam
;
ITEM_INFO
*
info
=
(
ITEM_INFO
*
)
nm
->
itemOld
.
lParam
;
if
(
info
)
{
if
(
info
->
loaded
)
ReleaseInst
(
nm
->
itemOld
.
hItem
);
HeapFree
(
GetProcessHeap
(),
0
,
info
);
}
break
;
}
}
}
break
;
break
;
case
WM_SIZE
:
case
WM_SIZE
:
...
...
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