aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-06-27 02:21:45 +0800
committerPeter Williams <peterw@src.gnome.org>2000-06-27 02:21:45 +0800
commite923d2eea9e325677c57f88e1209765acb306846 (patch)
treed6d04bad75e1d5449799db9a27cf7279c5152ca9 /mail/mail-ops.c
parenta6123511735299f9811a40ed55344a9fcba90655 (diff)
downloadgsoc2013-evolution-e923d2eea9e325677c57f88e1209765acb306846.tar
gsoc2013-evolution-e923d2eea9e325677c57f88e1209765acb306846.tar.gz
gsoc2013-evolution-e923d2eea9e325677c57f88e1209765acb306846.tar.bz2
gsoc2013-evolution-e923d2eea9e325677c57f88e1209765acb306846.tar.lz
gsoc2013-evolution-e923d2eea9e325677c57f88e1209765acb306846.tar.xz
gsoc2013-evolution-e923d2eea9e325677c57f88e1209765acb306846.tar.zst
gsoc2013-evolution-e923d2eea9e325677c57f88e1209765acb306846.zip
Make the broken threads optional
svn path=/trunk/; revision=3740
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index feddab24e2..7ba935be8a 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -86,11 +86,15 @@ mail_exception_dialog (char *head, CamelException *ex, gpointer widget)
g_free (msg);
}
+#ifdef USE_BROKEN_THREADS
static void
async_mail_exception_dialog (char *head, CamelException *ex, gpointer unused )
{
mail_op_error( "%s: %s", head, camel_exception_get_description( ex ) );
}
+#else
+#define async_mail_exception_dialog mail_exception_dialog
+#endif
static gboolean
check_configured (void)
@@ -326,7 +330,11 @@ fetch_mail (GtkWidget *button, gpointer user_data)
info = g_new( rfm_t, 1 );
info->fb = FOLDER_BROWSER( user_data );
info->source_url = url;
+#ifdef USE_BROKEN_THREADS
mail_operation_try( _("Fetching mail"), real_fetch_mail, NULL, info );
+#else
+ real_fetch_mail( info );
+#endif
}
static gboolean
@@ -360,8 +368,10 @@ real_send_mail( gpointer user_data )
char *from = NULL;
struct post_send_data *psd = NULL;
+#ifdef USE_BROKEN_THREADS
mail_op_hide_progressbar();
mail_op_set_message( "Connecting to transport..." );
+#endif
ex = camel_exception_new ();
composer = info->composer;
@@ -378,13 +388,17 @@ real_send_mail( gpointer user_data )
camel_service_connect (CAMEL_SERVICE (transport), ex);
+#ifdef USE_BROKEN_THREADS
mail_op_set_message( "Connected. Sending..." );
+#endif
if (!camel_exception_is_set (ex))
camel_transport_send (transport, CAMEL_MEDIUM (message), ex);
if (!camel_exception_is_set (ex)) {
+#ifdef USE_BROKEN_THREADS
mail_op_set_message( "Sent. Disconnecting..." );
+#endif
camel_service_disconnect (CAMEL_SERVICE (transport), ex);
}
@@ -490,7 +504,12 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
info->from = from;
info->psd = psd;
+#ifdef USE_BROKEN_THREADS
mail_operation_try( "Send Message", real_send_mail, cleanup_send_mail, info );
+#else
+ real_send_mail( info );
+ cleanup_send_mail( info );
+#endif
}
static void
@@ -631,8 +650,10 @@ static void real_expunge_folder( gpointer user_data )
FolderBrowser *fb = FOLDER_BROWSER(user_data);
CamelException ex;
+#ifdef USE_BROKEN_THREADS
mail_op_hide_progressbar();
mail_op_set_message( "Expunging %s...", fb->message_list->folder->full_name );
+#endif
camel_exception_init(&ex);
@@ -653,7 +674,11 @@ expunge_folder (BonoboUIHandler *uih, void *user_data, const char *path)
FolderBrowser *fb = FOLDER_BROWSER(user_data);
if (fb->message_list->folder) {
+#ifdef USE_BROKEN_THREADS
mail_operation_try( "Expunge Folder", real_expunge_folder, NULL, fb );
+#else
+ real_expunge_folder( fb );
+#endif
}
}