evolution r36241 - trunk/composer



Author: msuman
Date: Mon Sep  1 04:35:02 2008
New Revision: 36241
URL: http://svn.gnome.org/viewvc/evolution?rev=36241&view=rev

Log:
Milan Crha  <mcrha redhat com> ** Fix for bug #545661 (Skip question for not-saved only when not changed or application is exiting).

Modified:
   trunk/composer/ChangeLog
   trunk/composer/e-composer-actions.c
   trunk/composer/e-composer-autosave.c
   trunk/composer/e-msg-composer.c
   trunk/composer/e-msg-composer.h

Modified: trunk/composer/e-composer-actions.c
==============================================================================
--- trunk/composer/e-composer-actions.c	(original)
+++ trunk/composer/e-composer-actions.c	Mon Sep  1 04:35:02 2008
@@ -127,9 +127,8 @@
 	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;
 	}

Modified: trunk/composer/e-composer-autosave.c
==============================================================================
--- trunk/composer/e-composer-autosave.c	(original)
+++ trunk/composer/e-composer-autosave.c	Mon Sep  1 04:35:02 2008
@@ -324,7 +324,9 @@
 	}
 
 	/* 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);

Modified: trunk/composer/e-msg-composer.c
==============================================================================
--- trunk/composer/e-msg-composer.c	(original)
+++ trunk/composer/e-msg-composer.c	Mon Sep  1 04:35:02 2008
@@ -4597,6 +4597,14 @@
 }
 
 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;

Modified: trunk/composer/e-msg-composer.h
==============================================================================
--- trunk/composer/e-msg-composer.h	(original)
+++ trunk/composer/e-msg-composer.h	Mon Sep  1 04:35:02 2008
@@ -156,6 +156,8 @@
 		e_msg_composer_get_attachment_bar
 						(EMsgComposer *composer);
 
+gboolean	e_msg_composer_is_exiting (EMsgComposer *composer);
+
 G_END_DECLS
 
 #endif /* E_MSG_COMPOSER_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]