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
04e527b3
Commit
04e527b3
authored
Mar 04, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Move SelectItem implementation to IFolderView and use it for IShellView::SelectItem.
parent
c9751d36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
46 deletions
+43
-46
shlview.c
dlls/shell32/shlview.c
+43
-46
No files found.
dlls/shell32/shlview.c
View file @
04e527b3
...
...
@@ -1960,54 +1960,26 @@ static HRESULT WINAPI IShellView_fnSaveViewState(IShellView2 * iface)
static
HRESULT
WINAPI
IShellView_fnSelectItem
(
IShellView2
*
iface
,
LPCITEMIDLIST
pidl
,
UINT
uF
lags
)
UINT
f
lags
)
{
IShellViewImpl
*
This
=
(
IShellViewImpl
*
)
iface
;
int
i
;
TRACE
(
"(%p)->(pidl=%p, 0x%08x) stub
\n
"
,
This
,
pidl
,
uFlags
);
i
=
LV_FindItemByPidl
(
This
,
pidl
);
if
(
i
!=
-
1
)
{
LVITEMW
lvItem
;
if
(
uFlags
&
SVSI_ENSUREVISIBLE
)
SendMessageW
(
This
->
hWndList
,
LVM_ENSUREVISIBLE
,
i
,
0
);
lvItem
.
mask
=
LVIF_STATE
;
lvItem
.
stateMask
=
LVIS_SELECTED
|
LVIS_FOCUSED
;
lvItem
.
iItem
=
0
;
lvItem
.
iSubItem
=
0
;
while
(
SendMessageW
(
This
->
hWndList
,
LVM_GETITEMW
,
0
,
(
LPARAM
)
&
lvItem
))
{
if
(
lvItem
.
iItem
==
i
)
{
if
(
uFlags
&
SVSI_SELECT
)
lvItem
.
state
|=
LVIS_SELECTED
;
else
lvItem
.
state
&=
~
LVIS_SELECTED
;
IShellViewImpl
*
This
=
(
IShellViewImpl
*
)
iface
;
IFolderView
*
view
;
HRESULT
hr
;
int
i
;
if
(
uFlags
&
SVSI_FOCUSED
)
lvItem
.
state
&=
~
LVIS_FOCUSED
;
}
else
{
if
(
uFlags
&
SVSI_DESELECTOTHERS
)
lvItem
.
state
&=
~
LVIS_SELECTED
;
}
SendMessageW
(
This
->
hWndList
,
LVM_SETITEMW
,
0
,
(
LPARAM
)
&
lvItem
);
lvItem
.
iItem
++
;
}
TRACE
(
"(%p)->(pidl=%p, 0x%08x)
\n
"
,
This
,
pidl
,
flags
);
i
=
LV_FindItemByPidl
(
This
,
pidl
);
if
(
i
==
-
1
)
return
S_OK
;
if
(
uFlags
&
SVSI_EDIT
)
SendMessageW
(
This
->
hWndList
,
LVM_EDITLABELW
,
i
,
0
);
hr
=
IShellView2_QueryInterface
(
iface
,
&
IID_IFolderView
,
(
void
**
)
&
view
);
if
(
hr
==
S_OK
)
{
hr
=
IFolderView_SelectItem
(
view
,
i
,
flags
);
IFolderView_Release
(
view
);
}
}
return
S_OK
;
return
hr
;
}
static
HRESULT
WINAPI
IShellView_fnGetItemObject
(
IShellView2
*
iface
,
UINT
uItem
,
REFIID
riid
,
LPVOID
*
ppvOut
)
...
...
@@ -2783,9 +2755,34 @@ static HRESULT WINAPI IFView_GetAutoArrange(IFolderView *iface)
static
HRESULT
WINAPI
IFView_SelectItem
(
IFolderView
*
iface
,
int
item
,
DWORD
flags
)
{
IShellViewImpl
*
This
=
impl_from_IFolderView
(
iface
);
FIXME
(
"(%p)->(%d, %x), stub
\n
"
,
This
,
item
,
flags
);
return
E_NOTIMPL
;
IShellViewImpl
*
This
=
impl_from_IFolderView
(
iface
);
LVITEMW
lvItem
;
TRACE
(
"(%p)->(%d, %x)
\n
"
,
This
,
item
,
flags
);
lvItem
.
state
=
0
;
lvItem
.
stateMask
=
LVIS_SELECTED
;
if
(
flags
&
SVSI_ENSUREVISIBLE
)
SendMessageW
(
This
->
hWndList
,
LVM_ENSUREVISIBLE
,
item
,
0
);
/* all items */
if
(
flags
&
SVSI_DESELECTOTHERS
)
SendMessageW
(
This
->
hWndList
,
LVM_SETITEMSTATE
,
-
1
,
(
LPARAM
)
&
lvItem
);
/* this item */
if
(
flags
&
SVSI_SELECT
)
lvItem
.
state
|=
LVIS_SELECTED
;
if
(
flags
&
SVSI_FOCUSED
)
lvItem
.
stateMask
|=
LVIS_FOCUSED
;
SendMessageW
(
This
->
hWndList
,
LVM_SETITEMSTATE
,
item
,
(
LPARAM
)
&
lvItem
);
if
(
flags
&
SVSI_EDIT
)
SendMessageW
(
This
->
hWndList
,
LVM_EDITLABELW
,
item
,
0
);
return
S_OK
;
}
static
HRESULT
WINAPI
IFView_SelectAndPositionItems
(
IFolderView
*
iface
,
UINT
cidl
,
...
...
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