aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:21:36 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:21:36 +0800
commit860d471b1228c4ceed0c8e36bbd585947367dd31 (patch)
treed1e135456429cd68fc795491cbd0621bfb9656da
parent3e78934262a67d5296a1244500319094100f2ad1 (diff)
downloadgsoc2013-empathy-860d471b1228c4ceed0c8e36bbd585947367dd31.tar
gsoc2013-empathy-860d471b1228c4ceed0c8e36bbd585947367dd31.tar.gz
gsoc2013-empathy-860d471b1228c4ceed0c8e36bbd585947367dd31.tar.bz2
gsoc2013-empathy-860d471b1228c4ceed0c8e36bbd585947367dd31.tar.lz
gsoc2013-empathy-860d471b1228c4ceed0c8e36bbd585947367dd31.tar.xz
gsoc2013-empathy-860d471b1228c4ceed0c8e36bbd585947367dd31.tar.zst
gsoc2013-empathy-860d471b1228c4ceed0c8e36bbd585947367dd31.zip
empathy-ft-manager: use the ContentType property instead of gnome_vfs_get_mime_type_for_name to get the mime type
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1859 4ee84921-47dd-4033-b63a-18d7a039a3e4
-rw-r--r--libempathy-gtk/empathy-ft-manager.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-ft-manager.c b/libempathy-gtk/empathy-ft-manager.c
index 329d6e004..76b5433b3 100644
--- a/libempathy-gtk/empathy-ft-manager.c
+++ b/libempathy-gtk/empathy-ft-manager.c
@@ -603,10 +603,10 @@ ft_manager_add_tp_file_to_list (EmpathyFTManager *ft_manager,
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 @@ ft_manager_add_tp_file_to_list (EmpathyFTManager *ft_manager,
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 @@ ft_manager_add_tp_file_to_list (EmpathyFTManager *ft_manager,
}
gtk_window_present (GTK_WINDOW (ft_manager->priv->window));
+ g_free (content_type);
}
static void