aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
author2 <NotZed@Ximian.com>2001-11-03 08:01:39 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-11-03 08:01:39 +0800
commit8fcca3dc0b5e3355977230ce61dc172652e69032 (patch)
tree7d71adb32ffc404a06af97487583a5eda5c32582 /composer
parentd2e6a28e22a2352d4622265693405b3f193c6aee (diff)
downloadgsoc2013-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')
-rw-r--r--composer/ChangeLog7
-rw-r--r--composer/e-msg-composer.c13
-rw-r--r--composer/e-msg-composer.h3
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,
span>/+3 * Oops. Forgot the language categories.lofi2004-05-073-3/+4 * Update to KDE 3.2.1 / QT 3.3.1lofi2004-03-101-0/+1 * Update to KDE 3.2.0lofi2004-02-053-15/+26 * Add USE_GETTEXT and bump PORTREVISION.marcus2004-02-041-2/+2 * Now gettext 0.12.1 is gettext-old.trevor2004-01-241-1/+1 * Bring back from Attic: localized messages and documentation for kofficelioux2003-05-204-0/+138 * KDE2 is dead. The source is no longer available.alane2002-09-095-66/+0 * Chase shlib rev of devel/gettextade2002-08-021-1/+1 * gettext upgrade uber-patch (stage 3)ade2002-04-131-1/+2 * Stage 1 of gettext update.ade2002-03-161-1/+1 * Update to 1.1.1.demon2001-12-263-2/+8