2006-12-01 [wwp] 2.6.0cvs71
authorTristan Chabredier <wwp@claws-mail.org>
Fri, 1 Dec 2006 09:21:55 +0000 (09:21 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Fri, 1 Dec 2006 09:21:55 +0000 (09:21 +0000)
* src/summaryview.c
As the list may change while the mark as read delay
runs, we can't rely on the 'row' pointer, which can
be invalid when the timeout is called. As the mark
as read is only done if the message is still selected,
use summaryview->selected instead. Thanks to Colin.

ChangeLog
PATCHSETS
configure.ac
src/summaryview.c

index 76ff3651eff152c7dd9876185d323ab3462cf2b1..5f0cfbccdbf32d7397e90162415b78667cd09e43 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-12-01 [wwp]       2.6.0cvs71
+
+       * src/summaryview.c
+               As the list may change while the mark as read delay
+               runs, we can't rely on the 'row' pointer, which can
+               be invalid when the timeout is called. As the mark
+               as read is only done if the message is still selected,
+               use summaryview->selected instead. Thanks to Colin.
+
 2006-11-30 [paul]      2.6.0cvs70
 
        * src/textview.c
index edd1482e38ff52a16ab6b7910ee87a6b4ea90fe7..2bfde1992f8b84a881265bca21d9765af693b7fa 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.5.2.43 -r 1.5.2.44 src/gtk/gtkutils.c;  cvs diff -u -r 1.5.2.6 -r 1.5.2.7 src/gtk/gtkvscrollbutton.c;  ) > 2.6.0cvs68.patchset
 ( cvs diff -u -r 1.1.2.38 -r 1.1.2.39 src/wizard.c;  ) > 2.6.0cvs69.patchset
 ( cvs diff -u -r 1.96.2.159 -r 1.96.2.160 src/textview.c;  ) > 2.6.0cvs70.patchset
+( cvs diff -u -r 1.395.2.269 -r 1.395.2.270 src/summaryview.c;  ) > 2.6.0cvs71.patchset
index edf92e1281cf0c0081e212f5ea0f3935c4a24cf1..80a4aa88f3baad2999fa97ccf672f51cc9657ed5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=70
+EXTRA_VERSION=71
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 77104d2b6f2425d34b130e8c6fca7c98fb95ecb1..c929bc53287ce3230a11b740179733a77078558b 100644 (file)
@@ -2935,7 +2935,6 @@ static void msginfo_mark_as_read (SummaryView *summaryview, MsgInfo *msginfo,
 typedef struct  {
        MsgInfo *msginfo;
        SummaryView *summaryview;
-       GtkCTreeNode *row;
 } MarkAsReadData;
 
 static int msginfo_mark_as_read_timeout(void *data)
@@ -2946,7 +2945,7 @@ static int msginfo_mark_as_read_timeout(void *data)
        
        if (mdata->msginfo == summary_get_selected_msg(mdata->summaryview))
                msginfo_mark_as_read(mdata->summaryview, mdata->msginfo,
-                                    mdata->row); 
+                                    mdata->summaryview->selected); 
 
        g_free(mdata);
 
@@ -3006,7 +3005,6 @@ static void summary_display_msg_full(SummaryView *summaryview,
                        MarkAsReadData *data = g_new0(MarkAsReadData, 1);
                        data->summaryview = summaryview;
                        data->msginfo = msginfo;
-                       data->row = row;
                        g_timeout_add(prefs_common.mark_as_read_delay * 1000,
                                msginfo_mark_as_read_timeout, data);
                } else if (new_window || !prefs_common.mark_as_read_on_new_window) {