aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-05-25 14:06:16 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-05-25 14:06:16 +0800
commitc345604989402eab7e4c72bcf9e249792c0810bb (patch)
treed79cf7d9eda9d81d5a28ebab62470f1d1ca1058a
parent24368cf92dd5eaae1b41b3f191a25e2cbc45e824 (diff)
downloadgsoc2013-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
-rw-r--r--plugins/save-calendar/ChangeLog6
-rw-r--r--plugins/save-calendar/save-calendar.c1
-rw-r--r--widgets/misc/ChangeLog11
-rw-r--r--widgets/misc/e-attachment-bar.c8
-rw-r--r--widgets/misc/e-attachment-bar.h2
-rw-r--r--widgets/misc/e-attachment.c9
6 files changed, 30 insertions, 7 deletions
diff --git a/plugins/save-calendar/ChangeLog b/plugins/save-calendar/ChangeLog
index 8f47a22bbc..3e551f391c 100644
--- a/plugins/save-calendar/ChangeLog
+++ b/plugins/save-calendar/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-25 Srinivasa Ragavan <sragavan@novell.com>
+
+
+ * save-calendar.c: (ask_destination_and_save): Added code to save
+ calendar to remote shares.
+
2006-04-22 Srinivasa Ragavan <sragavan@novell.com>
* ical-format.c (do_save_calendar_ical): Ask for overwrite, if the
diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c
index 947f4652d3..7a7e4289b7 100644
--- a/plugins/save-calendar/save-calendar.c
+++ b/plugins/save-calendar/save-calendar.c
@@ -175,6 +175,7 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), extra_widget);
+ gtk_file_chooser_set_local_only (dialog, FALSE);
#else
dialog = gtk_file_selection_new (_("Select destination file"));
gtk_box_pack_start (GTK_BOX (GTK_FILE_SELECTION (dialog)->main_vbox), extra_widget, FALSE, TRUE, 0);
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;
}