aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-format.c14
-rw-r--r--mail/message-list.c8
3 files changed, 25 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 4f016f5392..9a3da41705 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
+
+ * message-list.c (message_list_hide_clear): Save hide state.
+ (message_list_hide_uids): Save hide state.
+ (message_list_hide_add): Save hide state.
+
+ * mail-format.c (format_mime_part): Make sure the mime-type is
+ non-NULL before passing it off to mail_lookup_handler().
+
2001-11-14 Zbigniew Chyla <cyba@gnome.pl>
* mail-autofilter.c (rule_match_recipients, rule_from_message,
diff --git a/mail/mail-format.c b/mail/mail-format.c
index a0b848a202..8ec33cd83c 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -666,13 +666,17 @@ format_mime_part (CamelMimePart *part, MailDisplay *md)
MailMimeHandler *handler;
gboolean output;
int inline_flags;
-
+
/* Record URLs associated with this part */
get_cid (part, md);
get_location (part, md);
-
+
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-
+ if (wrapper == NULL) {
+ g_warning ("mime part does not contain any data");
+ return TRUE;
+ }
+
if (CAMEL_IS_MULTIPART (wrapper) &&
camel_multipart_get_number (CAMEL_MULTIPART (wrapper)) == 0) {
char *mesg;
@@ -688,7 +692,7 @@ format_mime_part (CamelMimePart *part, MailDisplay *md)
mime_type = camel_data_wrapper_get_mime_type (wrapper);
g_strdown (mime_type);
- handler = mail_lookup_handler (mime_type);
+ handler = mime_type ? mail_lookup_handler (mime_type) : NULL;
if (!handler) {
char *id_type;
@@ -697,7 +701,7 @@ format_mime_part (CamelMimePart *part, MailDisplay *md)
* evil infinite recursion.
*/
- if (!strcmp (mime_type, "application/mac-binhex40")) {
+ if (mime_type && !strcmp (mime_type, "application/mac-binhex40")) {
handler = NULL;
} else {
id_type = mail_identify_mime_part (part, md);
diff --git a/mail/message-list.c b/mail/message-list.c
index bfa27783cb..4f9e141caa 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2173,6 +2173,8 @@ message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, un
MESSAGE_LIST_UNLOCK (ml, hide_lock);
mail_regen_list (ml, ml->search, expr, NULL);
+
+ hide_save_state (ml);
}
/* hide specific uid's */
@@ -2181,7 +2183,7 @@ message_list_hide_uids (MessageList *ml, GPtrArray *uids)
{
int i;
char *uid;
-
+
/* first see if we need to do any work, if so, then do it all at once */
for (i = 0; i < uids->len; i++) {
if (g_hash_table_lookup (ml->uid_nodemap, uids->pdata[i])) {
@@ -2204,6 +2206,8 @@ message_list_hide_uids (MessageList *ml, GPtrArray *uids)
break;
}
}
+
+ hide_save_state (ml);
}
/* no longer hide any messages */
@@ -2222,6 +2226,8 @@ message_list_hide_clear (MessageList *ml)
MESSAGE_LIST_UNLOCK (ml, hide_lock);
mail_regen_list (ml, ml->search, NULL, NULL);
+
+ hide_save_state (ml);
}
#define HIDE_STATE_VERSION (1)