diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-05-25 14:04:48 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-05-25 14:04:48 +0800 |
commit | 24368cf92dd5eaae1b41b3f191a25e2cbc45e824 (patch) | |
tree | f250be111bc4afa6440414ada53ff051bb30ff0d /composer/e-msg-composer.c | |
parent | 0fdf8a120ccb5638527293f6155d0e16af571732 (diff) | |
download | gsoc2013-evolution-24368cf92dd5eaae1b41b3f191a25e2cbc45e824.tar.gz gsoc2013-evolution-24368cf92dd5eaae1b41b3f191a25e2cbc45e824.tar.zst gsoc2013-evolution-24368cf92dd5eaae1b41b3f191a25e2cbc45e824.zip |
Added code to save/attach files/mails/events to/from remote shares
svn path=/trunk/; revision=32023
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index e4bc7dbbde..fe66322c43 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1782,8 +1782,19 @@ add_to_bar (EMsgComposer *composer, GSList *names, int is_inline) EMsgComposerPrivate *p = composer->priv; while (names) { - e_attachment_bar_attach((EAttachmentBar *)p->attachment_bar, names->data, is_inline ? "inline" : "attachment"); + CamelURL *url; + + url = camel_url_new (names->data, NULL); + if (url == NULL) + continue; + + if (!g_ascii_strcasecmp (url->protocol, "file")) { + e_attachment_bar_attach((EAttachmentBar *)p->attachment_bar, url->path, is_inline ? "inline" : "attachment"); + } else { + e_attachment_bar_attach_remote_file ((EAttachmentBar *)p->attachment_bar, names->data, is_inline ? "inline" : "attachment"); + } names = g_slist_next(names); + camel_url_free (url); } } @@ -2969,7 +2980,7 @@ drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, Gtk } else { e_attachment_bar_attach_remote_file (E_ATTACHMENT_BAR (p->attachment_bar), - str); + str, "attachment"); } g_free (str); camel_url_free (url); |