From 641d49b55bf78c9c7d6c32d08e9cc7b0e0f5a399 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 26 Jul 2002 19:10:19 +0000 Subject: Add a new menu item for posting to the New toolbar button thing. 2002-07-26 Jeffrey Stedfast * component-factory.c (create_component): Add a new menu item for posting to the New toolbar button thing. (destination_folder_handle_drop): Don't use a NULL exception when we already have one to use anyway. (got_folder): Move the *fp = folder; to before the check to make sure folder != NULL, this makes it so that if getting a folder fails at least have have a known value to look out for (NULL) rather than some random garbage. svn path=/trunk/; revision=17617 --- mail/ChangeLog | 6 ++++++ mail/component-factory.c | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 9b29e77c8c..e0f8117b68 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -2,6 +2,12 @@ * component-factory.c (create_component): Add a new menu item for posting to the New toolbar button thing. + (destination_folder_handle_drop): Don't use a NULL exception when + we already have one to use anyway. + (got_folder): Move the *fp = folder; to before the check to make + sure folder != NULL, this makes it so that if getting a folder + fails at least have have a known value to look out for (NULL) + rather than some random garbage. 2002-07-25 Jeffrey Stedfast diff --git a/mail/component-factory.c b/mail/component-factory.c index e2778ffc8d..1f95caa077 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -547,9 +547,11 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *des switch (type) { case ACCEPTED_DND_TYPE_TEXT_URI_LIST: - folder = mail_tool_uri_to_folder (physical_uri, 0, NULL); - if (!folder) + folder = mail_tool_uri_to_folder (physical_uri, 0, &ex); + if (!folder) { + camel_exception_clear (&ex); return FALSE; + } tmp = g_strndup (data->bytes._buffer, data->bytes._length); urls = g_strsplit (tmp, "\n", 0); @@ -665,9 +667,9 @@ got_folder (char *uri, CamelFolder *folder, void *data) { CamelFolder **fp = data; + *fp = folder; + if (folder) { - *fp = folder; - camel_object_ref (CAMEL_OBJECT (folder)); /* emit a changed event, this is a little hack so that the folderinfo cache -- cgit