2007-07-24 [colin] 2.10.0cvs59
authorColin Leroy <colin@colino.net>
Tue, 24 Jul 2007 16:22:28 +0000 (16:22 +0000)
committerColin Leroy <colin@colino.net>
Tue, 24 Jul 2007 16:22:28 +0000 (16:22 +0000)
* src/mh.c
Fix missing timestamp update on source
folder when moving
* src/textview.c
* src/textview.h
Better text layout on part's choices

ChangeLog
PATCHSETS
configure.ac
src/mh.c
src/textview.c
src/textview.h

index 44af978a1e728f09236bb55f7951882726a30f8c..806a7e13d4979cf5ba64441c1601f3e8e1546fc1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-07-24 [colin]     2.10.0cvs59
+
+       * src/mh.c
+               Fix missing timestamp update on source
+               folder when moving
+       * src/textview.c
+       * src/textview.h
+               Better text layout on part's choices
+
 2007-07-23 [colin]     2.10.0cvs58
 
        * src/mimeview.c
index 7942cdfbfee9e874dc46372ed175e5a2e3665d4f..e6808f3c8645a0d42148a2f6944a8a03e4def159 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.8.2.13 -r 1.8.2.14 src/quote_fmt_lex.l;  ) > 2.10.0cvs56.patchset
 ( cvs diff -u -r 1.8.2.14 -r 1.8.2.15 src/quote_fmt_lex.l;  ) > 2.10.0cvs57.patchset
 ( cvs diff -u -r 1.83.2.112 -r 1.83.2.113 src/mimeview.c;  cvs diff -u -r 1.96.2.175 -r 1.96.2.176 src/textview.c;  cvs diff -u -r 1.1.2.74 -r 1.1.2.75 src/gtk/quicksearch.c;  ) > 2.10.0cvs58.patchset
+( cvs diff -u -r 1.79.2.56 -r 1.79.2.57 src/mh.c;  cvs diff -u -r 1.96.2.176 -r 1.96.2.177 src/textview.c;  cvs diff -u -r 1.12.2.20 -r 1.12.2.21 src/textview.h;  ) > 2.10.0cvs59.patchset
index 4cbe2eb5a2f77cfd1434b413c0e6d115bff3ef1f..943042b3bb49015f0311864613eed931103a9f24 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=10
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=58
+EXTRA_VERSION=59
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 08c03dc5b79d7d523386ca94c559deb62d604ac6..26fc01000f8434c766273630b759a310c2224dc5 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -454,6 +454,8 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, MsgInfoList *msglist,
                         GRelation *relation)
 {
        gboolean dest_need_scan = FALSE;
+       gboolean src_need_scan = FALSE;
+       FolderItem *src = NULL;
        gchar *srcfile;
        gchar *destfile;
        gint filemode = 0;
@@ -463,7 +465,8 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, MsgInfoList *msglist,
        gint curnum = 0, total = 0;
        gchar *srcpath = NULL;
        gboolean full_fetch = FALSE;
-       time_t last_mtime = (time_t)0;
+       time_t last_dest_mtime = (time_t)0;
+       time_t last_src_mtime = (time_t)0;
 
        g_return_val_if_fail(dest != NULL, -1);
        g_return_val_if_fail(msglist != NULL, -1);
@@ -479,6 +482,10 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, MsgInfoList *msglist,
 
        if (msginfo->folder->folder != dest->folder)
                full_fetch = TRUE;
+       
+       if (FOLDER_TYPE(msginfo->folder->folder) == F_MH) {
+               src = msginfo->folder;
+       }
 
        if (dest->last_num < 0) {
                mh_get_last_num(folder, dest);
@@ -490,7 +497,12 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, MsgInfoList *msglist,
        srcpath = folder_item_get_path(msginfo->folder);
 
        dest_need_scan = mh_scan_required(dest->folder, dest);
-       last_mtime = dest->mtime;
+       last_dest_mtime = dest->mtime;
+
+       if (src) {
+               src_need_scan = mh_scan_required(src->folder, src);
+               last_src_mtime = src->mtime;
+       }
 
        total = g_slist_length(msglist);
        if (total > 100) {
@@ -571,9 +583,14 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, MsgInfoList *msglist,
        g_free(srcpath);
        mh_write_sequences(dest, TRUE);
 
-       if (dest->mtime == last_mtime && !dest_need_scan) {
+       if (dest->mtime == last_dest_mtime && !dest_need_scan) {
                mh_set_mtime(dest);
        }
+
+       if (src && src->mtime == last_src_mtime && !src_need_scan) {
+               mh_set_mtime(src);
+       }
+
        if (total > 100) {
                statusbar_progress_all(0,0,0);
                statusbar_pop_all();
index a57fb100b64b95d137edc1c2fb6d7de6e48d41e5..57a34d7b944e1fb4fdb9b3f99412e1fafe375096 100644 (file)
@@ -844,6 +844,8 @@ void textview_show_mime_part(TextView *textview, MimeInfo *partinfo)
        GtkTextView *text;
        GtkTextBuffer *buffer;
        GtkTextIter iter;
+       const gchar *name;
+       gchar *content_type;
 
        if (!partinfo) return;
 
@@ -855,8 +857,27 @@ void textview_show_mime_part(TextView *textview, MimeInfo *partinfo)
        gtk_text_buffer_get_start_iter(buffer, &iter);
 
        TEXTVIEW_INSERT("\n");
-       TEXTVIEW_INSERT(_("  The following can be performed on this part by\n"));
-       TEXTVIEW_INSERT(_("  right-clicking the icon or list item:\n"));
+
+       name = procmime_mimeinfo_get_parameter(partinfo, "filename");
+       if (name == NULL)
+               name = procmime_mimeinfo_get_parameter(partinfo, "name");
+       if (name != NULL) {
+               content_type = procmime_get_content_type_str(partinfo->type,
+                                                    partinfo->subtype);
+               TEXTVIEW_INSERT("  ");
+               TEXTVIEW_INSERT_BOLD(name);
+               TEXTVIEW_INSERT(" (");
+               TEXTVIEW_INSERT(content_type);
+               TEXTVIEW_INSERT(", ");
+               TEXTVIEW_INSERT(to_human_readable(partinfo->length));
+               TEXTVIEW_INSERT("):\n\n");
+               
+               g_free(content_type);
+       }
+       TEXTVIEW_INSERT(_("  The following can be performed on this part\n"));
+#ifndef MAEMO
+       TEXTVIEW_INSERT(_("  by right-clicking the icon or list item:\n"));
+#endif
 
        TEXTVIEW_INSERT(_("     - To save, select "));
        TEXTVIEW_INSERT_LINK(_("'Save as...'"), "sc://save_as", NULL);
index 247a71dfbbbfbd6cb7b447042401d772fb18e9de..c8413df77a29c15913201b98c8072c18e874f4c6 100644 (file)
@@ -134,6 +134,11 @@ gchar *textview_get_visible_uri            (TextView       *textview,
                                (buffer, &iter, str, -1,\
                                 "header", NULL)
 
+#define TEXTVIEW_INSERT_BOLD(str) \
+       gtk_text_buffer_insert_with_tags_by_name \
+                               (buffer, &iter, str, -1,\
+                                "header", "header_title", NULL)
+
 #define TEXTVIEW_INSERT_LINK(str, fname, udata) {                              \
        ClickableText *uri;                                                     \
        uri = g_new0(ClickableText, 1);                                 \