main_window_cursor_normal(mainwin);
}
-void clean_quit(void)
+static void draft_all_messages(void)
{
GList * compose_list = compose_get_compose_list();
GList * elem = NULL;
Compose *c = (Compose*)elem->data;
compose_draft(c);
}
- }
+ }
+}
+
+void clean_quit(void)
+{
+ draft_all_messages();
+
if (prefs_common.warn_queued_on_exit)
{ /* disable the popup */
prefs_common.warn_queued_on_exit = FALSE;
{
MainWindow *mainwin = data;
gchar *filename;
-
+
if (compose_get_compose_list()) {
- if (alertpanel(_("Notice"),
- _("Composing message exists. Really quit?"),
- _("OK"), _("Cancel"), NULL) != G_ALERTDEFAULT)
- return;
+ gint val = alertpanel(_("Notice"),
+ _("Composing message exists."),
+ _("Draft them"), _("Discard them"), _("Don't quit"));
+ switch (val) {
+ case G_ALERTOTHER:
+ return;
+ case G_ALERTALTERNATE:
+ break;
+ default:
+ draft_all_messages();
+ }
+
manage_window_focus_in(mainwin->window, NULL, NULL);
}
alertpanel_error(_("Some errors occurred while sending queued messages."));
statusbar_pop_all();
folder_item_scan(folder->queue);
- folderview_update_item(folder->queue, TRUE);
if (prefs_common.savemsg && folder->outbox) {
- folderview_update_item(folder->outbox, TRUE);
+ folder_update_item(folder->outbox, TRUE);
if (folder->outbox == def_outbox)
def_outbox = NULL;
}
}
if (prefs_common.savemsg && def_outbox)
- folderview_update_item(def_outbox, TRUE);
+ folder_update_item(def_outbox, TRUE);
}