aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog11
-rw-r--r--composer/e-composer-actions.c5
-rw-r--r--composer/e-composer-autosave.c4
-rw-r--r--composer/e-msg-composer.c8
-rw-r--r--composer/e-msg-composer.h2
5 files changed, 26 insertions, 4 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 181663513d..d7ea83a417 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,14 @@
+2008-09-01 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #545661
+
+ * e-composer-autosave.c: (e_composer_autosave_snapshot):
+ Do not mark composer as not changed, that's not truth possibly.
+ * e-msg-composer.h: (e_msg_composer_is_exiting):
+ * e-msg-composer.c: (e_msg_composer_is_exiting):
+ * e-composer-actions.c: (action_close_cb): Skip question
+ for "not-saved" only when not changed or application is exiting.
+
2008-08-27 Sankar P <psankar@novell.com>
License Changes
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index 07ec555452..e16a207005 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -127,9 +127,8 @@ action_close_cb (GtkAction *action,
editor = GTKHTML_EDITOR (composer);
widget = GTK_WIDGET (composer);
- if (!gtkhtml_editor_get_changed (editor) &&
- e_composer_autosave_get_saved (composer)) {
-
+ if (!gtkhtml_editor_get_changed (editor) ||
+ e_msg_composer_is_exiting (composer)) {
gtk_widget_destroy (widget);
return;
}
diff --git a/composer/e-composer-autosave.c b/composer/e-composer-autosave.c
index dca539b89b..298184b60f 100644
--- a/composer/e-composer-autosave.c
+++ b/composer/e-composer-autosave.c
@@ -324,7 +324,9 @@ e_composer_autosave_snapshot (EMsgComposer *composer)
}
/* Snapshot was successful; set various flags. */
- gtkhtml_editor_set_changed (editor, FALSE);
+ /* do not touch "changed" flag, this is only autosave,
+ which doesn't mean it's saved permanently */
+
e_composer_autosave_set_saved (composer, TRUE);
camel_object_unref (message);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index e1615073e6..3a077c0aa6 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4597,6 +4597,14 @@ e_msg_composer_set_enable_autosave (EMsgComposer *composer,
}
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;
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 8236c9cda0..9b4af0c662 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -156,6 +156,8 @@ struct _EAttachmentBar *
e_msg_composer_get_attachment_bar
(EMsgComposer *composer);
+gboolean e_msg_composer_is_exiting (EMsgComposer *composer);
+
G_END_DECLS
#endif /* E_MSG_COMPOSER_H */