static void
modest_msg_view_window_construct (ModestMsgViewWindow *self,
const gchar *modest_account_name,
+ const gchar *mailbox,
const gchar *msg_uid)
{
GObject *obj = NULL;
obj);
modest_window_set_active_account (MODEST_WINDOW(obj), modest_account_name);
+ modest_window_set_active_mailbox (MODEST_WINDOW(obj), mailbox);
g_signal_connect (G_OBJECT (priv->find_toolbar), "close", G_CALLBACK (modest_msg_view_window_find_toolbar_close), obj);
g_signal_connect (G_OBJECT (priv->find_toolbar), "search", G_CALLBACK (modest_msg_view_window_find_toolbar_search), obj);
ModestWindow *
modest_msg_view_window_new_with_header_model (TnyMsg *msg,
const gchar *modest_account_name,
+ const gchar *mailbox,
const gchar *msg_uid,
GtkTreeModel *model,
GtkTreeRowReference *row_reference)
window = MODEST_MSG_VIEW_WINDOW (modest_window_mgr_get_msg_view_window (mgr));
g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window), NULL);
- modest_msg_view_window_construct (window, modest_account_name, msg_uid);
+ modest_msg_view_window_construct (window, modest_account_name, mailbox, msg_uid);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
ModestWindow *
modest_msg_view_window_new_from_header_view (ModestHeaderView *header_view,
const gchar *modest_account_name,
+ const gchar *mailbox,
const gchar *msg_uid,
GtkTreeRowReference *row_reference)
{
window = MODEST_MSG_VIEW_WINDOW (modest_window_mgr_get_msg_view_window (mgr));
g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window), NULL);
- modest_msg_view_window_construct (window, modest_account_name, msg_uid);
+ modest_msg_view_window_construct (window, modest_account_name, mailbox, msg_uid);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
ModestWindow *
modest_msg_view_window_new_for_search_result (TnyMsg *msg,
const gchar *modest_account_name,
+ const gchar *mailbox,
const gchar *msg_uid)
{
ModestMsgViewWindow *window = NULL;
mgr = modest_runtime_get_window_mgr ();
window = MODEST_MSG_VIEW_WINDOW (modest_window_mgr_get_msg_view_window (mgr));
g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window), NULL);
- modest_msg_view_window_construct (window, modest_account_name, msg_uid);
+ modest_msg_view_window_construct (window, modest_account_name, mailbox, msg_uid);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
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,
+ const gchar *msg_uid)
{
GObject *obj = NULL;
ModestMsgViewWindowPrivate *priv;
obj = G_OBJECT (modest_window_mgr_get_msg_view_window (mgr));
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (obj);
modest_msg_view_window_construct (MODEST_MSG_VIEW_WINDOW (obj),
- modest_account_name, msg_uid);
+ modest_account_name, mailbox, msg_uid);
tny_msg_view_set_msg (TNY_MSG_VIEW (priv->msg_view), msg);
update_window_title (MODEST_MSG_VIEW_WINDOW (obj));
/* it's not found, so create a new window for it */
modest_window_mgr_register_header (mgr, header, attachment_uid); /* register the uid before building the window */
gchar *account = g_strdup (modest_window_get_active_account (MODEST_WINDOW (window)));
+ const gchar *mailbox = modest_window_get_active_mailbox (MODEST_WINDOW (window));
if (!account)
account = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr ());
- msg_win = modest_msg_view_window_new_for_attachment (TNY_MSG (mime_part), account, attachment_uid);
+ msg_win = modest_msg_view_window_new_for_attachment (TNY_MSG (mime_part), account,
+ mailbox, attachment_uid);
modest_window_set_zoom (MODEST_WINDOW (msg_win),
modest_window_get_zoom (MODEST_WINDOW (window)));
modest_window_mgr_register_window (mgr, msg_win, MODEST_WINDOW (window));