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
899a53ed
Commit
899a53ed
authored
Nov 21, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Send LVN_ENDLABELEDIT in any case, but with null text if it's the same.
parent
f5f07638
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
listview.c
dlls/comctl32/listview.c
+7
-7
listview.c
dlls/comctl32/tests/listview.c
+20
-1
No files found.
dlls/comctl32/listview.c
View file @
899a53ed
...
...
@@ -5585,16 +5585,11 @@ static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, BOOL storeText, BOOL
bSame
=
(
lstrcmpW
(
dispInfo
.
item
.
pszText
,
tmp
)
==
0
);
textfreeT
(
tmp
,
FALSE
);
}
if
(
bSame
)
{
res
=
TRUE
;
goto
cleanup
;
}
/* add the text from the edit in */
dispInfo
.
item
.
mask
|=
LVIF_TEXT
;
dispInfo
.
item
.
pszText
=
pszText
;
dispInfo
.
item
.
cchTextMax
=
textlenT
(
pszText
,
isW
);
dispInfo
.
item
.
pszText
=
bSame
?
NULL
:
pszText
;
dispInfo
.
item
.
cchTextMax
=
bSame
?
0
:
textlenT
(
pszText
,
isW
);
/* Do we need to update the Item Text */
if
(
!
notify_dispinfoT
(
infoPtr
,
LVN_ENDLABELEDITW
,
&
dispInfo
,
isW
))
...
...
@@ -5608,6 +5603,11 @@ static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, BOOL storeText, BOOL
goto
cleanup
;
}
if
(
!
pszText
)
return
TRUE
;
if
(
bSame
)
{
res
=
TRUE
;
goto
cleanup
;
}
if
(
!
(
infoPtr
->
dwStyle
&
LVS_OWNERDATA
))
{
...
...
dlls/comctl32/tests/listview.c
View file @
899a53ed
...
...
@@ -272,7 +272,7 @@ static const struct message lvs_ex_transparentbkgnd_seq[] = {
};
static
const
struct
message
edit_end_nochange
[]
=
{
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
LVN_ENDLABELEDITA
},
/* todo */
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
LVN_ENDLABELEDITA
},
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
NM_CUSTOMDRAW
},
/* todo */
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
NM_SETFOCUS
},
{
0
}
...
...
@@ -321,8 +321,12 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
return
blockEdit
;
case
LVN_ENDLABELEDIT
:
{
/* always accept new item text */
NMLVDISPINFO
*
di
=
(
NMLVDISPINFO
*
)
lParam
;
trace
(
"LVN_ENDLABELEDIT: text=%s
\n
"
,
di
->
item
.
pszText
);
return
TRUE
;
}
case
LVN_BEGINSCROLL
:
case
LVN_ENDSCROLL
:
{
...
...
@@ -3426,9 +3430,24 @@ static void test_editbox(void)
r
=
SendMessage
(
hwnd
,
LVM_GETITEMTEXTA
,
0
,
(
LPARAM
)
&
item
);
expect
(
lstrlen
(
item
.
pszText
),
r
);
ok
(
strcmp
(
buffer
,
testitem1A
)
==
0
,
"Expected item text to change
\n
"
);
ok
(
!
IsWindow
(
hwndedit
),
"Expected Edit window to be freed
\n
"
);
/* end edit without saving */
SetFocus
(
hwnd
);
hwndedit
=
(
HWND
)
SendMessage
(
hwnd
,
LVM_EDITLABEL
,
0
,
0
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
r
=
SendMessage
(
hwndedit
,
WM_KEYDOWN
,
VK_ESCAPE
,
0
);
expect
(
0
,
r
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
edit_end_nochange
,
"edit box - end edit, no change, escape"
,
TRUE
);
/* end edit with saving */
SetFocus
(
hwnd
);
hwndedit
=
(
HWND
)
SendMessage
(
hwnd
,
LVM_EDITLABEL
,
0
,
0
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
r
=
SendMessage
(
hwndedit
,
WM_KEYDOWN
,
VK_RETURN
,
0
);
expect
(
0
,
r
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
edit_end_nochange
,
"edit box - end edit, no change, return"
,
TRUE
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
pszText
=
buffer
;
item
.
cchTextMax
=
10
;
...
...
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