aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-11-22 00:15:43 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:15:43 +0800
commit7611cc90a1147911f61e88827057232308fd2b86 (patch)
tree5f7619866da486e2ee39e74f6c2f493517eb8c29
parenta75883cc0f8cc67287bd50cbde713f9e23872232 (diff)
downloadgsoc2013-empathy-7611cc90a1147911f61e88827057232308fd2b86.tar
gsoc2013-empathy-7611cc90a1147911f61e88827057232308fd2b86.tar.gz
gsoc2013-empathy-7611cc90a1147911f61e88827057232308fd2b86.tar.bz2
gsoc2013-empathy-7611cc90a1147911f61e88827057232308fd2b86.tar.lz
gsoc2013-empathy-7611cc90a1147911f61e88827057232308fd2b86.tar.xz
gsoc2013-empathy-7611cc90a1147911f61e88827057232308fd2b86.tar.zst
gsoc2013-empathy-7611cc90a1147911f61e88827057232308fd2b86.zip
Set the ContentType property properly on a new file channel. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=1767
-rw-r--r--configure.ac1
-rw-r--r--libempathy/empathy-utils.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index aa5234dab..f29596117 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,6 +86,7 @@ PKG_CHECK_MODULES(LIBEMPATHY,
libmissioncontrol >= $MISSION_CONTROL_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
gio-unix-2.0 >= $GLIB_REQUIRED
+ gnome-vfs-2.0
])
PKG_CHECK_MODULES(EMPATHY,
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 3123a9156..c4f0d716e 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -32,6 +32,7 @@
#include <glib/gi18n.h>
+#include <libgnomevfs/gnome-vfs.h>
#include <libxml/uri.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/channel.h>
@@ -843,7 +844,7 @@ empathy_send_file_from_stream (EmpathyContact *contact,
&value, NULL, NULL);
g_value_reset (&value);
- g_value_set_string (&value, "application/octet-stream");
+ g_value_set_string (&value, gnome_vfs_get_mime_type_for_name (filename));
tp_cli_dbus_properties_run_set (TP_PROXY (channel),
-1, EMP_IFACE_CHANNEL_TYPE_FILE, "ContentType",
&value, NULL, NULL);