Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
1b4f5bb2
Commit
1b4f5bb2
authored
24 years ago
by
Juergen Schmied
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Small fixes.
parent
c17ddc86
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/shell32/pidl.c
+41
-22
41 additions, 22 deletions
dlls/shell32/pidl.c
dlls/shell32/shlview.c
+10
-19
10 additions, 19 deletions
dlls/shell32/shlview.c
with
51 additions
and
41 deletions
dlls/shell32/pidl.c
+
41
−
22
View file @
1b4f5bb2
...
...
@@ -11,7 +11,6 @@
#include
<ctype.h>
#include
<stdlib.h>
#include
<string.h>
#include
<assert.h>
#include
"winbase.h"
#include
"debugtools.h"
#include
"shell.h"
...
...
@@ -29,10 +28,7 @@ DEFAULT_DEBUG_CHANNEL(pidl)
DECLARE_DEBUG_CHANNEL
(
shell
)
void
pdump
(
LPCITEMIDLIST
pidl
)
{
DWORD
type
;
char
*
szData
;
char
*
szShortName
;
char
szName
[
MAX_PATH
];
{
BOOL
bIsShellDebug
;
LPITEMIDLIST
pidltemp
=
pidl
;
...
...
@@ -55,13 +51,21 @@ void pdump (LPCITEMIDLIST pidl)
{
do
{
type
=
_ILGetDataPointer
(
pidltemp
)
->
type
;
szData
=
_ILGetTextPointer
(
pidltemp
);
szShortName
=
_ILGetSTextPointer
(
pidltemp
);
DWORD
dwAttrib
=
0
;
LPPIDLDATA
pData
=
_ILGetDataPointer
(
pidltemp
);
DWORD
type
=
pData
->
type
;
LPSTR
szLongName
=
_ILGetTextPointer
(
pidltemp
);
LPSTR
szShortName
=
_ILGetSTextPointer
(
pidltemp
);
char
szName
[
MAX_PATH
];
_ILSimpleGetText
(
pidltemp
,
szName
,
MAX_PATH
);
if
(
PT_FOLDER
==
type
)
dwAttrib
=
pData
->
u
.
folder
.
uFileAttribs
;
else
if
(
PT_VALUE
==
type
)
dwAttrib
=
pData
->
u
.
file
.
uFileAttribs
;
MESSAGE
(
"-- pidl=%p size=%u type=%lx name=%s (%s,%s)
\n
"
,
pidltemp
,
pidltemp
->
mkid
.
cb
,
type
,
szName
,
debugstr_a
(
sz
Data
),
debugstr_a
(
szShortName
));
MESSAGE
(
"-- pidl=%p size=%u type=%lx
attr=0x%08lx
name=%s (%s,%s)
\n
"
,
pidltemp
,
pidltemp
->
mkid
.
cb
,
type
,
dwAttrib
,
szName
,
debugstr_a
(
sz
LongName
),
debugstr_a
(
szShortName
));
pidltemp
=
ILGetNext
(
pidltemp
);
...
...
@@ -677,25 +681,23 @@ LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL bEnd)
* exported by ordinal
*/
DWORD
WINAPI
ILFree
(
LPITEMIDLIST
pidl
)
{
TRACE
(
"(pidl=0x%08lx)
\n
"
,(
DWORD
)
pidl
);
if
(
!
pidl
)
return
FALSE
;
{
TRACE
(
"(pidl=0x%08lx)
\n
"
,(
DWORD
)
pidl
);
return
SHFree
(
pidl
);
if
(
!
pidl
)
return
FALSE
;
SHFree
(
pidl
);
return
TRUE
;
}
/*************************************************************************
* ILGlobalFree [SHELL32.156]
*
*/
DWORD
WINAPI
ILGlobalFree
(
LPITEMIDLIST
pidl
)
void
WINAPI
ILGlobalFree
(
LP
C
ITEMIDLIST
pidl
)
{
TRACE
(
"%p
\n
"
,
pidl
);
if
(
!
pidl
)
return
FALSE
;
return
pCOMCTL32_Free
(
pidl
);
if
(
!
pidl
)
return
;
pCOMCTL32_Free
(
pidl
);
}
/*************************************************************************
* ILCreateFromPath [SHELL32.157]
...
...
@@ -858,7 +860,8 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
{
TRACE_
(
shell
)(
"sf=%p pidl=%p 0x%04x %p 0x%04x stub
\n
"
,
psf
,
pidl
,
nFormat
,
dest
,
len
);
if
(
!
psf
||
!
dest
)
return
E_INVALIDARG
;
pdump
(
pidl
);
if
(
!
psf
||
!
dest
)
return
E_INVALIDARG
;
switch
(
nFormat
)
{
...
...
@@ -894,6 +897,10 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
*/
HRESULT
WINAPI
SHGetDataFromIDListW
(
LPSHELLFOLDER
psf
,
LPCITEMIDLIST
pidl
,
int
nFormat
,
LPVOID
dest
,
int
len
)
{
TRACE_
(
shell
)(
"sf=%p pidl=%p 0x%04x %p 0x%04x stub
\n
"
,
psf
,
pidl
,
nFormat
,
dest
,
len
);
pdump
(
pidl
);
if
(
!
psf
||
!
dest
)
return
E_INVALIDARG
;
switch
(
nFormat
)
...
...
@@ -956,6 +963,11 @@ BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath)
{
SHGetSpecialFolderPathA
(
0
,
pszPath
,
CSIDL_DESKTOPDIRECTORY
,
FALSE
);
}
else
if
(
_ILIsSpecialFolder
(
ILFindLastID
(
pidl
)))
{
/* we are somewhere in a special folder */
return
FALSE
;
}
else
{
if
(
SHGetDesktopFolder
(
&
shellfolder
)
==
S_OK
)
...
...
@@ -1539,6 +1551,8 @@ BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt)
{
LPPIDLDATA
pdata
=
_ILGetDataPointer
(
pidl
);
if
(
!
pdata
)
return
FALSE
;
switch
(
pdata
->
type
)
{
case
PT_FOLDER
:
...
...
@@ -1587,6 +1601,8 @@ DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
LPPIDLDATA
pdata
=
_ILGetDataPointer
(
pidl
);
DWORD
dwSize
;
if
(
!
pdata
)
return
0
;
switch
(
pdata
->
type
)
{
case
PT_VALUE
:
...
...
@@ -1678,7 +1694,8 @@ void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
* RETURNS
* Attributes
*
* NOTES
* FIXME
* return value 0 in case of error is a valid return value
*
*/
DWORD
_ILGetFileAttributes
(
LPCITEMIDLIST
pidl
,
LPSTR
pOut
,
UINT
uOutSize
)
...
...
@@ -1687,6 +1704,8 @@ DWORD _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
WORD
wAttrib
=
0
;
int
i
;
if
(
!
pData
)
return
0
;
switch
(
pData
->
type
)
{
case
PT_FOLDER
:
...
...
This diff is collapsed.
Click to expand it.
dlls/shell32/shlview.c
+
10
−
19
View file @
1b4f5bb2
...
...
@@ -6,10 +6,6 @@
* This is the view visualizing the data provied by the shellfolder.
* No direct access to data from pidls should be done from here.
*
* FIXME: There is not jet a official interface defined to manipulate
* the objects shown in the view (rename, move...). This should be
* implemented as additional interface to IShellFolder.
*
* FIXME: The order by part of the background context menu should be
* buily according to the columns shown.
*
...
...
@@ -471,7 +467,7 @@ static INT CALLBACK ShellView_ListViewCompareItems(LPVOID lParam1, LPVOID lParam
*/
static
int
LV_FindItemByPidl
(
IShellViewImpl
*
This
,
LPITEMIDLIST
pidl
)
LP
C
ITEMIDLIST
pidl
)
{
LVITEMA
lvItem
;
ZeroMemory
(
&
lvItem
,
sizeof
(
LVITEMA
));
...
...
@@ -491,11 +487,11 @@ static int LV_FindItemByPidl(
/**********************************************************
* LV_AddItem()
*/
static
BOOLEAN
LV_AddItem
(
IShellViewImpl
*
This
,
LPITEMIDLIST
pidl
)
static
BOOLEAN
LV_AddItem
(
IShellViewImpl
*
This
,
LP
C
ITEMIDLIST
pidl
)
{
LVITEMA
lvItem
;
FIXM
E
(
"(%p)(pidl=%p)
\n
"
,
This
,
pidl
);
TRAC
E
(
"(%p)(pidl=%p)
\n
"
,
This
,
pidl
);
ZeroMemory
(
&
lvItem
,
sizeof
(
lvItem
));
/* create the listview item*/
lvItem
.
mask
=
LVIF_TEXT
|
LVIF_IMAGE
|
LVIF_PARAM
;
/*set the mask*/
...
...
@@ -509,11 +505,11 @@ static BOOLEAN LV_AddItem(IShellViewImpl * This, LPITEMIDLIST pidl)
/**********************************************************
* LV_DeleteItem()
*/
static
BOOLEAN
LV_DeleteItem
(
IShellViewImpl
*
This
,
LPITEMIDLIST
pidl
)
static
BOOLEAN
LV_DeleteItem
(
IShellViewImpl
*
This
,
LP
C
ITEMIDLIST
pidl
)
{
int
nIndex
;
FIXM
E
(
"(%p)(pidl=%p)
\n
"
,
This
,
pidl
);
TRAC
E
(
"(%p)(pidl=%p)
\n
"
,
This
,
pidl
);
nIndex
=
LV_FindItemByPidl
(
This
,
ILFindLastID
(
pidl
));
return
(
-
1
==
ListView_DeleteItem
(
This
->
hWndList
,
nIndex
))
?
FALSE
:
TRUE
;
...
...
@@ -522,12 +518,12 @@ static BOOLEAN LV_DeleteItem(IShellViewImpl * This, LPITEMIDLIST pidl)
/**********************************************************
* LV_RenameItem()
*/
static
BOOLEAN
LV_RenameItem
(
IShellViewImpl
*
This
,
LPITEMIDLIST
pidlOld
,
LPITEMIDLIST
pidlNew
)
static
BOOLEAN
LV_RenameItem
(
IShellViewImpl
*
This
,
LP
C
ITEMIDLIST
pidlOld
,
LP
C
ITEMIDLIST
pidlNew
)
{
int
nItem
;
LVITEMA
lvItem
;
FIXM
E
(
"(%p)(pidlold=%p pidlnew=%p)
\n
"
,
This
,
pidlOld
,
pidlNew
);
TRAC
E
(
"(%p)(pidlold=%p pidlnew=%p)
\n
"
,
This
,
pidlOld
,
pidlNew
);
nItem
=
LV_FindItemByPidl
(
This
,
ILFindLastID
(
pidlOld
));
if
(
-
1
!=
nItem
)
...
...
@@ -603,13 +599,8 @@ static HRESULT ShellView_FillList(IShellViewImpl * This)
/* in a commdlg This works as a filemask*/
if
(
IncludeObject
(
This
,
pidl
)
==
S_OK
)
{
if
(
!
LV_AddItem
(
This
,
pidl
))
SHFree
(
pidl
);
/* insert failed: PIDL not owned by the LV */
}
else
{
SHFree
(
pidl
);
/* not inserted */
}
LV_AddItem
(
This
,
pidl
);
SHFree
(
pidl
);
}
/*turn the listview's redrawing back on and force it to draw*/
...
...
@@ -1199,7 +1190,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
if
(
ShellView_GetSelections
(
This
))
{
IDataObject
*
pda
;
DWORD
dwAttributes
;
DWORD
dwAttributes
=
SFGAO_CANLINK
;
DWORD
dwEffect
=
DROPEFFECT_COPY
|
DROPEFFECT_MOVE
;
if
(
GetShellOle
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment