[anjal] Use new mail rendering, leaving alone the old renderer
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] Use new mail rendering, leaving alone the old renderer
- Date: Wed, 17 Jun 2009 13:43:58 -0400 (EDT)
commit 8c427ce1aec9f815abfbada7976d90191005fe74
Author: Srinivasa Ragavan <sragavan novell com>
Date: Wed Jun 17 17:44:10 2009 +0530
Use new mail rendering, leaving alone the old renderer
src/mail-message-view.c | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/src/mail-message-view.c b/src/mail-message-view.c
index dddd009..0d3fa47 100644
--- a/src/mail-message-view.c
+++ b/src/mail-message-view.c
@@ -45,6 +45,7 @@
#include <e-util/e-util.h>
#include <composer/e-composer-header-table.h>
#include "mail-utils.h"
+#include "em-format-mail-display.h"
extern char *scolor_norm;
extern char *scolor_sel;
@@ -74,6 +75,9 @@ struct _MailMessageViewPrivate {
char *normal[2];
CamelOperation *cancel;
gboolean show_composer;
+ GtkWidget *attach_area;
+ GtkWidget *html_headers;
+ GtkWidget *table_headers;
};
G_DEFINE_TYPE (MailMessageView, mail_message_view, GTK_TYPE_VBOX)
@@ -184,7 +188,9 @@ mmv_message_opened(CamelFolder *folder, const char *uid, CamelMimeMessage *msg,
MailMessageView *shell = (MailMessageView *)data;
shell->priv->cancel = NULL;
mail_indicate_new_mail (FALSE);
- em_format_webkit_set_message_view ((EMFormatWebKit *)shell->efwd, shell, shell->body);
+ //gtk_widget_hide (shell->priv->table_headers);
+ //gtk_widget_show (shell->priv->html_headers);
+ em_format_mail_set_message_view ((EMFormatWebKit *)shell->efwd, shell, shell->body, shell->priv->html_headers);
em_format_format((EMFormat *)shell->efwd, folder, uid, msg);
shell->priv->msg = msg;
gtk_widget_hide (shell->priv->spinner);
@@ -603,6 +609,8 @@ static void
mmv_finished_loading_webkit (WebKitWebView *webkitwebview, WebKitWebFrame *arg1, gpointer user_data)
{
MailMessageView *mmview = (MailMessageView *) user_data;
+ // gtk_widget_hide (mmview->priv->table_headers);
+ // gtk_widget_show (mmview->priv->html_headers);
gtk_widget_hide(mmview->priv->spinner);
gtk_widget_set_size_request ((GtkWidget *)webkitwebview, -1, webkit_web_frame_get_height(arg1));
/* Connect on expose, and mark mail as read on expose, when the mail is actually seen */
@@ -1152,7 +1160,10 @@ mail_message_view_set_message (MailMessageView *mmview, CamelFolder *folder, con
gtk_widget_show(tmp);
gtk_box_pack_start ((GtkBox *)GTK_BOX (mmview->main_header), tmp, FALSE, FALSE, 3);
+ mmview->priv->table_headers = table;
gtk_box_pack_start ((GtkBox *)GTK_BOX (mmview->main_header), GTK_WIDGET (table), TRUE, TRUE, 3);
+ mmview->priv->html_headers = gtk_vbox_new (FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)GTK_BOX (mmview->main_header), GTK_WIDGET (mmview->priv->html_headers), TRUE, TRUE, 3);
gtk_table_set_col_spacings (table ,12);
gtk_table_set_row_spacings (table, 6);
@@ -1236,13 +1247,11 @@ mail_message_view_set_message (MailMessageView *mmview, CamelFolder *folder, con
gtk_box_pack_start ((GtkBox *)mmview, mmview->main_header, TRUE, TRUE, 0);
gtk_widget_show_all (mmview->main_header);
-
-
gtk_widget_hide (mmview->main_header);
-
+ gtk_widget_hide (mmview->priv->html_headers);
/* Default: Body would be hidden */
mmview->body = gtk_vbox_new (FALSE, 0);
-
+ gtk_box_pack_start (mmview->body, mmview->priv->attach_area, FALSE, FALSE, 0);
//gtk_box_pack_start (header_row, mmview->priv->spinner, FALSE, FALSE, 0);
//gtk_widget_hide (mmview->priv->spinner);
@@ -1315,9 +1324,13 @@ mail_message_view_set_message (MailMessageView *mmview, CamelFolder *folder, con
void
mail_message_view_construct (MailMessageView *mmview)
{
- mmview->efwd = em_format_webkit_display_new ();
+ GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
+ mmview->efwd = em_format_mail_display_new ();
+ ((EMFormat *)mmview->efwd)->show_photo = FALSE;
+ em_format_mail_display_set_attachment_pane (mmview->efwd, vbox);
em_format_set_session ((EMFormat *)mmview->efwd, session);
gtk_box_set_spacing ((GtkBox *)mmview, 0);
+ mmview->priv->attach_area = vbox;
}
MailMessageView *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]