mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
W32: Special treatment for inode/directory mime/type
This is a hack for GLocalFileInfo to correctly get icons for directories. Without this change content type for any W32 directory is NULL (because there's no registry entry for "inode/directory" by default, and in any way there's no file extension that means "directory" to put there), and GLocalFileInfo uses content type to grab icons. https://bugzilla.gnome.org/show_bug.cgi?id=748727
This commit is contained in:
parent
9931336d2d
commit
5f0665cbbc
@ -299,6 +299,10 @@ g_content_type_from_mime_type (const gchar *mime_type)
|
||||
|
||||
g_return_val_if_fail (mime_type != NULL, NULL);
|
||||
|
||||
/* This is a hack to allow directories to have icons in filechooser */
|
||||
if (strcmp ("inode/directory", mime_type) == 0)
|
||||
return g_strdup (mime_type);
|
||||
|
||||
key = g_strconcat ("MIME\\DataBase\\Content Type\\", mime_type, NULL);
|
||||
content_type = get_registry_classes_key (key, L"Extension");
|
||||
g_free (key);
|
||||
|
Loading…
Reference in New Issue
Block a user