gvfs r1557 - in trunk: . daemon



Author: otte
Date: Wed Mar  5 15:46:17 2008
New Revision: 1557
URL: http://svn.gnome.org/viewvc/gvfs?rev=1557&view=rev

Log:
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



Modified:
   trunk/ChangeLog
   trunk/daemon/gvfsdaemonutils.c

Modified: trunk/daemon/gvfsdaemonutils.c
==============================================================================
--- trunk/daemon/gvfsdaemonutils.c	(original)
+++ trunk/daemon/gvfsdaemonutils.c	Wed Mar  5 15:46:17 2008
@@ -271,14 +271,14 @@
   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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]