aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-06-29 02:46:23 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-06-29 02:46:23 +0800
commit37b493b8f7e7af84ac915def8d6c82168b2717ba (patch)
tree5059870a0ef93f1f1a88dfa3829ea8a8e5e92182 /mail
parent418a137c3a737a1a6cc8ed3cf3ecbd2f2751466a (diff)
downloadgsoc2013-evolution-37b493b8f7e7af84ac915def8d6c82168b2717ba.tar.gz
gsoc2013-evolution-37b493b8f7e7af84ac915def8d6c82168b2717ba.tar.zst
gsoc2013-evolution-37b493b8f7e7af84ac915def8d6c82168b2717ba.zip
Since we have an exception variable, we might as well use it when getting
2001-06-28 Jeffrey Stedfast <fejj@ximian.com> * component-factory.c (destination_folder_handle_drop): Since we have an exception variable, we might as well use it when getting folders too. * folder-browser.c (message_list_drag_data_recieved): Call gtk_drag_finish. svn path=/trunk/; revision=10568
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/component-factory.c12
-rw-r--r--mail/folder-browser.c13
3 files changed, 27 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d106c69d5e..8707d82ff7 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2001-06-28 Jeffrey Stedfast <fejj@ximian.com>
+
+ * component-factory.c (destination_folder_handle_drop): Since we
+ have an exception variable, we might as well use it when getting
+ folders too.
+
+ * folder-browser.c (message_list_drag_data_recieved): Call
+ gtk_drag_finish.
+
2001-06-28 Dan Winship <danw@ximian.com>
* mail-tools.c (mail_tool_uri_to_folder): After finding a folder,
diff --git a/mail/component-factory.c b/mail/component-factory.c
index fc8ba49e46..f568734921 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -396,9 +396,11 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
g_free (url);
break;
case ACCEPTED_DND_TYPE_MESSAGE_RFC822:
- source = mail_tool_uri_to_folder (physical_uri, NULL);
- if (!source)
+ source = mail_tool_uri_to_folder (physical_uri, &ex);
+ if (!source) {
+ camel_exception_clear (&ex);
return FALSE;
+ }
/* write the message(s) out to a CamelStream so we can use it */
stream = camel_stream_mem_new ();
@@ -422,12 +424,14 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
inptr = strchr (name, ' ');
name = g_strndup (name, inptr - name);
- source = mail_tool_get_folder_from_urlname (url, name, 0, NULL);
+ source = mail_tool_get_folder_from_urlname (url, name, 0, &ex);
g_free (name);
g_free (url);
- if (!source)
+ if (!source) {
+ camel_exception_clear (&ex);
return FALSE;
+ }
/* split the uids */
inptr++;
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 4948b685b4..546b260664 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -433,7 +433,7 @@ message_list_drag_data_recieved (ETree *tree, int row, ETreePath path, int col,
fd = open (url, O_RDONLY);
if (fd == -1) {
g_free (url);
- return;
+ goto fail;
}
stream = camel_stream_fs_new_with_fd (fd);
@@ -457,11 +457,11 @@ message_list_drag_data_recieved (ETree *tree, int row, ETreePath path, int col,
case DND_TARGET_TYPE_X_EVOLUTION_MESSAGE:
folder = x_evolution_message_parse (selection_data->data, selection_data->length, &uids);
if (folder == NULL)
- return;
+ goto fail;
if (uids == NULL) {
camel_object_unref (CAMEL_OBJECT (folder));
- return;
+ goto fail;
}
mail_do_transfer_messages (folder, uids, context->action == GDK_ACTION_MOVE, fb->uri);
@@ -471,6 +471,13 @@ message_list_drag_data_recieved (ETree *tree, int row, ETreePath path, int col,
}
camel_exception_clear (&ex);
+
+ gtk_drag_finish (context, TRUE, TRUE, GDK_CURRENT_TIME);
+
+ fail:
+ camel_exception_clear (&ex);
+
+ gtk_drag_finish (context, FALSE, TRUE, GDK_CURRENT_TIME);
}
static void