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
0e7a5bf7
Commit
0e7a5bf7
authored
Jul 22, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Jul 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement Set/GetCurrentViewMode in the default shellview.
parent
4291823f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
17 deletions
+50
-17
shlview.c
dlls/shell32/shlview.c
+50
-17
shlview.c
dlls/shell32/tests/shlview.c
+0
-0
No files found.
dlls/shell32/shlview.c
View file @
0e7a5bf7
...
@@ -312,6 +312,29 @@ static void SetStyle(IShellViewImpl * This, DWORD dwAdd, DWORD dwRemove)
...
@@ -312,6 +312,29 @@ static void SetStyle(IShellViewImpl * This, DWORD dwAdd, DWORD dwRemove)
SetWindowLongW
(
This
->
hWndList
,
GWL_STYLE
,
dwAdd
|
(
tmpstyle
&
~
dwRemove
));
SetWindowLongW
(
This
->
hWndList
,
GWL_STYLE
,
dwAdd
|
(
tmpstyle
&
~
dwRemove
));
}
}
static
DWORD
ViewModeToListStyle
(
UINT
ViewMode
)
{
DWORD
dwStyle
;
TRACE
(
"%d
\n
"
,
ViewMode
);
switch
(
ViewMode
)
{
case
FVM_ICON
:
dwStyle
=
LVS_ICON
;
break
;
case
FVM_DETAILS
:
dwStyle
=
LVS_REPORT
;
break
;
case
FVM_SMALLICON
:
dwStyle
=
LVS_SMALLICON
;
break
;
case
FVM_LIST
:
dwStyle
=
LVS_LIST
;
break
;
default:
{
FIXME
(
"ViewMode %d not implemented
\n
"
,
ViewMode
);
dwStyle
=
LVS_LIST
;
break
;
}
}
return
dwStyle
;
}
/**********************************************************
/**********************************************************
* ShellView_CreateList()
* ShellView_CreateList()
*
*
...
@@ -326,19 +349,7 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
...
@@ -326,19 +349,7 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
LVS_SHAREIMAGELISTS
|
LVS_EDITLABELS
|
LVS_ALIGNLEFT
|
LVS_AUTOARRANGE
;
LVS_SHAREIMAGELISTS
|
LVS_EDITLABELS
|
LVS_ALIGNLEFT
|
LVS_AUTOARRANGE
;
dwExStyle
=
WS_EX_CLIENTEDGE
;
dwExStyle
=
WS_EX_CLIENTEDGE
;
switch
(
This
->
FolderSettings
.
ViewMode
)
dwStyle
|=
ViewModeToListStyle
(
This
->
FolderSettings
.
ViewMode
);
{
case
FVM_ICON
:
dwStyle
|=
LVS_ICON
;
break
;
case
FVM_DETAILS
:
dwStyle
|=
LVS_REPORT
;
break
;
case
FVM_SMALLICON
:
dwStyle
|=
LVS_SMALLICON
;
break
;
case
FVM_LIST
:
dwStyle
|=
LVS_LIST
;
break
;
default:
{
FIXME
(
"ViewMode %d not implemented
\n
"
,
This
->
FolderSettings
.
ViewMode
);
dwStyle
|=
LVS_LIST
;
break
;
}
}
if
(
This
->
FolderSettings
.
fFlags
&
FWF_AUTOARRANGE
)
dwStyle
|=
LVS_AUTOARRANGE
;
if
(
This
->
FolderSettings
.
fFlags
&
FWF_AUTOARRANGE
)
dwStyle
|=
LVS_AUTOARRANGE
;
if
(
This
->
FolderSettings
.
fFlags
&
FWF_DESKTOP
)
if
(
This
->
FolderSettings
.
fFlags
&
FWF_DESKTOP
)
...
@@ -2733,15 +2744,37 @@ static ULONG WINAPI IFView_Release( IFolderView *iface)
...
@@ -2733,15 +2744,37 @@ static ULONG WINAPI IFView_Release( IFolderView *iface)
static
HRESULT
WINAPI
IFView_GetCurrentViewMode
(
IFolderView
*
iface
,
UINT
*
mode
)
static
HRESULT
WINAPI
IFView_GetCurrentViewMode
(
IFolderView
*
iface
,
UINT
*
mode
)
{
{
IShellViewImpl
*
This
=
impl_from_IFolderView
(
iface
);
IShellViewImpl
*
This
=
impl_from_IFolderView
(
iface
);
FIXME
(
"(%p)->(%p), stub
\n
"
,
This
,
mode
);
TRACE
(
"(%p)->(%p), stub
\n
"
,
This
,
mode
);
return
E_NOTIMPL
;
if
(
!
mode
)
return
E_INVALIDARG
;
*
mode
=
This
->
FolderSettings
.
ViewMode
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
IFView_SetCurrentViewMode
(
IFolderView
*
iface
,
UINT
mode
)
static
HRESULT
WINAPI
IFView_SetCurrentViewMode
(
IFolderView
*
iface
,
UINT
mode
)
{
{
IShellViewImpl
*
This
=
impl_from_IFolderView
(
iface
);
IShellViewImpl
*
This
=
impl_from_IFolderView
(
iface
);
FIXME
(
"(%p)->(%u), stub
\n
"
,
This
,
mode
);
DWORD
dwStyle
;
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%u), stub
\n
"
,
This
,
mode
);
if
((
mode
<
FVM_FIRST
||
mode
>
FVM_LAST
)
&&
(
mode
!=
FVM_AUTO
))
return
E_INVALIDARG
;
/* Windows before Vista uses LVM_SETVIEW and possibly
LVM_SETEXTENDEDLISTVIEWSTYLE to set the style of the listview,
while later versions seem to accomplish this through other
means. */
dwStyle
=
ViewModeToListStyle
(
mode
);
SetStyle
(
This
,
dwStyle
,
LVS_TYPEMASK
);
/* This will not necessarily be the actual mode set above.
This mimics the behavior of Windows XP. */
This
->
FolderSettings
.
ViewMode
=
mode
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
IFView_GetFolder
(
IFolderView
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
IFView_GetFolder
(
IFolderView
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
dlls/shell32/tests/shlview.c
View file @
0e7a5bf7
This diff is collapsed.
Click to expand it.
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