Fun desktop integration tasks
mh at codeweavers.com
Sat Nov 27 15:14:33 CST 2004
I'm sitting waiting for a couple of compiles to finish, so I thought I'd
put together a list of fun/interesting tasks people might like to have a
go at related to better integrating Wine with the native desktop.
None of these should be especially hard, and so would provide a good intro
to Wine development for anybody who has been lurking on the sidelines and
wants to get involved.
As usual no guarantees these patches would be accepted, that's Alexandres
call. But they probably would be, and you'll learn something while doing
Map CSIDL_PERSONAL (My Documents) to the $HOME directory if mapped. See
the _SHGetDefaultValue function in dlls/shell32/shellpath.c for an
explanation of how to do this.
I think it'd be ok to grab $HOME using the UNIX getenv() and then using
the libwine APIs to map them to a Win32 path. If the mapping fails (ie
$HOME is not accessible given the users dosdevices) then just fail with a
This is similar to above but with some extra work. Map the contents of
the ~/Desktop directory to the Windows virtual Desktop folder. In file
pickers and Explorer, the filesystem root is represented by a magic
Desktop folder. In real Windows this reflects the icons that are on the
desktop and is mapped to a real directory at some arbitrary point in the
filing system. On Linux we have no such virtual root, however it'd be nice
if icons that appeared in the KDE/GNOME desktop were put in their proper
place. That way users won't be confused by the file being on their desktop
but unavailable from their Windows applications file picker.
This should not be too hard. The Desktop folder is implemented by a COM
object in dlls/shell32/shfldr_desktop.c. You just need to read the
$HOME/Desktop folder and put the items you find in there inside. Ignore
.desktop files for now, they are a bit tricker to map and aren't
especially useful for us anyway.
You also want to map CSIDL_DESKTOP in dlls/shell32/shellpath.c,
_SHGetDefaultValue. See above.
Bonus points for fixing the desktop icon while you're at it (an arrow??!)
The freedesktop.org icon theme specification shows us how to find icons
for many different types of thing. Implement support for loading and
using the following icons from the icon theme (it should be OK to use
native libraries for this like GdkPixbuf, just fall back to the compiled
in defaults if it's missing):
- unknown document
- any others??
Don't do file types, as native icon<->file type association is done by
mime types not extensions, and it'd make our file dialogs even slower than
they already are.
You may be tempted to use eg, libpng to implement this. Don't! Use
GdkPixbuf instead, stock icons are allowed to be in many formats including
Try updating the menu mapping code to support the new XDG menu
specification. Don't bother trying to make this work everywhere, it's a
total nightmare. Just try supporting the new standards. Be warned: not
every desktop/distro supports this yet!
This one might be quite hard.
Try improving the winebrowser script to take into account the users
preferred applications. At the moment it just tries every browser it
knows about in a hard coded order. Hint: in modern GNOME desktops you can
use the "gnome-open" program to make this automatic. There is a KDE
Integrate Wine with XScreensaver, so installing Win32 screensavers makes
them automatically appear in the list. You may need to write patches for
xscreensaver to make this really slick.
More information about the wine-devel