mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 06:32:10 +01:00
glocalfileinfo: don't special-case directory icons
As of e6af432, g_content_type_get_symbolic_icon() returns non-symbolic fallbacks. Thus, we can't append another symbolic icon to the fallbacks. The special case was a bit of a hack anyway. It was only applied to themed icons and there was no generic fallback for mime types that are not folders. https://bugzilla.gnome.org/show_bug.cgi?id=726046
This commit is contained in:
parent
25f36d8e5e
commit
8c78fb827b
@ -1639,7 +1639,6 @@ get_icon_name (const char *path,
|
||||
static GIcon *
|
||||
get_icon (const char *path,
|
||||
const char *content_type,
|
||||
gboolean is_folder,
|
||||
gboolean use_symbolic)
|
||||
{
|
||||
GIcon *icon = NULL;
|
||||
@ -1660,11 +1659,6 @@ get_icon (const char *path,
|
||||
icon = g_content_type_get_symbolic_icon (content_type);
|
||||
else
|
||||
icon = g_content_type_get_icon (content_type);
|
||||
|
||||
if (G_IS_THEMED_ICON (icon) && is_folder)
|
||||
{
|
||||
g_themed_icon_append_name (G_THEMED_ICON (icon), use_symbolic ? "folder-symbolic" : "folder");
|
||||
}
|
||||
}
|
||||
|
||||
return icon;
|
||||
@ -1852,7 +1846,7 @@ _g_local_file_info_get (const char *basename,
|
||||
GIcon *icon;
|
||||
|
||||
/* non symbolic icon */
|
||||
icon = get_icon (path, content_type, S_ISDIR (statbuf.st_mode), FALSE);
|
||||
icon = get_icon (path, content_type, FALSE);
|
||||
if (icon != NULL)
|
||||
{
|
||||
g_file_info_set_icon (info, icon);
|
||||
@ -1860,7 +1854,7 @@ _g_local_file_info_get (const char *basename,
|
||||
}
|
||||
|
||||
/* symbolic icon */
|
||||
icon = get_icon (path, content_type, S_ISDIR (statbuf.st_mode), TRUE);
|
||||
icon = get_icon (path, content_type, TRUE);
|
||||
if (icon != NULL)
|
||||
{
|
||||
g_file_info_set_symbolic_icon (info, icon);
|
||||
|
Loading…
x
Reference in New Issue
Block a user