aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
author7 <NotZed@Ximian.com>2001-09-19 05:44:47 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-09-19 05:44:47 +0800
commitb490c7e42a2ca3f75426ec5c4052a658b722d06c (patch)
treeb958f793911cdf274df3aa768bfa28d1d2ce495a /mail
parent8347ce1403c68a408a3b9952f6486b5ac584104b (diff)
downloadgsoc2013-evolution-b490c7e42a2ca3f75426ec5c4052a658b722d06c.tar.gz
gsoc2013-evolution-b490c7e42a2ca3f75426ec5c4052a658b722d06c.tar.zst
gsoc2013-evolution-b490c7e42a2ca3f75426ec5c4052a658b722d06c.zip
Function to get the real receive tpe for ag iven url. IMAP/SPOOL/MAILDIR
2001-09-17 <NotZed@Ximian.com> * mail-send-recv.c (get_receive_type): Function to get the real receive tpe for ag iven url. IMAP/SPOOL/MAILDIR types just update their info, dont download. (build_dialogue): (mail_receive_uri): Use function above to get the right receive type. svn path=/trunk/; revision=12957
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-send-recv.c21
2 files changed, 21 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8a5fbc54eb..e5fae8ac50 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2001-09-17 <NotZed@Ximian.com>
+
+ * mail-send-recv.c (get_receive_type): Function to get the real
+ receive tpe for ag iven url. IMAP/SPOOL/MAILDIR types just update
+ their info, dont download.
+ (build_dialogue):
+ (mail_receive_uri): Use function above to get the right receive
+ type.
+
2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
* mail-tools.c (mail_tool_remove_xevolution_headers): Oops, forgot
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 1baa28a866..0b5b187c05 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -250,6 +250,16 @@ format_url(const char *internal_url)
return pretty_url;
}
+static send_info_t get_receive_type(const char *url)
+{
+ if (!strncmp(url, "imap:", 5)
+ || !strncmp(url, "spool:", 6)
+ || !strncmp(url, "maildir:", 8))
+ return SEND_UPDATE;
+ else
+ return SEND_RECEIVE;
+}
+
static struct _send_data *
build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination)
{
@@ -291,10 +301,7 @@ build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination)
if (info == NULL) {
info = g_malloc0 (sizeof (*info));
/* imap and spool are handled differently */
- if (!strncmp (source->url, "imap:", 5) || !strncmp (source->url, "spool:", 6))
- info->type = SEND_UPDATE;
- else
- info->type = SEND_RECEIVE;
+ info->type = get_receive_type(source->url);
d(printf("adding source %s\n", source->url));
info->uri = g_strdup (source->url);
@@ -791,11 +798,7 @@ mail_receive_uri (const char *uri, int keep)
info = g_malloc0 (sizeof (*info));
/* imap is handled differently */
- if (!strncmp (uri, "imap:", 5))
- info->type = SEND_UPDATE;
- else
- info->type = SEND_RECEIVE;
-
+ info->type = get_receive_type(uri);
info->bar = NULL;
info->status = NULL;
info->uri = g_strdup (uri);