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 520605 - GIO filechooser backend looks broken
GIO filechooser backend looks broken
Status: RESOLVED FIXED
Product: libgnomeui
Classification: Deprecated
Component: gio-file-chooser
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Carlos Garnacho
Federico Mena Quintero
: 515748 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-05 22:04 UTC by Michael Monreal
Modified: 2008-03-07 17:37 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Comparison (86.88 KB, image/png)
2008-03-05 22:06 UTC, Michael Monreal
  Details
libgnomeui-gvfs-icons.patch (3.16 KB, patch)
2008-03-06 22:53 UTC, Bastien Nocera
committed Details | Review
Screenshot (7.81 KB, image/png)
2008-03-07 17:26 UTC, Michael Monreal
  Details

Description Michael Monreal 2008-03-05 22:04:09 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
Comment 1 Michael Monreal 2008-03-05 22:06:56 UTC
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.
Comment 2 sangu 2008-03-06 16:08:27 UTC
The same problem happens in Fedora development (rawhide 20080306).
 See Also : https://bugzilla.redhat.com/show_bug.cgi?id=435150 
Comment 3 Bastien Nocera 2008-03-06 20:26:13 UTC
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().
Comment 4 Bastien Nocera 2008-03-06 22:53:47 UTC
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.
Comment 5 Bastien Nocera 2008-03-06 23:43:37 UTC
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...
Comment 6 Michael Monreal 2008-03-06 23:49:52 UTC
(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...
Comment 7 Bastien Nocera 2008-03-07 01:43:57 UTC
*** Bug 515748 has been marked as a duplicate of this bug. ***
Comment 8 Alexander Larsson 2008-03-07 13:45:41 UTC
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.
Comment 9 Bastien Nocera 2008-03-07 16:57:07 UTC
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)
Comment 10 Michael Monreal 2008-03-07 17:26:16 UTC
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?
Comment 11 Bastien Nocera 2008-03-07 17:28:46 UTC
(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.
Comment 12 Michael Monreal 2008-03-07 17:37:06 UTC
Filed as bug 521035.