+ /* Save settings if the user clicked on done */
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
+ TnyHeaderFlags flags;
+ ModestMsgEditFormat old_format, new_format;
+
+ /* Set priority flags */
+ flags = (TnyHeaderFlags) g_object_get_data (G_OBJECT (helper.current_priority), "priority");
+ if (priv->priority_flags != flags)
+ modest_msg_edit_window_set_priority_flags (window, flags);
+
+ /* Set edit format */
+ old_format = modest_msg_edit_window_get_format (window);
+ new_format = (ModestMsgEditFormat) g_object_get_data (G_OBJECT (helper.current_format), "format");
+ if (old_format != new_format) {
+ gint file_format = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (helper.current_format), "file-format"));
+ modest_msg_edit_window_set_file_format (window, file_format);
+ }
+ }