#include <modest-runtime.h>
#include <modest-main-window-ui.h>
#include "modest-msg-view-window-ui-dimming.h"
-
+#include "modest-defs.h"
#include <widgets/modest-msg-view-window.h>
#include <widgets/modest-window-priv.h>
#include "widgets/modest-msg-view.h"
ModestWindow *
modest_msg_view_window_new_for_attachment (TnyMsg *msg,
- const gchar *modest_account_name,
- const gchar *msg_uid)
+ const gchar *modest_account_name,
+ const gchar *mailbox, /* ignored */
+ const gchar *msg_uid)
{
GObject *obj;
ModestMsgViewWindowPrivate *priv;
GtkActionGroup *action_group;
GError *error = NULL;
TnyHeader *header = NULL;
- const gchar *subject = NULL;
+ gchar *subject = NULL;
ModestDimmingRulesGroup *menu_rules_group = NULL;
ModestDimmingRulesGroup *toolbar_rules_group = NULL;
ModestDimmingRulesGroup *clipboard_rules_group = NULL;
header = tny_msg_get_header (msg);
if (header)
- subject = tny_header_get_subject (header);
+ subject = tny_header_dup_subject (header);
if (subject != NULL)
gtk_window_set_title (GTK_WINDOW (obj), subject);
else
gtk_window_set_title (GTK_WINDOW(obj), "Modest");
+ g_free (subject);
if (header)
g_object_unref (header);
return NULL;
header = tny_msg_get_header (msg);
+ g_free (priv->msg_uid);
if (header) {
- retval = tny_header_get_uid (header);
+ priv->msg_uid = tny_header_dup_uid (header);
g_object_unref (header);
}
g_object_unref (msg);
- return retval;
+ return priv->msg_uid;
}
ModestWindow*
modest_msg_view_window_new_with_header_model (TnyMsg *msg,
const gchar *modest_account_name,
+ const gchar *mailbox, /*ignored*/
const gchar *msg_uid,
GtkTreeModel *model,
GtkTreeRowReference *row_reference)
actions */
g_message ("partially implemented %s", __FUNCTION__);
- return modest_msg_view_window_new_for_attachment (msg, modest_account_name, msg_uid);
+ return modest_msg_view_window_new_for_attachment (msg, modest_account_name, NULL, msg_uid);
}
g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
return FALSE;
}
+
+void
+modest_msg_view_window_add_to_contacts (ModestMsgViewWindow *self)
+{
+ modest_ui_actions_on_add_to_contacts (NULL, MODEST_WINDOW (self));
+}
+
+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)
+{
+ /* Not implemented */
+ return;
+}