+
+void
+modest_msg_view_window_fetch_images (ModestMsgViewWindow *self)
+{
+ ModestMsgViewWindowPrivate *priv;
+ priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (self);
+
+ modest_msg_view_request_fetch_images (MODEST_MSG_VIEW (priv->msg_view));
+}
+
+gboolean
+modest_msg_view_window_has_blocked_external_images (ModestMsgViewWindow *self)
+{
+ ModestMsgViewWindowPrivate *priv;
+ priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (self);
+
+ g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (self), FALSE);
+
+ return modest_msg_view_has_blocked_external_images (MODEST_MSG_VIEW (priv->msg_view));
+}
+
+void
+modest_msg_view_window_reload (ModestMsgViewWindow *self)
+{
+ ModestMsgViewWindowPrivate *priv;
+ TnyHeader *header;
+
+ g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW (self));
+
+ priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (self);
+ header = modest_msg_view_window_get_header (MODEST_MSG_VIEW_WINDOW (self));
+
+ if (!message_reader (self, priv, header, priv->row_reference)) {
+ g_warning ("Shouldn't happen, trying to reload a message failed");
+ }
+
+ g_object_unref (header);
+}
+
+static void
+update_branding (ModestMsgViewWindow *self)
+{
+ const gchar *account;
+ const gchar *mailbox;
+ ModestAccountMgr *mgr;
+ ModestProtocol *protocol = NULL;
+ gchar *service_name = NULL;
+ const GdkPixbuf *service_icon = NULL;
+ ModestMsgViewWindowPrivate *priv;
+
+ priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (self);
+
+ account = modest_window_get_active_account (MODEST_WINDOW (self));
+ mailbox = modest_window_get_active_mailbox (MODEST_WINDOW (self));
+
+ mgr = modest_runtime_get_account_mgr ();
+
+ if (modest_account_mgr_account_is_multimailbox (mgr, account, &protocol)) {
+ if (MODEST_IS_ACCOUNT_PROTOCOL (protocol)) {
+ service_name = modest_account_protocol_get_service_name (MODEST_ACCOUNT_PROTOCOL (protocol),
+ account, mailbox);
+ service_icon = modest_account_protocol_get_service_icon (MODEST_ACCOUNT_PROTOCOL (protocol),
+ account, mailbox, MODEST_ICON_SIZE_SMALL);
+ }
+ }
+
+ modest_msg_view_set_branding (MODEST_MSG_VIEW (priv->msg_view), service_name, service_icon);
+ g_free (service_name);
+}