* src/modest-text-utils.[ch]:
[modest] / src / widgets / modest-gtkhtml-msg-view.c
index bb8e8a6..ec9b7bf 100644 (file)
@@ -148,8 +148,8 @@ static void modest_gtkhtml_msg_view_set_shadow_type (ModestMsgView *self, GtkSha
 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);
@@ -160,8 +160,8 @@ static void modest_gtkhtml_msg_view_set_shadow_type_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);
 
@@ -181,8 +181,8 @@ static void set_shadow_type (ModestGtkhtmlMsgView *self, GtkShadowType type);
 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);
 
@@ -1387,7 +1387,7 @@ on_fetch_url (GtkWidget *widget, const gchar *uri,
        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
@@ -1395,11 +1395,8 @@ on_fetch_url (GtkWidget *widget, const gchar *uri,
         */
        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);
@@ -1408,7 +1405,7 @@ on_fetch_url (GtkWidget *widget, const gchar *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;
 }
@@ -1636,7 +1633,7 @@ search_next (ModestGtkhtmlMsgView *self)
        return result;
 }
 
-static GList *
+static TnyList *
 get_selected_attachments (ModestGtkhtmlMsgView *self)
 {
        ModestGtkhtmlMsgViewPrivate *priv;
@@ -1648,7 +1645,7 @@ get_selected_attachments (ModestGtkhtmlMsgView *self)
        
 }
 
-static GList *
+static TnyList *
 get_attachments (ModestGtkhtmlMsgView *self)
 {
        ModestGtkhtmlMsgViewPrivate *priv;
@@ -1692,12 +1689,12 @@ tny_msg_view_init (gpointer g, gpointer iface_data)
 {
        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;
 }
@@ -1789,9 +1786,9 @@ tny_mime_part_view_init (gpointer g, gpointer iface_data)
 {
        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;
 }
@@ -2073,25 +2070,25 @@ modest_gtkhtml_msg_view_get_priority_default (ModestMsgView *self)
        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));
@@ -2120,4 +2117,3 @@ modest_gtkhtml_msg_view_remove_attachment_default (ModestMsgView *self, TnyMimeP
 {
        remove_attachment (MODEST_GTKHTML_MSG_VIEW (self), attachment);
 }
-