2012-05-11 [colin] 3.8.0cvs40
authorColin Leroy <colin@colino.net>
Fri, 11 May 2012 16:53:23 +0000 (16:53 +0000)
committerColin Leroy <colin@colino.net>
Fri, 11 May 2012 16:53:23 +0000 (16:53 +0000)
* src/mimeview.c
* src/common/utils.c
Fix bug 2659, 'E-mail attachments are handled
inconsistently'
Fix problems iterating the mime tree, and determine
whether a file is an email without To:

ChangeLog
PATCHSETS
configure.ac
src/common/utils.c
src/mimeview.c

index 4c5f834..346d9a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-11 [colin]     3.8.0cvs40
+
+       * src/mimeview.c
+       * src/common/utils.c
+               Fix bug 2659, 'E-mail attachments are handled
+               inconsistently'
+               Fix problems iterating the mime tree, and determine
+               whether a file is an email without To:
+
 2012-04-03 [colin]     3.8.0cvs39
 
        * src/Makefile.am
index 32c8217..efb7e98 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.599 -r 1.382.2.600 src/compose.c;  ) > 3.8.0cvs37.patchset
 ( cvs diff -u -r 1.155.2.99 -r 1.155.2.100 src/Makefile.am;  ) > 3.8.0cvs38.patchset
 ( cvs diff -u -r 1.155.2.100 -r 1.155.2.101 src/Makefile.am;  ) > 3.8.0cvs39.patchset
+( cvs diff -u -r 1.83.2.188 -r 1.83.2.189 src/mimeview.c;  cvs diff -u -r 1.36.2.195 -r 1.36.2.196 src/common/utils.c;  ) > 3.8.0cvs40.patchset
index b81cd91..3bba8a7 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=39
+EXTRA_VERSION=40
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index d5a5a94..3b82ed0 100644 (file)
@@ -4844,9 +4844,11 @@ gboolean file_is_email (const gchar *filename)
               && fgets(buffer, sizeof (buffer), fp) > 0) {
                if (!strncmp(buffer, "From:", strlen("From:")))
                        score++;
-               if (!strncmp(buffer, "To:", strlen("To:")))
+               else if (!strncmp(buffer, "Date:", strlen("Date:")))
                        score++;
-               if (!strncmp(buffer, "Subject:", strlen("Subject:")))
+               else if (!strncmp(buffer, "Message-ID:", strlen("Message-ID:")))
+                       score++;
+               else if (!strncmp(buffer, "Subject:", strlen("Subject:")))
                        score++;
                i++;
        }
index 0ab2c88..4773efd 100644 (file)
@@ -630,10 +630,15 @@ static gboolean mimeview_tree_next(GtkTreeModel *model, GtkTreePath *path)
        has_parent = gtk_tree_model_iter_parent(model, &parent, &iter);
        
        if (!gtk_tree_model_iter_next(model, &iter)) {
-               if (has_parent && gtk_tree_model_iter_next(model, &parent)) {
+               while (has_parent) {
+                       GtkTreeIter saved_parent = parent;
                        gtk_tree_path_up(path);
-                       gtk_tree_path_next(path);
-                       return TRUE;
+                       if (gtk_tree_model_iter_next(model, &parent)) {
+                               gtk_tree_path_next(path);
+                               return TRUE;
+                       } else {
+                               has_parent = gtk_tree_model_iter_parent(model, &parent, &saved_parent);
+                       }
                }
                
        } else {