Files
evolution/mail/mail-display.h
Jeffrey Stedfast 0fa1b87e9e New function to return if user wants to view message source.
2000-11-21  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-config.c (mail_config_view_source): New function to return
	if user wants to view message source.
	(mail_config_set_view_source): New function to set whether the
	view wants to view source.

	* mail-ops.c (mail_do_view_message_sources): Removed. We're not
	gonna view-source this way anymore.

	* folder-browser-factory.c: Removed the ViewSource bonobo verb
	from the Message menu.
	(control_activate): Added ViewSource.

	* folder-browser.c (on_right_click): Removed Message menu item to
	view message source.
	(folder_browser_toggle_view_source): New callback to set whether
	or not the MailDisplay shows the raw message or the pretty-ified
	message.

	* mail-callbacks.c: Removed view_source.

	* mail-display.c (redisplay): If toggle_raw is set then display
	the raw message else display the pretty formatted message.
	(mail_display_redisplay): New function to force the redisplay of a
	message.

	* mail-format.c (mail_format_raw_message): New function to
	write the raw message data.

svn path=/trunk/; revision=6639
2000-11-21 22:09:51 +00:00

64 lines
1.9 KiB
C

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifndef _MAIL_DISPLAY_H_
#define _MAIL_DISPLAY_H_
#include <gtk/gtkvbox.h>
#include <gtkhtml/gtkhtml.h>
#include <gal/widgets/e-scroll-frame.h>
#include <camel/camel-stream.h>
#include <camel/camel-mime-message.h>
#include <camel/camel-medium.h>
#include "mail-types.h"
#define MAIL_DISPLAY_TYPE (mail_display_get_type ())
#define MAIL_DISPLAY(o) (GTK_CHECK_CAST ((o), MAIL_DISPLAY_TYPE, MailDisplay))
#define MAIL_DISPLAY_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_DISPLAY_TYPE, MailDisplayClass))
#define IS_MAIL_DISPLAY(o) (GTK_CHECK_TYPE ((o), MAIL_DISPLAY_TYPE))
#define IS_MAIL_DISPLAY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_DISPLAY_TYPE))
struct _MailDisplay {
GtkVBox parent;
EScrollFrame *scroll;
GtkHTML *html;
GtkHTMLStream *stream;
guint idle_id;
CamelMimeMessage *current_message;
GData **data;
};
typedef struct {
GtkVBoxClass parent_class;
} MailDisplayClass;
GtkType mail_display_get_type (void);
GtkWidget * mail_display_new (void);
void mail_display_redisplay (MailDisplay *mail_display, gboolean unscroll);
void mail_display_set_message (MailDisplay *mail_display,
CamelMedium *medium);
void mail_display_toggle_raw (MailDisplay *mail_display,
gboolean toggle);
#define HTML_HEADER "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n<HTML>\n<HEAD>\n<META NAME=\"GENERATOR\" CONTENT=\"Evolution Mail Component\">\n</HEAD>\n"
void mail_html_write (GtkHTML *html,
GtkHTMLStream *stream,
const char *format, ...);
void mail_text_write (GtkHTML *html,
GtkHTMLStream *stream,
const char *format, ...);
void mail_error_write (GtkHTML *html,
GtkHTMLStream *stream,
const char *format, ...);
#endif /* _MAIL_DISPLAY_H_ */