Return GTK_STOCK_DIRECTORY for entries with MIME type

2007-05-09  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkrecentmanager.c:
	(gtk_recent_info_get_icon): Return GTK_STOCK_DIRECTORY for entries
	with MIME type "x-directory/normal", instead of GTK_STOCK_FILE.

svn path=/trunk/; revision=17804
This commit is contained in:
Emmanuele Bassi 2007-05-09 10:59:15 +00:00 committed by Emmanuele Bassi
parent 529bbe01a7
commit 130541af8d
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2007-05-09 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentmanager.c:
(gtk_recent_info_get_icon): Return GTK_STOCK_DIRECTORY for entries
with MIME type "x-directory/normal", instead of GTK_STOCK_FILE.
2007-05-05 Richard Hult <richard@imendio.com> 2007-05-05 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c: * gdk/quartz/gdkdrawable-quartz.c:

View File

@ -2049,9 +2049,14 @@ gtk_recent_info_get_icon (GtkRecentInfo *info,
if (info->mime_type) if (info->mime_type)
retval = get_icon_for_mime_type (info->mime_type, size); retval = get_icon_for_mime_type (info->mime_type, size);
/* this should never fail */ /* this function should never fail */
if (!retval) if (!retval)
retval = get_icon_fallback (GTK_STOCK_FILE, size); {
if (info->mime_type && strcmp (info->mime_type, "x-directory/normal") == 0)
retval = get_icon_fallback (GTK_STOCK_DIRECTORY, size);
else
retval = get_icon_fallback (GTK_STOCK_FILE, size);
}
return retval; return retval;
} }