- } else {
- if (MODEST_IS_MSG_EDIT_WINDOW (window))
- /* Save currently edited message to Drafts */
- if (modest_msg_edit_window_is_modified (MODEST_MSG_EDIT_WINDOW (window))) {
- gint response =
- modest_platform_run_confirmation_dialog (GTK_WINDOW (self),
+ }
+ else {
+ if (MODEST_IS_MSG_EDIT_WINDOW (window)) {
+ gboolean sent = FALSE;
+ gint response = GTK_RESPONSE_ACCEPT;
+ sent = modest_msg_edit_window_get_sent (MODEST_MSG_EDIT_WINDOW (window));
+ /* Save currently edited message to Drafts if it was not sent */
+ if (!sent && modest_msg_edit_window_is_modified (MODEST_MSG_EDIT_WINDOW (window))) {
+
+ response =
+ modest_platform_run_confirmation_dialog (GTK_WINDOW (window),