diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-05-25 14:06:16 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-05-25 14:06:16 +0800 |
commit | c345604989402eab7e4c72bcf9e249792c0810bb (patch) | |
tree | d79cf7d9eda9d81d5a28ebab62470f1d1ca1058a /widgets | |
parent | 24368cf92dd5eaae1b41b3f191a25e2cbc45e824 (diff) | |
download | gsoc2013-evolution-c345604989402eab7e4c72bcf9e249792c0810bb.tar gsoc2013-evolution-c345604989402eab7e4c72bcf9e249792c0810bb.tar.gz gsoc2013-evolution-c345604989402eab7e4c72bcf9e249792c0810bb.tar.bz2 gsoc2013-evolution-c345604989402eab7e4c72bcf9e249792c0810bb.tar.lz gsoc2013-evolution-c345604989402eab7e4c72bcf9e249792c0810bb.tar.xz gsoc2013-evolution-c345604989402eab7e4c72bcf9e249792c0810bb.tar.zst gsoc2013-evolution-c345604989402eab7e4c72bcf9e249792c0810bb.zip |
Added support for saving/attaching files/events/mails from/to remote shares
svn path=/trunk/; revision=32024
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/ChangeLog | 11 | ||||
-rw-r--r-- | widgets/misc/e-attachment-bar.c | 8 | ||||
-rw-r--r-- | widgets/misc/e-attachment-bar.h | 2 | ||||
-rw-r--r-- | widgets/misc/e-attachment.c | 9 |
4 files changed, 23 insertions, 7 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index b25c679250..3dc405f367 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,14 @@ +2006-05-25 Srinivasa Ragavan <sragavan@novell.com> + + Added code to specify the attachment type for remote files. + Also added code to save files to CamelStreamVfs + + * e-attachment-bar.c: (update), (eab_icon_clicked_cb), + (e_attachment_bar_attach_remote_file): + * e-attachment-bar.h: + * e-attachment.c: (e_attachment_new_remote_file), + (e_attachment_build_remote_file): + 2006-05-04 Rajeev Ramanathan <rajeevramanathan_2004@yahoo.co.in> Added patch to enable build without cairo using ENABLE_CAIRO macro. diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c index c6bf9972f3..b8dda048d5 100644 --- a/widgets/misc/e-attachment-bar.c +++ b/widgets/misc/e-attachment-bar.c @@ -926,8 +926,8 @@ eab_icon_clicked_cb (EAttachmentBar *bar, GdkEvent *event, gpointer *dummy) if (!attachment->store_uri) { CamelURL *curl; - path = temp_save_part (attachment->body); - curl = camel_url_new ("file:", NULL); + path = temp_save_part (attachment->body); + curl = camel_url_new ("file://", NULL); camel_url_set_path ( curl, path); attachment->store_uri = camel_url_to_string (curl, 0); camel_url_free (curl); @@ -1227,7 +1227,7 @@ e_attachment_bar_get_download_count (EAttachmentBar *bar) void e_attachment_bar_attach_remote_file (EAttachmentBar *bar, - const gchar *url) + const gchar *url, const char *disposition) { EAttachment *attachment; CamelException ex; @@ -1239,7 +1239,7 @@ e_attachment_bar_attach_remote_file (EAttachmentBar *bar, bar->priv->path = e_mkdtemp("attach-XXXXXX"); camel_exception_init (&ex); - attachment = e_attachment_new_remote_file (url, "attachment", bar->priv->path, &ex); + attachment = e_attachment_new_remote_file (url, disposition, bar->priv->path, &ex); g_signal_connect (attachment, "update", G_CALLBACK(update_remote_file), bar); if (attachment) { add_common (bar, attachment); diff --git a/widgets/misc/e-attachment-bar.h b/widgets/misc/e-attachment-bar.h index 97089c1032..21f568c186 100644 --- a/widgets/misc/e-attachment-bar.h +++ b/widgets/misc/e-attachment-bar.h @@ -73,7 +73,7 @@ guint e_attachment_bar_get_num_attachments (EAttachmentBar *bar); void e_attachment_bar_attach (EAttachmentBar *bar, const char *file_name, char *disposition); void e_attachment_bar_attach_mime_part (EAttachmentBar *bar, CamelMimePart *part); int e_attachment_bar_get_download_count (EAttachmentBar *bar); -void e_attachment_bar_attach_remote_file (EAttachmentBar *bar,const gchar *url); +void e_attachment_bar_attach_remote_file (EAttachmentBar *bar,const gchar *url, const char *disposition); GSList *e_attachment_bar_get_attachment (EAttachmentBar *bar, int id); void e_attachment_bar_add_attachment (EAttachmentBar *bar, EAttachment *attachment); void e_attachment_bar_edit_selected (EAttachmentBar *bar); diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index 9bec31ca2e..7dae3d8e21 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -395,10 +395,12 @@ e_attachment_new_remote_file (const char *url, EAttachment *new; DownloadInfo *download_info; gchar *base; - + CamelURL *curl; + g_return_val_if_fail (url != NULL, NULL); - base = g_path_get_basename (url); + curl = camel_url_new (url, NULL); + base = g_path_get_basename (curl->path); new = g_object_new (E_TYPE_ATTACHMENT, NULL); new->editor_gui = NULL; @@ -417,6 +419,7 @@ e_attachment_new_remote_file (const char *url, download_info->file_name = g_strdup (new->file_name); download_to_local_path (gnome_vfs_uri_new(url), gnome_vfs_uri_new(new->file_name), download_info); + camel_url_free (curl); return new; } @@ -440,6 +443,7 @@ e_attachment_build_remote_file (const char *file_name, camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot attach file %s: %s"), file_name, g_strerror (errno)); + g_message ("Cannot attach file %s: %s\n", file_name, g_strerror (errno)); return; } @@ -448,6 +452,7 @@ e_attachment_build_remote_file (const char *file_name, camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot attach file %s: not a regular file"), file_name); + g_message ("Cannot attach file %s: not a regular file", file_name); return; } |