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
e0f493e5
Commit
e0f493e5
authored
Nov 28, 1999
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 28, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notify parent of listbox if requested.
parent
19a497cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
listbox.c
controls/listbox.c
+8
-4
No files found.
controls/listbox.c
View file @
e0f493e5
...
...
@@ -1239,6 +1239,8 @@ static LRESULT LISTBOX_SetCaretIndex( WND *wnd, LB_DESCR *descr, INT index,
static
LRESULT
LISTBOX_SetSelection
(
WND
*
wnd
,
LB_DESCR
*
descr
,
INT
index
,
BOOL
on
,
BOOL
send_notify
)
{
TRACE
(
"index=%d notify=%s
\n
"
,
index
,
send_notify
?
"YES"
:
"NO"
);
if
((
index
<
-
1
)
||
(
index
>=
descr
->
nb_items
))
return
LB_ERR
;
if
(
descr
->
style
&
LBS_MULTIPLESEL
)
{
...
...
@@ -1254,7 +1256,7 @@ static LRESULT LISTBOX_SetSelection( WND *wnd, LB_DESCR *descr, INT index,
if
(
oldsel
!=
-
1
)
descr
->
items
[
oldsel
].
selected
=
FALSE
;
if
(
index
!=
-
1
)
descr
->
items
[
index
].
selected
=
TRUE
;
descr
->
selected_item
=
index
;
if
(
oldsel
!=
-
1
)
LISTBOX_RepaintItem
(
wnd
,
descr
,
oldsel
,
ODA_SELECT
);
if
(
oldsel
!=
-
1
)
LISTBOX_RepaintItem
(
wnd
,
descr
,
oldsel
,
0
);
if
(
index
!=
-
1
)
LISTBOX_RepaintItem
(
wnd
,
descr
,
index
,
ODA_SELECT
);
if
(
send_notify
&&
descr
->
nb_items
)
SEND_NOTIFICATION
(
wnd
,
descr
,
(
index
!=
-
1
)
?
LBN_SELCHANGE
:
LBN_SELCANCEL
);
...
...
@@ -1768,7 +1770,8 @@ static LRESULT LISTBOX_HandleLButtonDown( WND *wnd, LB_DESCR *descr,
{
LISTBOX_SetCaretIndex
(
wnd
,
descr
,
index
,
FALSE
);
LISTBOX_SetSelection
(
wnd
,
descr
,
index
,
!
descr
->
items
[
index
].
selected
,
FALSE
);
!
descr
->
items
[
index
].
selected
,
(
descr
->
style
&
LBS_NOTIFY
)
!=
0
);
}
else
LISTBOX_MoveCaret
(
wnd
,
descr
,
index
,
FALSE
);
}
...
...
@@ -1776,8 +1779,9 @@ static LRESULT LISTBOX_HandleLButtonDown( WND *wnd, LB_DESCR *descr,
{
LISTBOX_MoveCaret
(
wnd
,
descr
,
index
,
FALSE
);
LISTBOX_SetSelection
(
wnd
,
descr
,
index
,
(
!
(
descr
->
style
&
LBS_MULTIPLESEL
)
||
!
descr
->
items
[
index
].
selected
),
FALSE
);
(
!
(
descr
->
style
&
LBS_MULTIPLESEL
)
||
!
descr
->
items
[
index
].
selected
),
(
descr
->
style
&
LBS_NOTIFY
)
!=
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