commit 4649a590f745431cc881af980a5e29ea86eaf780
parent 9f77334e2bcae2f44b800bd5000b879ca52b41eb
Author: Colin Leroy <colin@colino.net>
Date: Thu, 28 Feb 2008 16:56:31 +0000
2008-02-28 [colin] 3.3.1cvs5
* src/compose.c
Fix bug 1534, 'Segmentation fault when doing
some draft saving and then throwing away'
* src/imap.c
Fix bug 1533, 'Claws is unable to mark messages
as "read" in IMAP shared folders'
* src/etpan/imap-thread.c
Fix bug 1515, 'large messages crash claws when
syncing for offline mode'. This is rather a
workaround, and mails > 64MB will still be
problematic if there's less than 64MB available
on the dataroot volume.
* src/messageview.c
MAEMO: Add information when fetching big messages
Diffstat:
7 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,20 @@
+2008-02-28 [colin] 3.3.1cvs5
+
+ * src/compose.c
+ Fix bug 1534, 'Segmentation fault when doing
+ some draft saving and then throwing away'
+ * src/imap.c
+ Fix bug 1533, 'Claws is unable to mark messages
+ as "read" in IMAP shared folders'
+ * src/etpan/imap-thread.c
+ Fix bug 1515, 'large messages crash claws when
+ syncing for offline mode'. This is rather a
+ workaround, and mails > 64MB will still be
+ problematic if there's less than 64MB available
+ on the dataroot volume.
+ * src/messageview.c
+ MAEMO: Add information when fetching big messages
+
2008-02-26 [colin] 3.3.1cvs4
* src/imap.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3239,3 +3239,4 @@
( cvs diff -u -r 1.115.2.189 -r 1.115.2.190 src/main.c; ) > 3.3.1cvs2.patchset
( cvs diff -u -r 1.29.2.10 -r 1.29.2.11 INSTALL; cvs diff -u -r 1.8.2.47 -r 1.8.2.48 README; ) > 3.3.1cvs3.patchset
( cvs diff -u -r 1.179.2.211 -r 1.179.2.212 src/imap.c; ) > 3.3.1cvs4.patchset
+( cvs diff -u -r 1.382.2.438 -r 1.382.2.439 src/compose.c; cvs diff -u -r 1.179.2.212 -r 1.179.2.213 src/imap.c; cvs diff -u -r 1.94.2.171 -r 1.94.2.172 src/messageview.c; cvs diff -u -r 1.1.4.97 -r 1.1.4.98 src/etpan/imap-thread.c; ) > 3.3.1cvs5.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=3
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=4
+EXTRA_VERSION=5
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/compose.c b/src/compose.c
@@ -8940,10 +8940,18 @@ static void compose_close_cb(gpointer data, guint action, GtkWidget *widget)
#endif
if (compose->modified) {
+ if (!g_mutex_trylock(compose->mutex)) {
+ /* we don't want to lock the mutex once it's available,
+ * because as the only other part of compose.c locking
+ * it is compose_close - which means once unlocked,
+ * the compose struct will be freed */
+ debug_print("couldn't lock mutex, probably sending\n");
+ return;
+ }
val = alertpanel(_("Discard message"),
_("This message has been modified. Discard it?"),
_("_Discard"), _("_Save to Drafts"), GTK_STOCK_CANCEL);
-
+ g_mutex_unlock(compose->mutex);
switch (val) {
case G_ALERTDEFAULT:
if (prefs_common.autosave)
diff --git a/src/etpan/imap-thread.c b/src/etpan/imap-thread.c
@@ -2375,11 +2375,13 @@ static void fetch_content_run(struct etpan_thread_op * op)
r = fwrite(content, 1, content_size, f);
if (r < content_size) {
+ result->error = MAILIMAP_ERROR_FETCH;
goto fclose;
}
r = fclose(f);
if (r == EOF) {
+ result->error = MAILIMAP_ERROR_FETCH;
goto unlink;
}
goto free;
@@ -2399,7 +2401,7 @@ static void fetch_content_run(struct etpan_thread_op * op)
free(content);
}
- debug_print("imap fetch_content run - end %i\n", r);
+ debug_print("imap fetch_content run - end %i\n", result->error);
}
int imap_threaded_fetch_content(Folder * folder, uint32_t msg_index,
diff --git a/src/imap.c b/src/imap.c
@@ -5184,19 +5184,19 @@ static struct mailimap_flag_list * imap_flag_to_lep(IMAPFolderItem *item, IMAPFl
flag_list = mailimap_flag_list_new_empty();
- if (IMAP_IS_SEEN(flags) && flag_ok(item, IMAP_FLAG_SEEN))
+ if (IMAP_IS_SEEN(flags))
mailimap_flag_list_add(flag_list,
mailimap_flag_new_seen());
- if (IMAP_IS_ANSWERED(flags) && flag_ok(item, IMAP_FLAG_ANSWERED))
+ if (IMAP_IS_ANSWERED(flags))
mailimap_flag_list_add(flag_list,
mailimap_flag_new_answered());
- if (IMAP_IS_FLAGGED(flags) && flag_ok(item, IMAP_FLAG_FLAGGED))
+ if (IMAP_IS_FLAGGED(flags))
mailimap_flag_list_add(flag_list,
mailimap_flag_new_flagged());
- if (IMAP_IS_DELETED(flags) && flag_ok(item, IMAP_FLAG_DELETED))
+ if (IMAP_IS_DELETED(flags))
mailimap_flag_list_add(flag_list,
mailimap_flag_new_deleted());
- if (IMAP_IS_DRAFT(flags) && flag_ok(item, IMAP_FLAG_DRAFT))
+ if (IMAP_IS_DRAFT(flags))
mailimap_flag_list_add(flag_list,
mailimap_flag_new_draft());
if (IMAP_IS_FORWARDED(flags) && flag_ok(item, IMAP_FLAG_FORWARDED))
diff --git a/src/messageview.c b/src/messageview.c
@@ -71,6 +71,7 @@
#include "printing.h"
#include "quoted-printable.h"
#include "version.h"
+#include "statusbar.h"
static GList *messageview_list = NULL;
@@ -1025,7 +1026,15 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
mimeview_clear(messageview->mimeview);
messageview->updating = TRUE;
+ if (msginfo->size > 1024*1024)
+ statuswindow_print_all(_("Fetching message (%s)..."),
+ to_human_readable(msginfo->size));
+
file = procmsg_get_message_file_path(msginfo);
+
+ if (msginfo->size > 1024*1024)
+ statuswindow_pop_all();
+
if (!file) {
g_warning("can't get message file path.\n");
textview_show_error(messageview->mimeview->textview);