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
cd454fdc
Commit
cd454fdc
authored
Mar 14, 2012
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Partially implement Mac Trash backing for the Recycle Bin.
parent
f67d34f7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
5 deletions
+91
-5
configure
configure
+4
-0
configure.ac
configure.ac
+2
-0
Makefile.in
dlls/shell32/Makefile.in
+1
-0
trash.c
dlls/shell32/trash.c
+81
-5
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
cd454fdc
...
...
@@ -666,6 +666,7 @@ COREAUDIO
SECURITYLIB
DISKARBITRATIONLIB
LDEXECFLAGS
CORESERVICESLIB
APPLICATIONSERVICESLIB
IOKITLIB
COREFOUNDATIONLIB
...
...
@@ -5752,6 +5753,7 @@ for ac_header in \
CL/cl.h
\
Carbon/Carbon.h
\
CoreAudio/CoreAudio.h
\
CoreServices/CoreServices.h
\
DiskArbitration/DiskArbitration.h
\
IOKit/IOKitLib.h
\
IOKit/hid/IOHIDLib.h
\
...
...
@@ -6495,6 +6497,8 @@ fi
APPLICATIONSERVICESLIB
=
"-framework ApplicationServices"
CORESERVICESLIB
=
"-framework CoreServices"
case
$host_os
in
darwin11
*
)
LDEXECFLAGS
=
"-image_base 0x7bf00000 -Wl,-macosx_version_min,10.6,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000"
...
...
configure.ac
View file @
cd454fdc
...
...
@@ -392,6 +392,7 @@ AC_CHECK_HEADERS(\
CL/cl.h \
Carbon/Carbon.h \
CoreAudio/CoreAudio.h \
CoreServices/CoreServices.h \
DiskArbitration/DiskArbitration.h \
IOKit/IOKitLib.h \
IOKit/hid/IOHIDLib.h \
...
...
@@ -714,6 +715,7 @@ case $host_os in
AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")
AC_SUBST(IOKITLIB,"-framework IOKit -framework CoreFoundation")
AC_SUBST(APPLICATIONSERVICESLIB,"-framework ApplicationServices")
AC_SUBST(CORESERVICESLIB,"-framework CoreServices")
case $host_os in
darwin11*)
AC_SUBST(LDEXECFLAGS,["-image_base 0x7bf00000 -Wl,-macosx_version_min,10.6,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000"]) ;;
...
...
dlls/shell32/Makefile.in
View file @
cd454fdc
...
...
@@ -3,6 +3,7 @@ MODULE = shell32.dll
IMPORTLIB
=
shell32
IMPORTS
=
uuid shlwapi comctl32 user32 gdi32 advapi32
DELAYIMPORTS
=
ole32 oleaut32 shdocvw version
EXTRALIBS
=
@CORESERVICESLIB@
C_SRCS
=
\
appbar.c
\
...
...
dlls/shell32/trash.c
View file @
cd454fdc
...
...
@@ -22,7 +22,20 @@
#include "config.h"
#ifdef HAVE_CORESERVICES_CORESERVICES_H
#define GetCurrentThread MacGetCurrentThread
#define LoadResource MacLoadResource
#include <CoreServices/CoreServices.h>
#undef GetCurrentThread
#undef LoadResource
#undef DPRINTF
#endif
#include <stdarg.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
...
...
@@ -41,17 +54,78 @@
#include "winreg.h"
#include "shlwapi.h"
#include "winternl.h"
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include "wine/debug.h"
#include "shell32_main.h"
#include "xdg.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
trash
);
#ifdef HAVE_CORESERVICES_CORESERVICES_H
BOOL
TRASH_CanTrashFile
(
LPCWSTR
wszPath
)
{
char
*
unix_path
;
OSStatus
status
;
FSRef
ref
;
FSCatalogInfo
catalogInfo
;
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
wszPath
));
if
(
!
(
unix_path
=
wine_get_unix_file_name
(
wszPath
)))
return
FALSE
;
status
=
FSPathMakeRef
((
UInt8
*
)
unix_path
,
&
ref
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
unix_path
);
if
(
status
==
noErr
)
status
=
FSGetCatalogInfo
(
&
ref
,
kFSCatInfoVolume
,
&
catalogInfo
,
NULL
,
NULL
,
NULL
);
if
(
status
==
noErr
)
status
=
FSFindFolder
(
catalogInfo
.
volume
,
kTrashFolderType
,
kCreateFolder
,
&
ref
);
return
(
status
==
noErr
);
}
BOOL
TRASH_TrashFile
(
LPCWSTR
wszPath
)
{
char
*
unix_path
;
OSStatus
status
;
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
wszPath
));
if
(
!
(
unix_path
=
wine_get_unix_file_name
(
wszPath
)))
return
FALSE
;
status
=
FSPathMoveObjectToTrashSync
(
unix_path
,
NULL
,
kFSFileOperationSkipPreflight
);
HeapFree
(
GetProcessHeap
(),
0
,
unix_path
);
return
(
status
==
noErr
);
}
HRESULT
TRASH_EnumItems
(
LPITEMIDLIST
**
pidls
,
int
*
count
)
{
FIXME
(
"stub!
\n
"
);
return
E_NOTIMPL
;
}
HRESULT
TRASH_UnpackItemID
(
LPCSHITEMID
id
,
WIN32_FIND_DATAW
*
data
)
{
FIXME
(
"stub!
\n
"
);
return
E_NOTIMPL
;
}
HRESULT
TRASH_RestoreItem
(
LPCITEMIDLIST
pidl
)
{
FIXME
(
"stub!
\n
"
);
return
E_NOTIMPL
;
}
HRESULT
TRASH_EraseItem
(
LPCITEMIDLIST
pidl
)
{
FIXME
(
"stub!
\n
"
);
return
E_NOTIMPL
;
}
#else
/* HAVE_CORESERVICES_CORESERVICES_H */
static
CRITICAL_SECTION
TRASH_Creating
;
static
CRITICAL_SECTION_DEBUG
TRASH_Creating_Debug
=
{
...
...
@@ -603,3 +677,5 @@ HRESULT TRASH_EraseItem(LPCITEMIDLIST pidl)
SHFree
(
file_path
);
return
S_OK
;
}
#endif
/* HAVE_CORESERVICES_CORESERVICES_H */
include/config.h.in
View file @
cd454fdc
...
...
@@ -61,6 +61,9 @@
/* Define to 1 if you have the <CoreAudio/CoreAudio.h> header file. */
#undef HAVE_COREAUDIO_COREAUDIO_H
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
#undef HAVE_CORESERVICES_CORESERVICES_H
/* Define to 1 if you have the <cups/cups.h> header file. */
#undef HAVE_CUPS_CUPS_H
...
...
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