aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-10-25 07:52:05 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-10-25 07:52:05 +0800
commit85b2913a380c69f14ae0254ad23b10fabfb33667 (patch)
treec1cf143e37294dd9dd3667ebbe0a1d0c00b04b56 /mail/mail-send-recv.c
parente7a31c5035a0afeed6c1675e30487c1e2bdc139f (diff)
downloadgsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.gz
gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.zst
gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.zip
Merge revisions 36534:36684 from trunk.
svn path=/branches/kill-bonobo/; revision=36685
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 9894ec2fa5..87948fdf53 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -106,7 +106,7 @@ struct _send_info {
send_info_t type; /* 0 = fetch, 1 = send */
CamelOperation *cancel;
char *uri;
- int keep;
+ gboolean keep_on_server;
send_state_t state;
GtkWidget *progress_bar;
GtkWidget *cancel_button;
@@ -472,7 +472,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
d(printf("adding source %s\n", source->url));
info->uri = g_strdup (source->url);
- info->keep = source->keep_on_server;
+ info->keep_on_server = source->keep_on_server;
info->cancel = camel_operation_new (operation_status, info);
info->state = SEND_ACTIVE;
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
@@ -554,7 +554,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
d(printf("adding dest %s\n", destination));
info->uri = g_strdup (destination);
- info->keep = FALSE;
+ info->keep_on_server = FALSE;
info->cancel = camel_operation_new (operation_status, info);
info->state = SEND_ACTIVE;
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
@@ -938,7 +938,7 @@ mail_send_receive (void)
switch(info->type) {
case SEND_RECEIVE:
- mail_fetch_mail(info->uri, info->keep,
+ mail_fetch_mail(info->uri, info->keep_on_server,
FILTER_SOURCE_INCOMING,
info->cancel,
receive_get_folder, info,
@@ -979,11 +979,15 @@ auto_timeout(void *data)
{
struct _auto_data *info = data;
- if (camel_session_is_online(session)) {
- const char *uri = e_account_get_string(info->account, E_ACCOUNT_SOURCE_URL);
- int keep = e_account_get_bool(info->account, E_ACCOUNT_SOURCE_KEEP_ON_SERVER);
+ if (camel_session_is_online (session)) {
+ const gchar *uri;
+ gboolean keep_on_server;
- mail_receive_uri(uri, keep);
+ uri = e_account_get_string (
+ info->account, E_ACCOUNT_SOURCE_URL);
+ keep_on_server = e_account_get_bool (
+ info->account, E_ACCOUNT_SOURCE_KEEP_ON_SERVER);
+ mail_receive_uri (uri, keep_on_server);
}
return TRUE;
@@ -1098,7 +1102,7 @@ mail_autoreceive_init (CamelSession *session)
/* we setup the download info's in a hashtable, if we later need to build the gui, we insert
them in to add them. */
void
-mail_receive_uri (const char *uri, int keep)
+mail_receive_uri (const gchar *uri, gboolean keep_on_server)
{
struct _send_info *info;
struct _send_data *data;
@@ -1125,7 +1129,7 @@ mail_receive_uri (const char *uri, int keep)
info->progress_bar = NULL;
info->status_label = NULL;
info->uri = g_strdup (uri);
- info->keep = keep;
+ info->keep_on_server = keep_on_server;
info->cancel = camel_operation_new (operation_status, info);
info->cancel_button = NULL;
info->data = data;
@@ -1138,7 +1142,7 @@ mail_receive_uri (const char *uri, int keep)
switch (info->type) {
case SEND_RECEIVE:
- mail_fetch_mail (info->uri, info->keep,
+ mail_fetch_mail (info->uri, info->keep_on_server,
FILTER_SOURCE_INCOMING,
info->cancel,
receive_get_folder, info,
@@ -1198,7 +1202,7 @@ mail_send (void)
info->progress_bar = NULL;
info->status_label = NULL;
info->uri = g_strdup (transport->url);
- info->keep = FALSE;
+ info->keep_on_server = FALSE;
info->cancel = NULL;
info->cancel_button = NULL;
info->data = data;