[balsa/gtk3] Queue redrawing the message index when it changes



commit bca803e8250d12e01066430f748538c6e8575f20
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Wed Mar 6 13:47:00 2013 -0500

    Queue redrawing the message index when it changes
    
        * src/balsa-index.c (bndx_queue_draw_idle_cb),
        (bndx_mailbox_changed_idle): queue redrawing the message index
        each time anything changes, to try to fix mis-rendering.

 ChangeLog         |    6 ++++++
 src/balsa-index.c |   12 ++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0c7e542..c6e76a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-06  Peter Bloomfield
+
+       * src/balsa-index.c (bndx_queue_draw_idle_cb),
+       (bndx_mailbox_changed_idle): queue redrawing the message index
+       each time anything changes, to try to fix mis-rendering.
+
 2013-03-04  Peter Bloomfield
 
        * src/main.c (initial_open_inbox), (balsa_cleanup): remember
diff --git a/src/balsa-index.c b/src/balsa-index.c
index 541d8b4..d3d86b0 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -1380,6 +1380,15 @@ balsa_index_set_column_widths(BalsaIndex * index)
 */
 
 static gboolean
+bndx_queue_draw_idle_cb(gpointer bindex)
+{
+    if (!bndx_clear_if_last_ref(&bindex))
+        gtk_widget_queue_draw(bindex);
+
+    return FALSE;
+}
+
+static gboolean
 bndx_mailbox_changed_idle(BalsaIndex * bindex)
 {
     LibBalsaMailbox *mailbox;
@@ -1408,6 +1417,9 @@ bndx_mailbox_changed_idle(BalsaIndex * bindex)
 
     bndx_changed_find_row(bindex);
 
+    g_idle_add((GSourceFunc) bndx_queue_draw_idle_cb,
+               g_object_ref(bindex));
+
     return FALSE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]