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
47a80043
Commit
47a80043
authored
Nov 22, 1998
by
Juergen Schmied
Committed by
Alexandre Julliard
Nov 22, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Many fixes.
parent
be90e005
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
39 deletions
+60
-39
contmenu.c
dlls/shell32/contmenu.c
+9
-1
dataobject.c
dlls/shell32/dataobject.c
+1
-1
folders.c
dlls/shell32/folders.c
+2
-2
iconcache.c
dlls/shell32/iconcache.c
+1
-1
pidl.h
dlls/shell32/pidl.h
+2
-0
shell32_main.h
dlls/shell32/shell32_main.h
+4
-0
shlview.c
dlls/shell32/shlview.c
+41
-34
No files found.
dlls/shell32/contmenu.c
View file @
47a80043
...
...
@@ -161,7 +161,8 @@ static HRESULT WINAPI IContextMenu_QueryContextMenu( LPCONTEXTMENU this, HMENU32
if
(
!
(
CMF_DEFAULTONLY
&
uFlags
))
{
if
(
!
this
->
bAllValues
)
{
fExplore
=
uFlags
&
CMF_EXPLORE
;
{
/* folder menu */
fExplore
=
uFlags
&
CMF_EXPLORE
;
if
(
fExplore
)
{
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_EXPLORE
,
MFT_STRING
,
TEXT
(
"&Explore"
),
MFS_ENABLED
|
MFS_DEFAULT
);
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_OPEN
,
MFT_STRING
,
TEXT
(
"&Open"
),
MFS_ENABLED
);
...
...
@@ -176,6 +177,13 @@ static HRESULT WINAPI IContextMenu_QueryContextMenu( LPCONTEXTMENU this, HMENU32
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_RENAME
,
MFT_STRING
,
TEXT
(
"&Rename"
),
(
IContextMenu_CanRenameItems
(
this
)
?
MFS_ENABLED
:
MFS_DISABLED
));
}
}
else
/* file menu */
{
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_OPEN
,
MFT_STRING
,
TEXT
(
"&Open"
),
MFS_ENABLED
|
MFS_DEFAULT
);
if
(
uFlags
&
CMF_CANRENAME
)
{
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
0
,
MFT_SEPARATOR
,
NULL
,
0
);
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_RENAME
,
MFT_STRING
,
TEXT
(
"&Rename"
),
(
IContextMenu_CanRenameItems
(
this
)
?
MFS_ENABLED
:
MFS_DISABLED
));
}
}
return
MAKE_HRESULT
(
SEVERITY_SUCCESS
,
0
,
(
IDM_LAST
+
1
));
}
return
MAKE_HRESULT
(
SEVERITY_SUCCESS
,
0
,
0
);
...
...
dlls/shell32/dataobject.c
View file @
47a80043
...
...
@@ -297,7 +297,7 @@ static HRESULT WINAPI IDataObject_GetData (LPDATAOBJECT this, LPFORMATETC32 pfor
HGLOBAL32
hmem
;
GetClipboardFormatName32A
(
pformatetcIn
->
cfFormat
,
temp
,
256
);
FIXME
(
shell
,
"(%p)->(%p %p format=%s)
\n
"
,
this
,
pformatetcIn
,
pmedium
,
temp
);
WARN
(
shell
,
"(%p)->(%p %p format=%s)semi-stub
\n
"
,
this
,
pformatetcIn
,
pmedium
,
temp
);
if
(
!
DATAOBJECT_InitShellIDList
())
/* is the clipformat registred? */
{
return
(
E_UNEXPECTED
);
...
...
dlls/shell32/folders.c
View file @
47a80043
...
...
@@ -139,12 +139,12 @@ static ULONG WINAPI IExtractIcon_Release(LPEXTRACTICON this)
* IExtractIcon_GetIconLocation
*/
static
HRESULT
WINAPI
IExtractIcon_GetIconLocation
(
LPEXTRACTICON
this
,
UINT32
uFlags
,
LPSTR
szIconFile
,
UINT32
cchMax
,
int
*
piIndex
,
UINT32
*
pwFlags
)
{
FIXME
(
shell
,
"(%p) (flags=%u file=%s max=%u %p %p) semi-stub
\n
"
,
this
,
uFlags
,
szIconFile
,
cchMax
,
piIndex
,
pwFlags
);
{
WARN
(
shell
,
"(%p) (flags=%u file=%s max=%u %p %p) semi-stub
\n
"
,
this
,
uFlags
,
szIconFile
,
cchMax
,
piIndex
,
pwFlags
);
*
piIndex
=
(
int
)
SHMapPIDLToSystemImageListIndex
(
0
,
this
->
pidl
,
0
);
*
pwFlags
=
GIL_NOTFILENAME
;
FIXME
(
shell
,
"-- %x
\n
"
,
*
piIndex
);
WARN
(
shell
,
"-- %x
\n
"
,
*
piIndex
);
return
NOERROR
;
}
...
...
dlls/shell32/iconcache.c
View file @
47a80043
...
...
@@ -614,7 +614,7 @@ DWORD WINAPI Shell_GetImageList(HIMAGELIST * imglist1,HIMAGELIST * imglist2)
DWORD
WINAPI
SHMapPIDLToSystemImageListIndex
(
LPSHELLFOLDER
sh
,
LPITEMIDLIST
pidl
,
DWORD
z
)
{
LPITEMIDLIST
pidltemp
=
ILFindLastID
(
pidl
);
FIXME
(
shell
,
"(SF=%p,pidl=%p,%08lx):stub.
\n
"
,
sh
,
pidl
,
z
);
WARN
(
shell
,
"(SF=%p,pidl=%p,%08lx):stub.
\n
"
,
sh
,
pidl
,
z
);
if
(
_ILIsMyComputer
(
pidltemp
))
{
return
20
;
...
...
dlls/shell32/pidl.h
View file @
47a80043
...
...
@@ -95,5 +95,7 @@ LPPIDLDATA WINAPI _ILGetDataPointer(LPCITEMIDLIST);
LPSTR
WINAPI
_ILGetTextPointer
(
PIDLTYPE
type
,
LPPIDLDATA
pidldata
);
BOOL32
WINAPI
_ILGetFileDate
(
LPCITEMIDLIST
pidl
,
LPSTR
pOut
,
UINT32
uOutSize
);
BOOL32
WINAPI
_ILGetFileSize
(
LPCITEMIDLIST
pidl
,
LPSTR
pOut
,
UINT32
uOutSize
);
BOOL32
WINAPI
_ILGetExtension
(
LPCITEMIDLIST
pidl
,
LPSTR
pOut
,
UINT32
uOutSize
);
void
pdump
(
LPCITEMIDLIST
pidl
);
#endif
dlls/shell32/shell32_main.h
View file @
47a80043
...
...
@@ -29,9 +29,13 @@ extern LPVOID (CALLBACK* pDPA_GetPtr) (const HDPA, INT32);
extern
BOOL32
(
CALLBACK
*
pDPA_Destroy
)
(
const
HDPA
);
extern
INT32
(
CALLBACK
*
pDPA_Search
)
(
const
HDPA
,
LPVOID
,
INT32
,
PFNDPACOMPARE
,
LPARAM
,
UINT32
);
/* Iconcache */
extern
BOOL32
WINAPI
SIC_Initialize
(
void
);
extern
HICON32
WINAPI
SIC_GetIcon
(
LPSTR
sSourceFile
,
DWORD
dwSourceIndex
,
BOOL32
bSmallIcon
);
/* Classes Root */
extern
BOOL32
WINAPI
HCR_MapTypeToValue
(
LPSTR
szExtension
,
LPSTR
szFileType
,
DWORD
len
);
/* FIXME should be moved to a header file. IsEqualGUID
is declared but not exported in compobj.c !!!*/
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
...
...
dlls/shell32/shlview.c
View file @
47a80043
...
...
@@ -247,9 +247,10 @@ BOOL32 ShellView_CreateList (LPSHELLVIEW this)
LVS_SHAREIMAGELISTS
|
LVS_EDITLABELS
;
switch
(
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
;
case
FVM_DETAILS
:
dwStyle
|=
LVS_REPOR
T
;
break
;
default:
dwStyle
|=
LVS_LIS
T
;
break
;
}
if
(
this
->
FolderSettings
.
fFlags
&&
FWF_AUTOARRANGE
)
dwStyle
|=
LVS_AUTOARRANGE
;
/*if (this->FolderSettings.fFlags && FWF_DESKTOP); used from explorer*/
...
...
@@ -277,10 +278,10 @@ BOOL32 ShellView_CreateList (LPSHELLVIEW this)
* NOTES
* internal
*/
int
nColumn1
=
1
0
0
;
/* width of column */
int
nColumn2
=
10
0
;
int
nColumn3
=
1
0
0
;
int
nColumn4
=
10
0
;
int
nColumn1
=
1
2
0
;
/* width of column */
int
nColumn2
=
5
0
;
int
nColumn3
=
1
7
0
;
int
nColumn4
=
6
0
;
BOOL32
ShellView_InitList
(
LPSHELLVIEW
this
)
{
LVCOLUMN32A
lvColumn
;
...
...
@@ -834,33 +835,28 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
{
TRACE
(
shell
,
"-- pContextMenu
\n
"
);
hMenu
=
CreatePopupMenu32
();
/* See if we are in Explore or Open mode. If the browser's tree
if
(
hMenu
)
{
/* See if we are in Explore or Open mode. If the browser's tree
is present, then we are in Explore mode.*/
fExplore
=
FALSE
;
if
(
SUCCEEDED
(
IShellBrowser_GetControlWindow
(
this
->
pShellBrowser
,
FCW_TREE
,
&
hwndTree
))
&&
hwndTree
)
{
TRACE
(
shell
,
"-- fExplor
e
\n
"
);
{
TRACE
(
shell
,
"-- explore mod
e
\n
"
);
fExplore
=
TRUE
;
}
if
(
hMenu
&&
SUCCEEDED
(
pContextMenu
->
lpvtbl
->
fnQueryContextMenu
(
pContextMenu
,
hMenu
,
0
,
MENU_OFFSET
,
MENU_MAX
,
CMF_NORMAL
|
(
this
->
uSelected
!=
1
?
0
:
CMF_CANRENAME
)
|
(
fExplore
?
CMF_EXPLORE
:
0
))))
{
if
(
fDefault
)
{
TRACE
(
shell
,
"-- fDefault
\n
"
);
uCommand
=
0
;
wFlags
=
CMF_NORMAL
|
(
this
->
uSelected
!=
1
?
0
:
CMF_CANRENAME
)
|
(
fExplore
?
CMF_EXPLORE
:
0
);
if
(
SUCCEEDED
(
pContextMenu
->
lpvtbl
->
fnQueryContextMenu
(
pContextMenu
,
hMenu
,
0
,
MENU_OFFSET
,
MENU_MAX
,
wFlags
)))
{
if
(
fDefault
)
{
TRACE
(
shell
,
"-- get menu default command
\n
"
);
uCommand
=
0
;
nMenuIndex
=
0
;
ZeroMemory
(
&
mii
,
sizeof
(
mii
));
mii
.
cbSize
=
sizeof
(
mii
);
mii
.
fMask
=
MIIM_STATE
|
MIIM_ID
;
nMenuIndex
=
0
;
/*find the default item in the menu*/
while
(
GetMenuItemInfo32A
(
hMenu
,
nMenuIndex
,
TRUE
,
&
mii
))
while
(
GetMenuItemInfo32A
(
hMenu
,
nMenuIndex
,
TRUE
,
&
mii
))
/*find the default item in the menu*/
{
if
(
mii
.
fState
&
MFS_DEFAULT
)
{
uCommand
=
mii
.
wID
;
break
;
...
...
@@ -869,7 +865,7 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
}
}
else
{
TRACE
(
shell
,
"-- ! fDefault
\n
"
);
{
TRACE
(
shell
,
"-- track popup
\n
"
);
uCommand
=
TrackPopupMenu32
(
hMenu
,
TPM_LEFTALIGN
|
TPM_RETURNCMD
,
x
,
y
,
0
,
this
->
hWnd
,
NULL
);
}
...
...
@@ -877,19 +873,18 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
{
TRACE
(
shell
,
"-- uCommand=%u
\n
"
,
uCommand
);
if
(((
uCommand
-
MENU_OFFSET
)
==
IDM_EXPLORE
)
||
((
uCommand
-
MENU_OFFSET
)
==
IDM_OPEN
))
{
if
(
IsInCommDlg
(
this
))
/* are we part of a commctrl? */
{
TRACE
(
shell
,
"-- fn
OnDefaultCommand
\n
"
);
{
TRACE
(
shell
,
"-- dlg:
OnDefaultCommand
\n
"
);
OnDefaultCommand
(
this
);
}
else
/* we are acting with a full featured IShellBrowser */
{
TRACE
(
shell
,
"-- fn
BrowseObject pidl =%p
\n
"
,
this
->
aSelectedItems
[
0
]);
{
TRACE
(
shell
,
"-- explorer:
BrowseObject pidl =%p
\n
"
,
this
->
aSelectedItems
[
0
]);
wFlags
=
SBSP_SAMEBROWSER
|
SBSP_DEFMODE
|
SBSP_RELATIVE
;
IShellBrowser_BrowseObject
(
this
->
pShellBrowser
,
this
->
aSelectedItems
[
0
],
wFlags
);
IShellBrowser_BrowseObject
(
this
->
pShellBrowser
,
this
->
aSelectedItems
[
0
],
wFlags
);
}
}
else
{
ZeroMemory
(
&
cmi
,
sizeof
(
cmi
));
{
TRACE
(
shell
,
"-- invoke command
\n
"
,
this
->
aSelectedItems
[
0
]);
ZeroMemory
(
&
cmi
,
sizeof
(
cmi
));
cmi
.
cbSize
=
sizeof
(
cmi
);
cmi
.
hwnd
=
this
->
hWndParent
;
cmi
.
lpVerb
=
(
LPCSTR
)
MAKEINTRESOURCE32A
(
uCommand
-
MENU_OFFSET
);
...
...
@@ -898,6 +893,7 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
}
DestroyMenu32
(
hMenu
);
}
}
pContextMenu
->
lpvtbl
->
fnRelease
(
pContextMenu
);
}
SHFree
(
this
->
aSelectedItems
);
...
...
@@ -996,6 +992,7 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
case
LVN_ITEMACTIVATE
:
TRACE
(
shell
,
"-- LVN_ITEMACTIVATE %p
\n
"
,
this
);
OnStateChange
(
this
,
CDBOSC_SELCHANGE
);
/* the browser will get the IDataObject now */
ShellView_DoContextMenu
(
this
,
0
,
0
,
TRUE
);
break
;
...
...
@@ -1018,7 +1015,14 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
_ILGetFileSize
(
pidl
,
lpdi
->
item
.
pszText
,
lpdi
->
item
.
cchTextMax
);
break
;
case
2
:
strncpy
(
lpdi
->
item
.
pszText
,
"File"
,
lpdi
->
item
.
cchTextMax
);
{
char
sTemp
[
64
];
if
(
!
(
_ILGetExtension
(
pidl
,
sTemp
,
64
)
&&
HCR_MapTypeToValue
(
sTemp
,
sTemp
,
64
)
&&
HCR_MapTypeToValue
(
sTemp
,
lpdi
->
item
.
pszText
,
lpdi
->
item
.
cchTextMax
)))
{
strncpy
(
lpdi
->
item
.
pszText
,
sTemp
,
lpdi
->
item
.
cchTextMax
);
strncat
(
lpdi
->
item
.
pszText
,
"-file"
,
lpdi
->
item
.
cchTextMax
);
}
}
break
;
case
3
:
_ILGetFileDate
(
pidl
,
lpdi
->
item
.
pszText
,
lpdi
->
item
.
cchTextMax
);
...
...
@@ -1028,7 +1032,7 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
else
/*its a folder*/
{
switch
(
lpdi
->
item
.
iSubItem
)
{
case
1
:
s
printf
(
lpdi
->
item
.
pszText
,
"fixme
"
);
s
trcpy
(
lpdi
->
item
.
pszText
,
"
"
);
break
;
case
2
:
strncpy
(
lpdi
->
item
.
pszText
,
"Folder"
,
lpdi
->
item
.
cchTextMax
);
...
...
@@ -1038,6 +1042,7 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
break
;
}
}
TRACE
(
shell
,
"-- text=%s
\n
"
,
lpdi
->
item
.
pszText
);
}
}
else
/*the item text is being requested*/
...
...
@@ -1053,8 +1058,8 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
else
{
FIXME
(
shell
,
"type wrong
\n
"
);
}
TRACE
(
shell
,
"-- text=%s
\n
"
,
lpdi
->
item
.
pszText
);
}
TRACE
(
shell
,
"-- text=%s
\n
"
,
lpdi
->
item
.
pszText
);
}
if
(
lpdi
->
item
.
mask
&
LVIF_IMAGE
)
/*is the image being requested?*/
...
...
@@ -1412,8 +1417,6 @@ static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW this, IShellView *
IShellBrowser_AddRef
(
this
->
pShellBrowser
);
IShellBrowser_GetWindow
(
this
->
pShellBrowser
,
&
(
this
->
hWndParent
));
/* IShellBrowser_SendControlMsg(this->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON, 0xa004, TRUE, &dwResult);
*/
/* try to get the ICommDlgBrowserInterface */
this
->
pCommDlgBrowser
=
NULL
;
if
(
SUCCEEDED
(
IShellBrowser_QueryInterface
(
this
->
pShellBrowser
,
...
...
@@ -1499,7 +1502,11 @@ static HRESULT WINAPI IShellView_GetItemObject(LPSHELLVIEW this, UINT32 uItem, R
{
pObj
=
(
LPUNKNOWN
)
IContextMenu_Constructor
(
this
->
pSFParent
,
this
->
aSelectedItems
,
this
->
uSelected
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDataObject
))
{
pObj
=
(
LPUNKNOWN
)
IDataObject_Constructor
(
this
->
hWndParent
,
this
->
pSFParent
,
this
->
aSelectedItems
,
this
->
uSelected
);
{
ShellView_GetSelections
(
this
);
pObj
=
(
LPUNKNOWN
)
IDataObject_Constructor
(
this
->
hWndParent
,
this
->
pSFParent
,
this
->
aSelectedItems
,
this
->
uSelected
);
SHFree
(
this
->
aSelectedItems
);
this
->
aSelectedItems
=
NULL
;
this
->
uSelected
=
0
;
}
TRACE
(
shell
,
"-- (%p)->(interface=%p)
\n
"
,
this
,
ppvOut
);
...
...
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