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 | |
parent | d2e6a28e22a2352d4622265693405b3f193c6aee (diff) | |
download | gsoc2013-evolution-8fcca3dc0b5e3355977230ce61dc172652e69032.tar gsoc2013-evolution-8fcca3dc0b5e3355977230ce61dc172652e69032.tar.gz gsoc2013-evolution-8fcca3dc0b5e3355977230ce61dc172652e69032.tar.bz2 gsoc2013-evolution-8fcca3dc0b5e3355977230ce61dc172652e69032.tar.lz gsoc2013-evolution-8fcca3dc0b5e3355977230ce61dc172652e69032.tar.xz 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')
-rw-r--r-- | composer/ChangeLog | 7 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 13 | ||||
-rw-r--r-- | composer/e-msg-composer.h | 3 |
3 files changed, 22 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 05e91395b7..74ccb2f27d 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,10 @@ +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. + 2001-10-30 Dan Winship <danw@ximian.com> * e-msg-composer.c (build_message): Add back the "remove 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; +} + + diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h index dab1db16bf..2f8badf908 100644 --- a/composer/e-msg-composer.h +++ b/composer/e-msg-composer.h @@ -95,6 +95,8 @@ struct _EMsgComposer { gboolean has_changed : 1; gboolean in_signature_insert : 1; + + gboolean enable_autosave : 1; }; struct _EMsgComposerClass { @@ -159,6 +161,7 @@ gchar * e_msg_composer_guess_mime_type (const gchar *file_name); void e_msg_composer_set_changed (EMsgComposer *composer); void e_msg_composer_unset_changed (EMsgComposer *composer); gboolean e_msg_composer_is_dirty (EMsgComposer *composer); +void e_msg_composer_set_enable_autosave (EMsgComposer *composer, gboolean enabled); /* PGP */ void e_msg_composer_set_pgp_sign (EMsgComposer *composer, |