TnyFolder *folder = NULL;
TnyMsg *msg = NULL;
ModestWindowMgr *mgr;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GtkTreeSelection *sel = NULL;
+ GList *sel_list = NULL;
g_return_if_fail (MODEST_IS_MAIN_WINDOW(main_window));
if (!account)
account = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
- win = modest_msg_view_window_new (msg, account);
+ sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (folder_view));
+ sel_list = gtk_tree_selection_get_selected_rows (sel, &model);
+ if (sel_list != NULL) {
+ gtk_tree_model_get_iter (model, &iter, (GtkTreePath *) sel_list->data);
+
+ win = modest_msg_view_window_new_with_header_model (msg, account, model, iter);
+ g_list_foreach (sel_list, (GFunc) gtk_tree_path_free, NULL);
+ g_list_free (sel_list);
+ } else {
+ win = modest_msg_view_window_new (msg, account);
+ }
modest_window_mgr_register_window (mgr, win);
gtk_window_set_transient_for (GTK_WINDOW (win),
ModestAccountMgr *account_mgr;
g_return_if_fail (MODEST_IS_MSG_EDIT_WINDOW(edit_window));
+
+ if (!modest_msg_edit_window_check_names (edit_window))
+ return;
data = modest_msg_edit_window_get_msg_data (edit_window);
modest_msg_edit_window_select_contacts (window);
}
+void
+modest_ui_actions_on_check_names (GtkAction *action, ModestMsgEditWindow *window)
+{
+ g_return_if_fail (MODEST_IS_MSG_EDIT_WINDOW (window));
+ modest_msg_edit_window_check_names (window);
+}
+
static GtkWidget*
create_move_to_dialog (ModestWindow *win,