Files
evolution/mail/mail.h
Dan Winship e243f47a72 Fix a bunch of replying/forwarding-related formatting bugs.
2749 - Message text not included in reply, but html attachment is
	4294 - "forward inline" should quote the same headers as the
	       normal mail display
	6100 - Reply to a forwarded email displays email headers
	7255 - Replying to HTML message
	7527 - replying to forwarded message w/ attachments does the wrong
	       thing

	* mail-format.c (mail_get_message_rfc822): New function to get
	message headers and body together, for inline forwards, or replies
	containing attached messages.
	(mail_get_message_body): Redo this to always return HTML, but keep
	the "want_plain" flag, to decide whether to return HTML that looks
	like HTML or HTML that looks like plain text. Use
	mail_get_message_rfc822 to handle attached message/rfc822 parts.
	Don't include the text of vcard or icalendar attachments. Don't
	fail to include text parts just because we found an HTML part.
	(Since we're always returning HTML now, this doesn't cause
	problems any more.)

	* mail-tools.c (mail_tool_quote_message): Simplify greatly.
	mail_get_message_body always returns HTML now, and we let it take
	care of prepending "> "s too. We then let GtkHTML deal with
	converting the HTML to plain text if the user wants to reply in
	plain text.
	(mail_tool_forward_message): Simplify this a ton too: parts of it
	are moved into mail_get_message_rfc822 and parts are now
	unnecessary.

	* mail-callbacks.c (do_forward_non_attached): Call
	mail_tool_forward_message here always, and let it do the "> "
	quoting in the "quoted" case, so that we get the headers too when
	forwarding quoted. Related to bug #4294.

svn path=/trunk/; revision=12657
2001-09-06 20:10:02 +00:00

84 lines
3.0 KiB
C

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright 2000, Ximian, Inc. (www.ximian.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*/
/* This file is a F*CKING MESS. Shame to us! */
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include <gtkhtml/gtkhtml.h>
#include <camel/camel.h>
#include <composer/e-msg-composer.h>
#include <shell/evolution-storage.h>
#include "mail-accounts.h"
#include "mail-account-editor.h"
#include "mail-callbacks.h"
#include "mail-config.h"
#include "mail-config-druid.h"
/*#include "folder-browser.h"*/
#include "mail-session.h"
#include "mail-types.h"
extern char *evolution_dir;
/* mail-format */
void mail_format_mime_message (CamelMimeMessage *mime_message,
MailDisplay *md);
void mail_format_raw_message (CamelMimeMessage *mime_message,
MailDisplay *md);
gboolean mail_content_loaded (CamelDataWrapper *wrapper,
MailDisplay *display,
gboolean redisplay,
const gchar *url,
GtkHTMLStream *handle);
typedef gboolean (*MailMimeHandlerFn) (CamelMimePart *part,
const char *mime_type,
MailDisplay *md);
typedef struct {
gboolean generic;
OAF_ServerInfo *component;
GList *applications;
MailMimeHandlerFn builtin;
} MailMimeHandler;
MailMimeHandler *mail_lookup_handler (const char *mime_type);
gboolean mail_part_is_inline (CamelMimePart *part);
gboolean mail_part_is_displayed_inline (CamelMimePart *part, MailDisplay *md);
void mail_part_toggle_displayed (CamelMimePart *part, MailDisplay *md);
char *mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cite);
/* mail-identify */
char *mail_identify_mime_part (CamelMimePart *part, MailDisplay *md);
/* component factory for lack of a better place */
void mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name);
/*takes a GSList of MailConfigServices */
void mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources, gboolean is_account_data);
void mail_hash_storage (CamelService *store, EvolutionStorage *storage);
EvolutionStorage *mail_lookup_storage (CamelStore *store);
void mail_remove_storage_by_uri (const char *uri);
void mail_remove_storage (CamelStore *store);
void mail_storages_foreach (GHFunc func, gpointer data);
int mail_storages_count (void);
void evolution_folder_info_factory_init (void);