aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/comp-editor.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2005-05-24 16:45:16 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2005-05-24 16:45:16 +0800
commit0822a01317ed088a14aa9268f1d086ff73cb423c (patch)
treeb763ea63daee7b0ed68abfe6952c881b5c78b5c1 /calendar/gui/dialogs/comp-editor.c
parent52df90026f24374924516e7a02588b57a573f594 (diff)
downloadgsoc2013-evolution-0822a01317ed088a14aa9268f1d086ff73cb423c.tar
gsoc2013-evolution-0822a01317ed088a14aa9268f1d086ff73cb423c.tar.gz
gsoc2013-evolution-0822a01317ed088a14aa9268f1d086ff73cb423c.tar.bz2
gsoc2013-evolution-0822a01317ed088a14aa9268f1d086ff73cb423c.tar.lz
gsoc2013-evolution-0822a01317ed088a14aa9268f1d086ff73cb423c.tar.xz
gsoc2013-evolution-0822a01317ed088a14aa9268f1d086ff73cb423c.tar.zst
gsoc2013-evolution-0822a01317ed088a14aa9268f1d086ff73cb423c.zip
Added the support to DnD remote URL to the attachment window. It downloads
2005-05-24 Srinivasa Ragavan <sragavan@novell.com> * gui/dialogs/cal-attachment-bar.c, gui/dialogs/cal-attachment-bar.h, gui/dialogs/cal-attachment.c, gui/dialogs/cal-attachment.h, gui/dialogs/comp-editor.c, calendar.error.xml: Added the support to DnD remote URL to the attachment window. It downloads asynchronously and attaches. svn path=/trunk/; revision=29405
Diffstat (limited to 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r--calendar/gui/dialogs/comp-editor.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 49a5240b31..cba7968268 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -255,17 +255,23 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
g_free (str);
} else {
url = camel_url_new (str, NULL);
- g_free (str);
- if (url == NULL)
+ if (url == NULL) {
+ g_free (str);
continue;
+ }
if (!g_ascii_strcasecmp (url->protocol, "file"))
cal_attachment_bar_attach
(CAL_ATTACHMENT_BAR (editor->priv->attachment_bar),
url->path);
+ else
+ cal_attachment_bar_attach_remote_file
+ (CAL_ATTACHMENT_BAR (editor->priv->attachment_bar),
+ str);
camel_url_free (url);
+ g_free (str);
}
}
@@ -785,6 +791,24 @@ response_cb (GtkWidget *widget, int response, gpointer data)
switch (response) {
case GTK_RESPONSE_OK:
+ /* Check whether the downloads are completed */
+ if (cal_attachment_bar_get_download_count (CAL_ATTACHMENT_BAR (editor->priv->attachment_bar)) ){
+ ECalComponentVType vtype = e_cal_component_get_vtype(editor->priv->comp);
+ gboolean response;
+
+ if (vtype == E_CAL_COMPONENT_EVENT)
+ response = em_utils_prompt_user((GtkWindow *)widget,
+ NULL,
+ "calendar:ask-send-event-pending-download",
+ NULL);
+ else
+ response = em_utils_prompt_user((GtkWindow *)widget,
+ NULL,
+ "calendar:ask-send-task-pending-download",
+ NULL);
+ if (!response)
+ return;
+ }
commit_all_fields (editor);
if (e_cal_component_is_instance (priv->comp))