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
9933f5e4
Commit
9933f5e4
authored
Sep 27, 2012
by
Daniel Jelinski
Committed by
Alexandre Julliard
Oct 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Do not send TVN_ITEMEXPANDING when expanding item with no children.
parent
6067df72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
treeview.c
dlls/comctl32/tests/treeview.c
+6
-1
treeview.c
dlls/comctl32/treeview.c
+5
-5
No files found.
dlls/comctl32/tests/treeview.c
View file @
9933f5e4
...
...
@@ -1393,6 +1393,11 @@ static void test_expandnotify(void)
ret
=
SendMessageA
(
hTree
,
TVM_SELECTITEM
,
TVGN_CARET
,
(
LPARAM
)
hRoot
);
expect
(
TRUE
,
ret
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
ret
=
SendMessageA
(
hTree
,
TVM_EXPAND
,
TVE_COLLAPSE
,
(
LPARAM
)
hRoot
);
todo_wine
expect
(
FALSE
,
ret
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_seq
,
"no collapse notifications"
,
FALSE
);
g_get_from_expand
=
TRUE
;
/* expand */
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
...
...
@@ -1481,7 +1486,7 @@ static void test_expandnotify(void)
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
ret
=
SendMessageA
(
hTree
,
WM_KEYDOWN
,
VK_ADD
,
0
);
expect
(
FALSE
,
ret
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
parent_expand_empty_kb_seq
,
"expand node with no children"
,
TRU
E
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
parent_expand_empty_kb_seq
,
"expand node with no children"
,
FALS
E
);
DestroyWindow
(
hTree
);
}
...
...
dlls/comctl32/treeview.c
View file @
9933f5e4
...
...
@@ -3237,10 +3237,10 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
TRACE
(
"TVE_COLLAPSE %p %s
\n
"
,
item
,
TREEVIEW_ItemName
(
item
));
if
(
!
(
item
->
state
&
TVIS_EXPANDED
))
if
(
!
TREEVIEW_HasChildren
(
infoPtr
,
item
))
return
FALSE
;
if
(
bUser
||
!
(
item
->
state
&
TVIS_EXPANDEDONCE
)
)
if
(
bUser
)
TREEVIEW_SendExpanding
(
infoPtr
,
item
,
action
);
if
(
item
->
firstChild
==
NULL
)
...
...
@@ -3248,7 +3248,7 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
item
->
state
&=
~
TVIS_EXPANDED
;
if
(
bUser
||
!
(
item
->
state
&
TVIS_EXPANDEDONCE
)
)
if
(
bUser
)
TREEVIEW_SendExpanded
(
infoPtr
,
item
,
action
);
bSetSelection
=
(
infoPtr
->
selectedItem
!=
NULL
...
...
@@ -3344,8 +3344,8 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
TRACE
(
"(%p, %p, partial=%d, %d
\n
"
,
infoPtr
,
item
,
partial
,
user
);
if
(
item
->
state
&
TVIS_EXPANDED
)
return
TRU
E
;
if
(
!
TREEVIEW_HasChildren
(
infoPtr
,
item
)
)
return
FALS
E
;
tmpItem
=
item
;
nextItem
=
NULL
;
while
(
tmpItem
)
...
...
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