empathy r1859 - trunk/libempathy-gtk



Author: xclaesse
Date: Fri Nov 21 16:21:36 2008
New Revision: 1859
URL: http://svn.gnome.org/viewvc/empathy?rev=1859&view=rev

Log:
empathy-ft-manager: use the ContentType property instead of gnome_vfs_get_mime_type_for_name to get the mime type

Modified:
   trunk/libempathy-gtk/empathy-ft-manager.c

Modified: trunk/libempathy-gtk/empathy-ft-manager.c
==============================================================================
--- trunk/libempathy-gtk/empathy-ft-manager.c	(original)
+++ trunk/libempathy-gtk/empathy-ft-manager.c	Fri Nov 21 16:21:36 2008
@@ -603,10 +603,10 @@
   GtkIconTheme *theme;
   GtkIconInfo *icon_info;
   GdkPixbuf *pixbuf;
-  const gchar *mime;
   gchar *icon_name;
   gint width = 16;
   gint height = 16;
+  gchar *content_type;
 
   gtk_list_store_insert_with_values (GTK_LIST_STORE (ft_manager->priv->model),
       &iter, G_MAXINT, COL_FT_OBJECT, tp_file, -1);
@@ -632,12 +632,13 @@
   g_signal_connect (tp_file, "notify::transferred-bytes",
       G_CALLBACK (ft_manager_transferred_bytes_changed_cb), ft_manager);
 
-  mime = gnome_vfs_get_mime_type_for_name (empathy_tp_file_get_filename (tp_file));
+  g_object_get (tp_file, "content-type", &content_type, NULL);
+
   theme = gtk_icon_theme_get_default ();
   /* FIXME remove the dependency on libgnomeui replacing this function
    * with gio/gvfs or copying the code from gtk-recent */
   icon_name = gnome_icon_lookup (theme, NULL, NULL, NULL, NULL,
-      mime, GNOME_ICON_LOOKUP_FLAGS_NONE, NULL);
+      content_type, GNOME_ICON_LOOKUP_FLAGS_NONE, NULL);
 
   gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (
       ft_manager->priv->window),
@@ -661,6 +662,7 @@
     }
 
   gtk_window_present (GTK_WINDOW (ft_manager->priv->window));
+  g_free (content_type);
 }
 
 static void



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