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 749489 - [PATCH] Missing folder icons in file chooser on Win32
[PATCH] Missing folder icons in file chooser on Win32
Status: RESOLVED DUPLICATE of bug 748727
Product: glib
Classification: Platform
Component: gio
2.44.x
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-05-17 06:25 UTC by John Lindgren
Modified: 2015-07-08 03:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix display of folder icons on Win32 (4.39 KB, patch)
2015-05-17 06:25 UTC, John Lindgren
none Details | Review

Description John Lindgren 2015-05-17 06:25:13 UTC
Created attachment 303470 [details] [review]
Fix display of folder icons on Win32

Prior to commit aa4e2d4dc313, the content type for a directory was hard-coded to "inode/directory".  This assumption is no longer valid; in fact, directories no longer have any content type on Windows (g_file_info_get_content_type() returns null).  This change broke the icon logic for directories in glocalfileinfo.c, causing folders to show up in the GTK+ file chooser with either a "generic file" icon or none at all.

The attached patch fixes the issue by not assuming that the content type of directories will be any specific string.  Instead, it activates the icon logic for directories whenever indicated by S_ISDIR.
Comment 1 Matias De lellis 2015-06-29 01:50:19 UTC
Hi,
Tested on fedora 22 mingw packages and work.

Please, Apply this and backport to Glib 2.44.
Comment 2 Matthias Clasen 2015-07-08 02:49:46 UTC
There's newer commits that should already fix this. See

https://git.gnome.org/browse/glib/commit/?id=5f0665cbbc1d8b2fafeeb1fba7569612832b7541
Comment 3 John Lindgren 2015-07-08 03:07:01 UTC
Yes, 5f0665cbbc1d is a simpler way to fix this.  I thought about doing that myself but wasn't sure if it was okay to use the MIME-type as the GContentType, since that is not the convention on Windows.  Seems there was some discussion about this and the consensus was: yes, it's okay.  So I am happy to consider the issue resolved.

*** This bug has been marked as a duplicate of bug 748727 ***