Files
evolution/mail/mail-display.h
Dan Winship 54a2910f89 Check if a message part's content is available, and if it's not, queue a
* mail-format.c (mail_content_loaded): Check if a message part's
	content is available, and if it's not, queue a thread that will
	load it and then queue an idle-handler redisplay of the message.
	(call_handler_function): Call mail_content_loaded() on the part
	and don't try to display it if it's currently offline.
	(get_data_wrapper_text): Simplify a bit

	* mail-display.c (mail_display_queue_redisplay): rename and make
	non-static.
	(mail_display_redisplay): Use a "new and improved" way of
	preserving the GtkHTML scroll location. ("new and improved" is
	code for "gross and hackish", but there should be a real interface
	for this eventually.)
	(on_url_requested): Use mail_content_loaded() and don't write out
	offline cid: URLs

	* mail-identify.c (mail_identify_mime_part): Use
	mail_content_loaded and don't try to identify the data if it's
	offline.

svn path=/trunk/; revision=7813
2001-01-25 17:07:23 +00:00

66 lines
2.0 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;
GHashTable *thumbnail_cache;
};
typedef struct {
GtkVBoxClass parent_class;
} MailDisplayClass;
GtkType mail_display_get_type (void);
GtkWidget * mail_display_new (void);
void mail_display_queue_redisplay (MailDisplay *mail_display);
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_ */