Save hide state. (message_list_hide_uids): Save hide state.
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(). svn path=/trunk/; revision=14734
This commit is contained in:
committed by
Jeffrey Stedfast
parent
71820c3740
commit
e0103cdf6e
@ -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,
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user