GNOME Bugzilla – Bug 520605
GIO filechooser backend looks broken
Last modified: 2008-03-07 17:37:06 UTC
In the GIO filechooser backend, there are a few visual problems: a) not using "special folder icons": desktop, home etc all use the normal folder icon, which looks strange c) not displaying correct mime icons: most "files" (audio, archives..) use the normal gtk-file icon b) mixed icon sizes: search, recent and mounts have the right icon size (16x16), most other icons seem to be 24x24, which looks bad
Created attachment 106644 [details] Comparison This is a comparison between the gtk/gnomevfs and gio filechooser backends. While the first two clearly also have their issues (not displaying bookmarks or displaying wrong names), the gio one has the worst look.
The same problem happens in Fedora development (rawhide 20080306). See Also : https://bugzilla.redhat.com/show_bug.cgi?id=435150
I'll work on that. Should be an easy one, gtk_file_system_gio_volume_get_icon_name() falls back to the defaults for the mounts instead of special casing the desktop, etc. as in gtk_file_system_gnome_vfs_volume_get_icon_name().
Created attachment 106722 [details] [review] libgnomeui-gvfs-icons.patch Patch to fix the wrong icons showing up. There's still the problem that it seems to select the wrong sized icons.
We could also fix the TODO in glib/gio/glocalfileinfo.c where it says "/* TODO: Special case desktop dir? That could be expensive with xdg dirs... */". Alex, what do you reckon? That would also allow us to remove some special casing I guess nautilus uses...
(In reply to comment #5) > That would also allow us to remove some special > casing I guess nautilus uses... > ...and use the desktop icon directly instead of using it as an emblem? That would be great. I once wrote a patch for this but sadly it was never reviewed and I'm sure it's badly bitrotted by now...
*** Bug 515748 has been marked as a duplicate of this bug. ***
That patch looks ok to me. Its a bit inefficient in that it keeps converting things to uris, but should work. Its true that g_get_user_special_dir is cached, and thus fast. However it doesn't handle the directories changing, which nautilus has to handle (you can change the setting by just renaming the right directory in nautilus). Also, i think a general problem with the icon in the gio backend is that it always picks the first icon name in the GThemedIcon. For many icons this one doesn't exist, and a later name is the one actually used. Maybe we should try looking up an icon in the icon theme and return the name of the one actually found.
Michael, could you please file a bug for the icon size problems? I think it might be a problem in GIcon, or in GTK+. 2008-03-07 Bastien Nocera <hadess@hadess.net> * file-chooser/gtkfilesystemgio.c (get_icon_for_special_directory), (translate_file_info), (query_info_callback), (gtk_file_system_gio_volume_get_icon_name), (gtk_file_folder_gio_get_info): Use proper icons for "/", the Desktop and the user's home directory (Closes: #520605)
Created attachment 106798 [details] Screenshot Thanks, I filed bug 521029 as a follow-up. Also, bug 521032 And this screenshot shows mime icons still being wrong in the file chooser... should I open another bug for this?
(In reply to comment #10) > Created an attachment (id=106798) [edit] > Screenshot > > Thanks, I filed bug 521029 as a follow-up. Also, bug 521032 > > And this screenshot shows mime icons still being wrong in the file chooser... > should I open another bug for this? Yes please.
Filed as bug 521035.