Extending File Dialog to include unix file paths [4/4]
Michael Jung
mjung at iss.tu-darmstadt.de
Fri May 13 03:19:19 CDT 2005
Hi all,
please find attached my current work on this topic. It takes another approach
as Michael Lin's patches and in particular doesn't add any API.
I've already send the smaller of the two patches to wine-patches, so it may
well be that this one is already applied when you try the patches.
The general idea is as follows: If wine is not configured to show the unix
namespace in file dialogs, it behaves just as it does now. Otherwise, The
MyComputer shell folder does not display the FS shell folders (A:, B:, ..),
but the UnixFS shell folder (/) instead. Path names are converted from DOS to
Unix and back in MyComputer (the unix root '/' has to be accessible by some
DOS drive). This means that paths, which go in and out of the file open and
save dialog APIs, are always DOS paths.
My patches are not ready yet for several reasons:
1.) I'm still patching SHGetPathFromIDList, which we probably shouldn't.
There's an article "How To Support Common Dialog Browsing in a Shell
Namespace Extension" on MSDN
(http://support.microsoft.com/default.aspx?scid=kb;en-us;216954), which
basically states that starting from Win2K the file dialogs do no longer use
the SHGetPathFromIDList API, but call ShellFolder::GetDisplayName instead. So
that's probably the way to go.
2.) It's still an open question how this should be configured in wine. In the
current version, I've added a global "ShowUnixFilesystem" key to the config
file (type is REG_SZ, define to "1" to display the unix namespace).
3.) I'm thinking about moving the unix<->dos conversion stuff into the
namespace extension (from MyComputer). So if the unix filesystem namespace
extension would be given a dos path to ParseDisplayName, we would convert to
unix and set a flag in the SHITEMIDs which tells us to convert back to dos in
GetDisplayName: Unix paths in, unix paths out. Dos paths in, dos paths out.
WineLib applications, which would like to call the posix file APIs can simply
call wine_get_unix_path_name on the path provided by the file dialogs.
I tested the current version with regedit, notepad and virtualdub. Seems to
work fine. But I don't feel it's clean enough yet to be included in cvs.
Let me know what you think about it.
Bye,
--
Michael Jung
mjung at iss.tu-darmstadt.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unixfs.diff
Type: text/x-diff
Size: 6130 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050513/6e53ca0b/unixfs.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlls_shell32_shfldr_unixfs_c.diff
Type: text/x-diff
Size: 1873 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050513/6e53ca0b/dlls_shell32_shfldr_unixfs_c.bin
More information about the wine-devel
mailing list