diff options
author | 2 <NotZed@Ximian.com> | 2001-11-03 08:01:39 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-11-03 08:01:39 +0800 |
commit | 8fcca3dc0b5e3355977230ce61dc172652e69032 (patch) | |
tree | 7d71adb32ffc404a06af97487583a5eda5c32582 /composer/e-msg-composer.c | |
parent | d2e6a28e22a2352d4622265693405b3f193c6aee (diff) | |
download | gsoc2013-evolution-8fcca3dc0b5e3355977230ce61dc172652e69032.tar.gz gsoc2013-evolution-8fcca3dc0b5e3355977230ce61dc172652e69032.tar.zst gsoc2013-evolution-8fcca3dc0b5e3355977230ce61dc172652e69032.zip |
New function, enable/disable autosave for the composer temporarily.
2001-11-02 <NotZed@Ximian.com>
* e-msg-composer.c (e_msg_composer_set_enable_autosave): New
function, enable/disable autosave for the composer temporarily.
(autosave_run_foreach_cb): Only save if we have enable autosave
turned on. In other cases we want to save it regardless.
svn path=/trunk/; revision=14574
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 4825e3b4f0..ec3fea9578 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1207,7 +1207,8 @@ autosave_run_foreach_cb (gpointer key, gpointer value, gpointer data) { EMsgComposer *composer = E_MSG_COMPOSER (value); - autosave_save_draft (composer); + if (composer->enable_autosave) + autosave_save_draft (composer); } static gint @@ -3841,4 +3842,14 @@ e_msg_composer_is_dirty (EMsgComposer *composer) return dirty; } +void +e_msg_composer_set_enable_autosave (EMsgComposer *composer, gboolean enabled) +{ + g_return_if_fail (composer != NULL); + g_return_if_fail (E_IS_MSG_COMPOSER (composer)); + + composer->enable_autosave = enabled; +} + + |