Skip to content

Commit

Permalink
win32: Return proper icon names
Browse files Browse the repository at this point in the history
The code here was returning gtk-directory and similar names as
fallback, with a comment claiming that these are 'builtin gtk'.
But they aren't, anymore, so just return the standard names.
  • Loading branch information
Matthias Clasen committed Jun 5, 2015
1 parent c20f3b2 commit 9931336
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions gio/gcontenttype-win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,18 @@ g_content_type_get_icon (const gchar *type)
g_free (key);
}

/* icon-name similar to how it was with gtk-2-12 */
if (name)
if (!name)
{
themed_icon = g_themed_icon_new (name);
}
else
{
/* if not found an icon fall back to gtk-builtins */
name = strcmp (type, "inode/directory") == 0 ? "gtk-directory" :
g_content_type_can_be_executable (type) ? "gtk-execute" : "gtk-file";
/* if no icon found, fall back to standard generic names */
if (strcmp (type, "inode/directory") == 0)
name = "folder";
else if (g_content_type_can_be_executable (type))
name = "system-run";
else
name = "text-x-generic";
g_hash_table_insert (_type_icons, g_strdup (type), g_strdup (name));
themed_icon = g_themed_icon_new_with_default_fallbacks (name);
}
themed_icon = g_themed_icon_new (name);
G_UNLOCK (_type_icons);

return G_ICON (themed_icon);
Expand Down

0 comments on commit 9931336

Please sign in to comment.