diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 2000-01-25 16:43:24 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 2000-01-25 16:43:24 +0800 |
commit | 670f57583d84d4c8f0195d3eefbef93920c6e9d9 (patch) | |
tree | 5a99fdf111ee22bd689c42b3f0c36c22a44a41fc /mail/mail-display.c | |
parent | ed7345eec736a39e3e37a4e76a0bdba7157270b7 (diff) | |
download | gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.gz gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.bz2 gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.lz gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.xz gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.zst gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.zip |
More work
svn path=/trunk/; revision=1628
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r-- | mail/mail-display.c | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c new file mode 100644 index 0000000000..2e3ac52fd2 --- /dev/null +++ b/mail/mail-display.c @@ -0,0 +1,68 @@ +/* + * mail-display.c: Mail display widget + * + * Author: + * Miguel de Icaza + * + * (C) 2000 Helix Code, Inc. + */ +#include <config.h> +#include <gnome.h> +#include "e-util/e-util.h" +#include "mail-display.h" + +#define PARENT_TYPE (gtk_table_get_type ()) + +static GtkObjectClass *mail_display_parent_class; + +static void +mail_display_init (GtkObject *object) +{ + MailDisplay *mail_display = MAIL_DISPLAY (object); + + mail_display->html = gtk_html_new (); + gtk_widget_show (mail_display->html); +} + +static void +mail_display_destroy (GtkObject *object) +{ + MailDisplay *mail_display = MAIL_DISPLAY (object); + + mail_display_parent_class->destroy (object); +} + +static void +mail_display_class_init (GtkObjectClass *object_class) +{ + object_class->destroy = mail_display_destroy; + mail_display_parent_class = gtk_type_class (PARENT_TYPE); +} + +GtkWidget * +mail_display_new (void) +{ + MailDisplay *mail_display = gtk_type_new (mail_display_get_type ()); + GtkTable *table = GTK_TABLE (mail_display); + + table->homogeous = FALSE; + gtk_table_resize (table, 1, 2); + + gtk_table_attach (table, mail_display->html, + 0, 1, 1, 2, + GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL); + return GTK_WIDGET (mail_display); +} + +CamelStream * +mail_display_get_stream (MailDisplay *mail_display) +{ + g_return_val_if_fail (mail_display != NULL, NULL); + g_return_val_if_fail (IS_MAIL_DISPLAY (mail_display), NULL); + + return html_stream_new (mail_display->html); +} + +E_MAKE_TYPE (mail_display, "MailDisplay", MailDisplay, mail_display_class_init, mail_display_init, PARENT_TYPE); + + |