diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-10-01 05:18:36 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-10-01 08:18:37 +0800 |
commit | da3ae4fd5fa723abc4574d0459c761e76abba080 (patch) | |
tree | 113415662629730c0fc6016106d5da702122c1a0 /composer/e-msg-composer.c | |
parent | 3287e3ff911224203f296972cd221d9e667ad674 (diff) | |
download | gsoc2013-evolution-da3ae4fd5fa723abc4574d0459c761e76abba080.tar.gz gsoc2013-evolution-da3ae4fd5fa723abc4574d0459c761e76abba080.tar.zst gsoc2013-evolution-da3ae4fd5fa723abc4574d0459c761e76abba080.zip |
Various composer autosave fixes.
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 2450212bd9..246a0906b9 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1262,8 +1262,24 @@ autosave_load_draft_cb (EMsgComposer *composer, GAsyncResult *result, gchar *filename) { - if (e_composer_autosave_snapshot_finish (composer, result, NULL)) + GError *error = NULL; + + if (e_composer_autosave_snapshot_finish (composer, result, &error)) g_unlink (filename); + + else { + e_error_run ( + GTK_WINDOW (composer), + "mail-composer:no-autosave", + (filename != NULL) ? filename : "", + (error != NULL) ? error->message : + _("Unable to reconstruct message from autosave file"), + NULL); + + if (error != NULL) + g_error_free (error); + } + g_free (filename); } @@ -1276,8 +1292,6 @@ autosave_load_draft (const gchar *filename) g_return_val_if_fail (filename != NULL, NULL); - g_warning ("autosave load filename = \"%s\"", filename); - if (!(stream = camel_stream_fs_new_with_name (filename, O_RDONLY, 0))) return NULL; |