2007-06-19 [colin] 2.9.2cvs71

* src/compose.c
	* src/messageview.c
		Fix crash mentioned in bug 1246
		Race condition when automatically drafting
		due to insertion on reedit.
This commit is contained in:
Colin Leroy 2007-06-19 21:36:55 +00:00
parent aa14a4942b
commit cd3ae7ab6d
5 changed files with 21 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2007-06-19 [colin] 2.9.2cvs71
* src/compose.c
* src/messageview.c
Fix crash mentioned in bug 1246
Race condition when automatically drafting
due to insertion on reedit.
2007-06-18 [wwp] 2.9.2cvs70
* src/importldif.c

View file

@ -2646,3 +2646,4 @@
( cvs diff -u -r 1.12.2.12 -r 1.12.2.13 src/ldif.c; cvs diff -u -r 1.14.2.13 -r 1.14.2.14 src/importldif.c; ) > 2.9.2cvs68.patchset
( cvs diff -u -r 1.654.2.2699 -r 1.654.2.2700 configure.ac; ) > 2.9.2cvs69.patchset
( cvs diff -u -r 1.14.2.14 -r 1.14.2.15 src/importldif.c; ) > 2.9.2cvs70.patchset
( cvs diff -u -r 1.382.2.390 -r 1.382.2.391 src/compose.c; cvs diff -u -r 1.94.2.135 -r 1.94.2.136 src/messageview.c; ) > 2.9.2cvs71.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=9
MICRO_VERSION=2
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=70
EXTRA_VERSION=71
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -1505,6 +1505,7 @@ static Compose *compose_generic_reply(MsgInfo *msginfo,
compose_set_title(compose);
compose->updating = FALSE;
compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
if (compose->deferred_destroy) {
compose_destroy(compose);
@ -1650,6 +1651,7 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
compose_set_title(compose);
compose->updating = FALSE;
compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
if (compose->deferred_destroy) {
compose_destroy(compose);
@ -1751,6 +1753,7 @@ static Compose *compose_forward_multiple(PrefsAccount *account, GSList *msginfo_
compose_set_title(compose);
compose->updating = FALSE;
compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
if (compose->deferred_destroy) {
compose_destroy(compose);
@ -2036,6 +2039,7 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch)
compose_set_title(compose);
compose->updating = FALSE;
compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
if (compose->deferred_destroy) {
compose_destroy(compose);
@ -2144,6 +2148,7 @@ Compose *compose_redirect(PrefsAccount *account, MsgInfo *msginfo,
compose->modified = FALSE;
compose_set_title(compose);
compose->updating = FALSE;
compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
if (compose->deferred_destroy) {
compose_destroy(compose);
@ -6623,7 +6628,7 @@ static Compose *compose_create(PrefsAccount *account,
compose->exteditor_file = NULL;
compose->exteditor_pid = -1;
compose->exteditor_tag = -1;
compose->draft_timeout_tag = -1;
compose->draft_timeout_tag = -2; /* inhibit auto-drafting while loading */
#if USE_ASPELL
menu_set_sensitive(ifactory, "/Spelling", FALSE);
@ -8218,7 +8223,7 @@ static void compose_send_cb(gpointer data, guint action, GtkWidget *widget)
"to send this email.")))
return;
if (compose->draft_timeout_tag != -1) { /* CLAWS: disable draft timeout */
if (compose->draft_timeout_tag >= 0) { /* CLAWS: disable draft timeout */
g_source_remove(compose->draft_timeout_tag);
compose->draft_timeout_tag = -1;
}
@ -9636,7 +9641,8 @@ static void text_inserted(GtkTextBuffer *buffer, GtkTextIter *iter,
g_signal_stop_emission_by_name(G_OBJECT(buffer), "insert-text");
if (prefs_common.autosave &&
gtk_text_buffer_get_char_count(buffer) % prefs_common.autosave_length == 0)
gtk_text_buffer_get_char_count(buffer) % prefs_common.autosave_length == 0 &&
compose->draft_timeout_tag != -2 /* disabled while loading */)
compose->draft_timeout_tag = g_timeout_add
(500, (GtkFunction) compose_defer_auto_save_draft, compose);
}

View file

@ -888,11 +888,11 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
main_create_mailing_list_menu(messageview->mainwin, messageview->msginfo);
if (messageview->msginfo->extradata
if (messageview->msginfo && messageview->msginfo->extradata
&& messageview->msginfo->extradata->partial_recv)
partial_recv_show(messageview->noticeview,
messageview->msginfo);
else if (messageview->msginfo->extradata &&
else if (messageview->msginfo && messageview->msginfo->extradata &&
(messageview->msginfo->extradata->dispositionnotificationto ||
messageview->msginfo->extradata->returnreceiptto) &&
!MSG_IS_RETRCPT_SENT(messageview->msginfo->flags) &&