aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-attachment.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-01-28 02:05:56 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-01-28 02:05:56 +0800
commit143ba4162a04d8a623245c8965b7cce54326cd0b (patch)
treec5e5b66fc563c87b28c38a816747292f9a91b31b /composer/e-msg-composer-attachment.c
parent4508efb9d1e15ac44f3b64e68653c68dc50042e9 (diff)
downloadgsoc2013-evolution-143ba4162a04d8a623245c8965b7cce54326cd0b.tar.gz
gsoc2013-evolution-143ba4162a04d8a623245c8965b7cce54326cd0b.tar.zst
gsoc2013-evolution-143ba4162a04d8a623245c8965b7cce54326cd0b.zip
Fixed a #warning by converting the filename into a uri before passing it
2003-01-27 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer-attachment.c (update_mime_type): Fixed a #warning by converting the filename into a uri before passing it into gnome_vfs_get_mime_type() since that function really needs a uri. 2003-01-22 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer-hdrs.c (init): Get the list of accounts here and ref the account-list. (destroy): Unref the accounts list here. (create_from_optionmenu): Connect to the added/changed/removed account-list signals here. (account_added_cb): New callback function that adds the newly added account to the from-dropdown menu. (account_changed_cb): New callback that changes the label for the account that got changed in the dropdown menu. (account_removed_cb): Removes the account from the from dropdown menu. svn path=/trunk/; revision=19654
Diffstat (limited to 'composer/e-msg-composer-attachment.c')
-rw-r--r--composer/e-msg-composer-attachment.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c
index 4e97e71a6e..64daad1164 100644
--- a/composer/e-msg-composer-attachment.c
+++ b/composer/e-msg-composer-attachment.c
@@ -34,6 +34,7 @@
#include <camel/camel.h>
#include <gtk/gtknotebook.h>
#include <gtk/gtktogglebutton.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-mime-utils.h>
#include "e-msg-composer.h"
@@ -301,15 +302,17 @@ destroy_dialog_data (DialogData *data)
static void
update_mime_type (DialogData *data)
{
- const char *file_name;
- char *mime_type;
+ const char *filename;
+ char *mime_type, *uri;
if (!data->attachment->guessed_type)
return;
- file_name = gtk_entry_get_text (data->file_name_entry);
-#warning "do we need to create file uri for gnome-vfs-get-mime-type"
- mime_type = gnome_vfs_get_mime_type (file_name);
+ filename = gtk_entry_get_text (data->file_name_entry);
+
+ uri = gnome_vfs_get_uri_from_local_path (filename);
+ mime_type = gnome_vfs_get_mime_type (uri);
+ g_free (uri);
if (mime_type) {
gtk_entry_set_text (data->mime_type_entry, mime_type);