2006-12-09 [colin] 2.6.1cvs12
authorColin Leroy <colin@colino.net>
Sat, 9 Dec 2006 17:07:33 +0000 (17:07 +0000)
committerColin Leroy <colin@colino.net>
Sat, 9 Dec 2006 17:07:33 +0000 (17:07 +0000)
* src/action.c
Fix cache updating after action

ChangeLog
PATCHSETS
configure.ac
src/action.c

index 91d7226f607b6d263b89168aa127756849b1fb41..9bd0c29d60df8da16f0dadae3f2d82985640df74 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-09 [colin]     2.6.1cvs12
+
+       * src/action.c
+               Fix cache updating after action
+
 2006-12-07 [wwp]       2.6.1cvs11
 
        * src/compose.c
index ff9a3d0a159bde3df279bd14983a4400beb636ac..507d5f871a0ed409efb60b205e32572a5c270c10 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.339 -r 1.382.2.340 src/compose.c;  cvs diff -u -r 1.94.2.110 -r 1.94.2.111 src/messageview.c;  cvs diff -u -r 1.47.2.36 -r 1.47.2.37 src/procheader.c;  cvs diff -u -r 1.49.2.83 -r 1.49.2.84 src/procmime.c;  cvs diff -u -r 1.150.2.84 -r 1.150.2.85 src/procmsg.c;  cvs diff -u -r 1.96.2.160 -r 1.96.2.161 src/textview.c;  ) > 2.6.1cvs9.patchset
 ( cvs diff -u -r 1.6.10.12 -r 1.6.10.13 src/addrharvest.c;  cvs diff -u -r 1.8.2.15 -r 1.8.2.16 src/editldap.c;  cvs diff -u -r 1.1.4.22 -r 1.1.4.23 src/expldifdlg.c;  cvs diff -u -r 1.101.2.33 -r 1.101.2.34 src/news.c;  cvs diff -u -r 1.43.2.55 -r 1.43.2.56 src/toolbar.c;  cvs diff -u -r 1.36.2.92 -r 1.36.2.93 src/common/utils.c;  ) > 2.6.1cvs10.patchset
 ( cvs diff -u -r 1.382.2.340 -r 1.382.2.341 src/compose.c;  ) > 2.6.1cvs11.patchset
+( cvs diff -u -r 1.12.2.39 -r 1.12.2.40 src/action.c;  ) > 2.6.1cvs12.patchset
index 7074deb41c451ecf9e71d0c6604788b90658c529..ecc54dcd86b455c278e1607914b406decd8ea10d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=11
+EXTRA_VERSION=12
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 62eb5d31891885e104b03de24bcc6a0e78a5bacf..aaac94031ced0677dc565a7cf1e44fc0666ca39f 100644 (file)
@@ -1350,7 +1350,8 @@ static void catch_status(gpointer data, gint source, GdkInputCondition cond)
                GSList      *cur;
                MsgInfo     *msginfo, *nmi;     /* newmsginfo */
                char        *file;
-
+               gboolean     modified_something = FALSE;
+               FolderItem  *last_item = NULL;
                if (mainwindow_get_mainwindow ())
                        summaryview = mainwindow_get_mainwindow ()->summaryview;
                for (cur = child_info->msginfo_list; cur; cur = cur->next) {
@@ -1361,25 +1362,26 @@ static void catch_status(gpointer data, gint source, GdkInputCondition cond)
                        file = procmsg_get_message_file_path (msginfo);
                        if (!file) 
                                continue;
-                       nmi = procheader_parse_file (file, msginfo->flags, FALSE, FALSE);
+                       nmi = procheader_parse_file (file, msginfo->flags, TRUE, FALSE);
                        if (!nmi) 
                                continue; /* Deleted? */
                        if (msginfo->mtime != nmi->mtime || msginfo->size != nmi->size) {
-                               msginfo->mtime  = nmi->mtime;
-                               msginfo->size   = nmi->size;
-                               msgcache_update_msg (msginfo->folder->cache, msginfo);
+                               nmi->folder = msginfo->folder;
+                               nmi->msgnum = msginfo->msgnum;
+                               msgcache_update_msg (msginfo->folder->cache, nmi);
+                               modified_something = TRUE;
+                               last_item = nmi->folder;
                        }
                        procmsg_msginfo_free (nmi);
-
-                       /* refresh the message display, but only if this message is still
-                       * in focus */
-                       if (summaryview
-                           && summaryview->displayed
-                           && summaryview->folder_item == msginfo->folder
-                           && summary_get_msgnum (summaryview, summaryview->displayed) == msginfo->msgnum) {
-                               summary_show (summaryview, summaryview->folder_item);
-                               summary_select_node (summaryview, summaryview->displayed, TRUE, TRUE);
-                       }
+                       if (summaryview && summaryview->displayed &&
+                           summaryview->folder_item == msginfo->folder &&
+                           summary_get_msgnum(summaryview, summaryview->displayed) == msginfo->msgnum)
+                               summary_redisplay_msg(summaryview);
+                                       
+               }
+               if (modified_something && last_item && 
+                   summaryview && summaryview->folder_item == last_item) {
+                       summary_show (summaryview, summaryview->folder_item);
                }
                g_slist_free (child_info->msginfo_list);
                child_info->msginfo_list = NULL;