ModestConf *conf;
gboolean prefer_formatted;
gint file_format;
+ ModestPair *account_pair = NULL;
g_return_val_if_fail (msg, NULL);
g_return_val_if_fail (account_name, NULL);
setup_insensitive_handlers (MODEST_MSG_EDIT_WINDOW (obj));
+ account_pair = modest_pair_list_find_by_first_as_string (priv->from_field_protos, account_name);
+ if (account_pair != NULL)
+ modest_combo_box_set_active_id (MODEST_COMBO_BOX (priv->from_field), account_pair->first);
+
set_msg (MODEST_MSG_EDIT_WINDOW (obj), msg);
text_buffer_refresh_attributes (WP_TEXT_BUFFER (priv->text_buffer), MODEST_MSG_EDIT_WINDOW (obj));
return;
}
- account_name = g_strdup(modest_window_get_active_account (win));
+ account_name = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr ());
if (!account_name)
- account_name = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
+ account_name = g_strdup (modest_window_get_active_account (win));
if (!account_name) {
g_printerr ("modest: no account found\n");
goto cleanup;
headers_action_mark_as_read (header, MODEST_WINDOW(parent_win), NULL);
/* Get account */
- account = g_strdup (modest_window_get_active_account (MODEST_WINDOW (parent_win)));
+ account = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
if (!account)
- account = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
+ account = g_strdup (modest_window_get_active_account (MODEST_WINDOW (parent_win)));
/* Gets folder type (OUTBOX headers will be opened in edit window */
if (modest_tny_folder_is_local_folder (folder))