summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2008-03-05 15:46:17 +0000
committerBenjamin Otte <otte@src.gnome.org>2008-03-05 15:46:17 +0000
commite0b5a4444ba8435aed29cdd9b442a2ddf0725ac4 (patch)
treead33afdb773a258f76f9711b40eb07344ea67cc7 /daemon
parentcb057129d94504b24384a0265b2d5fbceb66d89b (diff)
downloadgvfs-e0b5a4444ba8435aed29cdd9b442a2ddf0725ac4.tar.gz
add text-x-generic mime type as a last fallback option. Fixes #520189
2008-03-05 Benjamin Otte <otte@gnome.org> * daemon/gvfsdaemonutils.c: (gvfs_file_info_populate_content_types): add text-x-generic mime type as a last fallback option. Fixes #520189 svn path=/trunk/; revision=1557
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gvfsdaemonutils.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/daemon/gvfsdaemonutils.c b/daemon/gvfsdaemonutils.c
index 32c70f2b..93f78262 100644
--- a/daemon/gvfsdaemonutils.c
+++ b/daemon/gvfsdaemonutils.c
@@ -271,14 +271,14 @@ gvfs_file_info_populate_content_types (GFileInfo *info,
g_file_info_set_content_type (info, mimetype);
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, mimetype);
- icon = NULL;
if (type == G_FILE_TYPE_DIRECTORY)
icon = g_themed_icon_new ("folder");
- else if (mimetype)
- icon = g_content_type_get_icon (mimetype);
-
- if (icon == NULL)
- icon = g_themed_icon_new ("text-x-generic");
+ else
+ {
+ icon = g_content_type_get_icon (mimetype);
+ if (G_IS_THEMED_ICON (icon))
+ g_themed_icon_append_name (G_THEMED_ICON (icon), "text-x-generic");
+ }
g_file_info_set_icon (info, icon);
g_object_unref (icon);