GNOME Bugzilla – Bug 538127
FIleChooser broken on win32
Last modified: 2008-07-03 18:19:29 UTC
On win32 the direct use of unfinished gio (see bug #520874) made the file chooser unuseable on win32. - No files are shown anymore, apparently due to a lack of the mount emultation. there is g_warning ("G_OS_WIN32: no mount emulation"); printed - Almost no icons are shown anymore - I think gtkfilesystemwin32.c:get_icon_type_from_path() needs to be ported to gio - No drive letters are shown anymore - maybe they need to be returned by g_volume_monitor_get_mounts(). The code formerly handling it was gtkfilesystemwin32.c:get_viewable_logical_drives()
Hmm, when I tried some days ago I did see files, but otherwise observed the same as you: no icons, no drive letters. Maybe it has deteriorated even more in the last days... Sigh. I assume the root cause for these problems are in gio's lacking win32 support, though, not the gtkfilechooser code?
same for me, with a small hack - before the abvoe mentioned g_warning a local_monitor->was_mounted = TRUE; files are shown again, it probably should use something like get_viewable_logical_drives()
or maybe g_unix_mount_*() should be implmented for win32, a quick look at bh implementation makes them not too different from what dirve letters are use for on windows. Currently the difference to drives and volumes is a bit blurred for me but I'm looking more closely
Created attachment 112745 [details] [review] iniital patch for gio to make the file chooser show files again 2008-05-19 Hans Breuer <hans@breuer.org> * gwin32mount.[ch] gwin32volumemonitor.[ch] : bits and pieces from gtk-2-12 and gunix*.[hc] to make the file chooser show files again on win32, see bug #538127 * giomodule.c : ensure GWin32VolumeMonitor is registered * glocaldireoctorymonitor.c : initial state on win32 is_mounted=TRUE * Makefile.am makefile.msc : updated ok to commit?
Thanks for working on this, Hans. I'm not enough of a win32 programmer to review this. So if you want review, you'll have to wait for Tor.
Created attachment 112869 [details] [review] updated patch to have 'mounts' working on win32 now the 'mounts' icons are calculated by SHGetFileInfoW(), gtk icons from drive type only used as fallback. The same ChangeLog as above applies.
This was actually applied a while ago