[balsa/gtk3] Close outbox in an idle callback
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Close outbox in an idle callback
- Date: Thu, 21 Feb 2013 02:50:41 +0000 (UTC)
commit 66094e340aca6f28da9603e8c9edf6b2d1d63d2a
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Feb 20 21:28:04 2013 -0500
Close outbox in an idle callback
* libbalsa/send.c (balsa_send_message_real_idle_cb),
(balsa_send_message_real): close outbox in an idle callback.
ChangeLog | 5 +++++
libbalsa/send.c | 14 +++++++++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9b5711b..7b85cb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2013-02-20 Peter Bloomfield
+ * libbalsa/send.c (balsa_send_message_real_idle_cb),
+ (balsa_send_message_real): close outbox in an idle callback.
+
+2013-02-20 Peter Bloomfield
+
* libbalsa/libbalsa-gpgme.c (libbalsa_gpgme_init): use g_message
instead of g_warning.
diff --git a/libbalsa/send.c b/libbalsa/send.c
index 9343518..daa4de0 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -1391,6 +1391,16 @@ monitor_cb (const char *buf, int buflen, int writing, void *arg)
/* [BCS] radically different since it uses the libESMTP interface.
*/
+
+static gboolean
+balsa_send_message_real_idle_cb(LibBalsaMailbox * outbox)
+{
+ libbalsa_mailbox_close(outbox, TRUE);
+ g_object_unref(outbox);
+
+ return FALSE;
+}
+
static guint
balsa_send_message_real(SendMessageInfo* info)
{
@@ -1455,7 +1465,9 @@ balsa_send_message_real(SendMessageInfo* info)
smtp_enumerate_messages (info->session, handle_successful_send,
&session_started);
- libbalsa_mailbox_close(info->outbox, TRUE);
+ /* close outbox in an idle callback, as it might affect the display */
+ g_idle_add((GSourceFunc) balsa_send_message_real_idle_cb,
+ g_object_ref(info->outbox));
/*
* gdk_flush();
* gdk_threads_leave();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]