After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 538127 - FIleChooser broken on win32
FIleChooser broken on win32
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.13.x
Other Windows
: Normal blocker
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on: 538362 538365
Blocks:
 
 
Reported: 2008-06-13 10:07 UTC by Hans Breuer
Modified: 2008-07-03 18:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
iniital patch for gio to make the file chooser show files again (26.99 KB, patch)
2008-06-14 19:37 UTC, Hans Breuer
none Details | Review
updated patch to have 'mounts' working on win32 (27.57 KB, patch)
2008-06-16 20:54 UTC, Hans Breuer
committed Details | Review

Description Hans Breuer 2008-06-13 10:07:21 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()
Comment 1 Tor Lillqvist 2008-06-13 10:11:51 UTC
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?
Comment 2 Hans Breuer 2008-06-13 10:15:23 UTC
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()
Comment 3 Hans Breuer 2008-06-13 10:26:43 UTC
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
Comment 4 Hans Breuer 2008-06-14 19:37:32 UTC
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?
Comment 5 Matthias Clasen 2008-06-14 21:59:20 UTC
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.
Comment 6 Hans Breuer 2008-06-16 20:54:05 UTC
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.
Comment 7 Matthias Clasen 2008-07-03 18:19:29 UTC
This was actually applied a while ago