diff options
author | Milan Crha <mcrha@redhat.com> | 2008-09-29 18:07:12 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-09-29 18:07:12 +0800 |
commit | 0679411d0e2e43981501cbf0f84ec2ca5ea1d655 (patch) | |
tree | 8031ccf584ca64dcaade3f9465e3196966c01521 /mail | |
parent | 18396b557b013266a840f618c2b9b6cc0ff87bf7 (diff) | |
download | gsoc2013-evolution-0679411d0e2e43981501cbf0f84ec2ca5ea1d655.tar gsoc2013-evolution-0679411d0e2e43981501cbf0f84ec2ca5ea1d655.tar.gz gsoc2013-evolution-0679411d0e2e43981501cbf0f84ec2ca5ea1d655.tar.bz2 gsoc2013-evolution-0679411d0e2e43981501cbf0f84ec2ca5ea1d655.tar.lz gsoc2013-evolution-0679411d0e2e43981501cbf0f84ec2ca5ea1d655.tar.xz gsoc2013-evolution-0679411d0e2e43981501cbf0f84ec2ca5ea1d655.tar.zst gsoc2013-evolution-0679411d0e2e43981501cbf0f84ec2ca5ea1d655.zip |
** Fix for bug #530716
2008-09-29 Milan Crha <mcrha@redhat.com>
** Fix for bug #530716
* mail/mail-session.c: (user_message_response), (user_message_exec),
(user_message_response_free): Differentiate between response
with valid message pointer and with one already freed.
* widgets/misc/e-activity-handler.c: (error_cleanup): GtkDialog errors close
by the response message, not as other widgets, because creator
of the dialog waits for that signal and takes care of the widget.
svn path=/trunk/; revision=36473
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/mail-session.c | 28 |
2 files changed, 25 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index c73a4511b4..c14f4f07b3 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,13 @@ 2008-09-29 Milan Crha <mcrha@redhat.com> + ** Fix for bug #530716 + + * mail-session.c: (user_message_response), (user_message_exec), + (user_message_response_free): Differentiate between response + with valid message pointer and with one already freed. + +2008-09-29 Milan Crha <mcrha@redhat.com> + ** Fix for bug #530691 * em-folder-utils.c: (emfu_delete_rec), (emfu_delete_done), diff --git a/mail/mail-session.c b/mail/mail-session.c index b317612960..9009bb607b 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -286,20 +286,13 @@ struct _user_message_msg { static void user_message_exec (struct _user_message_msg *m); -/* clicked, send back the reply */ static void -user_message_response (GtkDialog *dialog, int button, struct _user_message_msg *m) +user_message_response_free (GtkDialog *dialog, int button, struct _user_message_msg *m) { gtk_widget_destroy ((GtkWidget *) dialog); user_message_dialog = NULL; - /* if !allow_cancel, then we've already replied */ - if (m->allow_cancel) { - m->result = button == GTK_RESPONSE_OK; - e_flag_set (m->done); - } - /* check for pendings */ if (!g_queue_is_empty (&user_message_queue)) { m = g_queue_pop_head (&user_message_queue); @@ -308,6 +301,19 @@ user_message_response (GtkDialog *dialog, int button, struct _user_message_msg * } } +/* clicked, send back the reply */ +static void +user_message_response (GtkDialog *dialog, int button, struct _user_message_msg *m) +{ + /* if !allow_cancel, then we've already replied */ + if (m->allow_cancel) { + m->result = button == GTK_RESPONSE_OK; + e_flag_set (m->done); + } + + user_message_response_free (dialog, button, m); +} + static void user_message_exec (struct _user_message_msg *m) { @@ -364,7 +370,7 @@ user_message_exec (struct _user_message_msg *m) } else { g_signal_connect ( user_message_dialog, "response", - G_CALLBACK (user_message_response), m); + G_CALLBACK (user_message_response_free), m); g_object_set_data ( user_message_dialog, "response-handled", GINT_TO_POINTER (TRUE)); @@ -375,8 +381,8 @@ user_message_exec (struct _user_message_msg *m) static void user_message_free (struct _user_message_msg *m) { - g_free(m->prompt); - e_flag_free(m->done); + g_free (m->prompt); + e_flag_free (m->done); } static MailMsgInfo user_message_info = { |