[balsa/gtk3] Hide current message sooner instead of later
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Hide current message sooner instead of later
- Date: Fri, 20 Apr 2012 13:21:26 +0000 (UTC)
commit a8fbda3bf3a2d5ed8f687b0ccfb7a74ce41966ac
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Apr 20 09:20:33 2012 -0400
Hide current message sooner instead of later
* src/main-window.c: hide current message immediately, instead
of in the idle callback; use gdk_threads_add_idle convenience
function.
* src/balsa-message.c (balsa_message_set): message is already
hidden.
ChangeLog | 8 ++++++++
src/balsa-message.c | 1 -
src/main-window.c | 9 +++------
3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 74b5339..ef76b27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-04-20 Peter Bloomfield
+
+ * src/main-window.c: hide current message immediately, instead
+ of in the idle callback; use gdk_threads_add_idle convenience
+ function.
+ * src/balsa-message.c (balsa_message_set): message is already
+ hidden.
+
2012-04-19 Peter Bloomfield
* libbalsa/body.c (libbalsa_message_body_get_pixbuf): apply
diff --git a/src/balsa-message.c b/src/balsa-message.c
index 98fd207..520646b 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -1069,7 +1069,6 @@ balsa_message_set(BalsaMessage * bm, LibBalsaMailbox * mailbox, guint msgno)
g_return_val_if_fail(bm != NULL, FALSE);
- gtk_widget_hide(GTK_WIDGET(bm));
bm_disable_find_entry(bm);
balsa_message_clear_tree(bm);
select_part(bm, NULL);
diff --git a/src/main-window.c b/src/main-window.c
index 5044c9a..487a5ca 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -5122,7 +5122,9 @@ bw_idle_replace(BalsaWindow * window, BalsaIndex * bindex)
if (balsa_app.previewpane) {
bw_idle_remove(window);
window->set_message_id =
- g_idle_add((GSourceFunc) bw_idle_cb, window);
+ gdk_threads_add_idle((GSourceFunc) bw_idle_cb, window);
+ if (BALSA_MESSAGE(window->preview)->message)
+ gtk_widget_hide(window->preview);
}
}
@@ -5143,14 +5145,10 @@ bw_idle_cb(BalsaWindow * window)
{
BalsaIndex *index;
- gdk_threads_enter();
-
if (window->set_message_id == 0) {
- gdk_threads_leave();
return FALSE;
}
if (bw_idle_cb_active) {
- gdk_threads_leave();
return TRUE;
}
bw_idle_cb_active = TRUE;
@@ -5171,7 +5169,6 @@ bw_idle_cb(BalsaWindow * window)
g_object_set_data(G_OBJECT(window), BALSA_INDEX_GRAB_FOCUS, NULL);
}
- gdk_threads_leave();
bw_idle_cb_active = FALSE;
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]