#include <widgets/modest-gtkhtml-msg-view.h>
#include <widgets/modest-isearch-view.h>
+/* FIXNE: we should have no maemo-deps in widgets/ */
+#ifdef MODEST_PLATFORM_MAEMO
+#include "maemo/modest-hildon-includes.h"
+#endif /*MODEST_PLATFORM_MAEMO*/
+
/* 'private'/'protected' functions */
static void modest_gtkhtml_msg_view_class_init (ModestGtkhtmlMsgViewClass *klass);
static GtkShadowType modest_gtkhtml_msg_view_get_shadow_type (ModestMsgView *self);
static TnyHeaderFlags modest_gtkhtml_msg_view_get_priority (ModestMsgView *self);
static void modest_gtkhtml_msg_view_set_priority (ModestMsgView *self, TnyHeaderFlags flags);
-static GList *modest_gtkhtml_msg_view_get_selected_attachments (ModestMsgView *self);
-static GList *modest_gtkhtml_msg_view_get_attachments (ModestMsgView *self);
+static TnyList *modest_gtkhtml_msg_view_get_selected_attachments (ModestMsgView *self);
+static TnyList *modest_gtkhtml_msg_view_get_attachments (ModestMsgView *self);
static void modest_gtkhtml_msg_view_grab_focus (ModestMsgView *self);
static void modest_gtkhtml_msg_view_remove_attachment (ModestMsgView *view, TnyMimePart *attachment);
static GtkAdjustment *modest_gtkhtml_msg_view_get_vadjustment_default (ModestMsgView *self);
static GtkShadowType modest_gtkhtml_msg_view_get_shadow_type_default (ModestMsgView *self);
static TnyHeaderFlags modest_gtkhtml_msg_view_get_priority_default (ModestMsgView *self);
static void modest_gtkhtml_msg_view_set_priority_default (ModestMsgView *self, TnyHeaderFlags flags);
-static GList *modest_gtkhtml_msg_view_get_selected_attachments_default (ModestMsgView *self);
-static GList *modest_gtkhtml_msg_view_get_attachments_default (ModestMsgView *self);
+static TnyList *modest_gtkhtml_msg_view_get_selected_attachments_default (ModestMsgView *self);
+static TnyList *modest_gtkhtml_msg_view_get_attachments_default (ModestMsgView *self);
static void modest_gtkhtml_msg_view_grab_focus_default (ModestMsgView *self);
static void modest_gtkhtml_msg_view_remove_attachment_default (ModestMsgView *view, TnyMimePart *attachment);
static GtkShadowType get_shadow_type (ModestGtkhtmlMsgView *self);
static TnyHeaderFlags get_priority (ModestGtkhtmlMsgView *self);
static void set_priority (ModestGtkhtmlMsgView *self, TnyHeaderFlags flags);
-static GList *get_selected_attachments (ModestGtkhtmlMsgView *self);
-static GList *get_attachments (ModestGtkhtmlMsgView *self);
+static TnyList *get_selected_attachments (ModestGtkhtmlMsgView *self);
+static TnyList *get_attachments (ModestGtkhtmlMsgView *self);
static void grab_focus (ModestGtkhtmlMsgView *self);
static void remove_attachment (ModestGtkhtmlMsgView *view, TnyMimePart *attachment);
TnyMimePart *part = NULL;
priv = MODEST_GTKHTML_MSG_VIEW_GET_PRIVATE (self);
-
+
/*
* we search for either something starting with cid:, or something
* with no prefix at all; this latter case occurs when sending mails
*/
if (g_str_has_prefix (uri, "cid:"))
my_uri = uri + 4; /* +4 ==> skip "cid:" */
- else if (g_strstr_len (uri, strlen(uri), ":") == NULL)
- my_uri = uri; /* for outlook, no cid:, we check for ':',
- * so external locations are excluded */
else
- return FALSE; /* we don't support non-embedded images */
+ my_uri = uri;
/* now try to find the embedded image */
part = find_cid_image (priv->msg, my_uri);
return FALSE;
}
- tny_mime_part_decode_to_stream ((TnyMimePart*)part, stream);
+ tny_mime_part_decode_to_stream ((TnyMimePart*)part, stream, NULL);
g_object_unref (G_OBJECT(part));
return TRUE;
}
priv = MODEST_GTKHTML_MSG_VIEW_GET_PRIVATE(self);
gtk_widget_set_no_show_all (priv->mail_header_view, FALSE);
+ html_vadj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (priv->html_scroll));
+ html_vadj->upper = 0;
+ html_vadj->page_size = 0;
+ g_signal_emit_by_name (G_OBJECT (html_vadj), "changed");
+
+
if (msg != priv->msg) {
if (priv->msg)
g_object_unref (G_OBJECT(priv->msg));
if (priv->vadj != NULL)
priv->vadj->value = 0.0;
- html_vadj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (priv->html_scroll));
-
g_signal_emit_by_name (G_OBJECT (html_vadj), "changed");
/* This is a hack to force reallocation of scroll after drawing all the stuff. This
return result;
}
-static GList *
+static TnyList *
get_selected_attachments (ModestGtkhtmlMsgView *self)
{
ModestGtkhtmlMsgViewPrivate *priv;
}
-static GList *
+static TnyList *
get_attachments (ModestGtkhtmlMsgView *self)
{
ModestGtkhtmlMsgViewPrivate *priv;
{
TnyMsgViewIface *klass = (TnyMsgViewIface *)g;
- klass->get_msg_func = modest_msg_view_get_msg;
- klass->set_msg_func = modest_msg_view_set_msg;
- klass->set_unavailable_func = modest_msg_view_set_unavailable;
- klass->clear_func = modest_msg_view_clear;
- klass->create_mime_part_view_for_func = modest_msg_view_create_mime_part_view_for;
- klass->create_new_inline_viewer_func = modest_msg_view_create_new_inline_viewer;
+ klass->get_msg = modest_msg_view_get_msg;
+ klass->set_msg = modest_msg_view_set_msg;
+ klass->set_unavailable = modest_msg_view_set_unavailable;
+ klass->clear = modest_msg_view_clear;
+ klass->create_mime_part_view_for = modest_msg_view_create_mime_part_view_for;
+ klass->create_new_inline_viewer = modest_msg_view_create_new_inline_viewer;
return;
}
{
TnyMimePartViewIface *klass = (TnyMimePartViewIface *)g;
- klass->get_part_func = modest_msg_view_mp_get_part;
- klass->set_part_func = modest_msg_view_mp_set_part;
- klass->clear_func = modest_msg_view_mp_clear;
+ klass->get_part = modest_msg_view_mp_get_part;
+ klass->set_part = modest_msg_view_mp_set_part;
+ klass->clear = modest_msg_view_mp_clear;
return;
}
return get_priority (MODEST_GTKHTML_MSG_VIEW (self));
}
-static GList*
+static TnyList*
modest_gtkhtml_msg_view_get_selected_attachments (ModestMsgView *self)
{
return MODEST_GTKHTML_MSG_VIEW_GET_CLASS (self)->get_selected_attachments_func (self);
}
-static GList*
+static TnyList*
modest_gtkhtml_msg_view_get_selected_attachments_default (ModestMsgView *self)
{
return get_selected_attachments (MODEST_GTKHTML_MSG_VIEW (self));
}
-static GList*
+static TnyList*
modest_gtkhtml_msg_view_get_attachments (ModestMsgView *self)
{
return MODEST_GTKHTML_MSG_VIEW_GET_CLASS (self)->get_attachments_func (self);
}
-static GList*
+static TnyList*
modest_gtkhtml_msg_view_get_attachments_default (ModestMsgView *self)
{
return get_attachments (MODEST_GTKHTML_MSG_VIEW (self));
{
remove_attachment (MODEST_GTKHTML_MSG_VIEW (self), attachment);
}
-