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
This commit is contained in:
Colin Leroy 2007-07-24 16:22:28 +00:00
parent 7f8c13bd29
commit de45fa01ae
6 changed files with 59 additions and 6 deletions

View file

@ -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

View file

@ -2712,3 +2712,4 @@
( 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

View 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=

View file

@ -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();

View 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);

View 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); \