diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-10-01 00:21:41 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-10-01 00:21:41 +0800 |
commit | 983bea9996458f5b5f03e22b22ebd1a5203b7180 (patch) | |
tree | fcc02ac5f1083def0bd4d1509d297341d10b272f /composer/e-msg-composer.c | |
parent | aa2bed6ae369073152cc889a86055878125a60db (diff) | |
download | gsoc2013-evolution-983bea9996458f5b5f03e22b22ebd1a5203b7180.tar.gz gsoc2013-evolution-983bea9996458f5b5f03e22b22ebd1a5203b7180.tar.zst gsoc2013-evolution-983bea9996458f5b5f03e22b22ebd1a5203b7180.zip |
Remove some unneeded composer autosave bits.
Closing the last main window no longer takes composer windows down with
it, so we no longer need the "holy crap we're shutting down, quick save
to disk!" logic.
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 072eb41690..5561623f61 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1499,14 +1499,6 @@ static void msg_composer_dispose (GObject *object) { EMsgComposer *composer = E_MSG_COMPOSER (object); - gboolean delete_file; - - /* If the application is exiting, keep the autosave file so we can - * restore it later. Otherwise we're just closing this composer - * window, and the CLOSE action has already handled any unsaved - * changes, so we can safely delete the autosave file. */ - delete_file = !composer->priv->application_exiting; - e_composer_autosave_unregister (composer, delete_file); e_composer_private_dispose (composer); @@ -1519,6 +1511,7 @@ msg_composer_finalize (GObject *object) { EMsgComposer *composer = E_MSG_COMPOSER (object); + e_composer_autosave_unregister (composer); e_composer_private_finalize (composer); /* Chain up to parent's finalize() method. */ @@ -3872,44 +3865,6 @@ e_msg_composer_set_enable_autosave (EMsgComposer *composer, e_composer_autosave_set_enabled (composer, enabled); } -gboolean -e_msg_composer_is_exiting (EMsgComposer *composer) -{ - g_return_val_if_fail (composer != NULL, FALSE); - - return composer->priv->application_exiting; -} - -gboolean -e_msg_composer_request_close_all (void) -{ - GSList *iter, *next; - - for (iter = all_composers; iter != NULL; iter = next) { - EMsgComposer *composer = iter->data; - - /* The CLOSE action will delete this list node, - * so grab the next one while we still can. */ - next = iter->next; - - /* Try to autosave before closing. If it fails for - * some reason, the CLOSE action will still detect - * unsaved changes and prompt the user. - * - * FIXME If it /does/ prompt the user, the Cancel - * button will act the same as Discard Changes, - * which is misleading. - */ - composer->priv->application_exiting = TRUE; - e_composer_autosave_snapshot_async (composer, - (GAsyncReadyCallback) e_composer_autosave_snapshot_finish, - NULL); - gtk_action_activate (ACTION (CLOSE)); - } - - return (all_composers == NULL); -} - EMsgComposer * e_msg_composer_load_from_file (const gchar *filename) { |