aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-03-03 16:17:57 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-03-03 16:17:57 +0800
commit5fa6f6bc8aee26b8345003f35fc818afb89f573d (patch)
tree7f3407488a239a4e5de4a659f8f659620bec21b9 /mail
parent65f1aefe075ecd0ba7bc19094bcb683ea4d7e5c1 (diff)
downloadgsoc2013-evolution-5fa6f6bc8aee26b8345003f35fc818afb89f573d.tar
gsoc2013-evolution-5fa6f6bc8aee26b8345003f35fc818afb89f573d.tar.gz
gsoc2013-evolution-5fa6f6bc8aee26b8345003f35fc818afb89f573d.tar.bz2
gsoc2013-evolution-5fa6f6bc8aee26b8345003f35fc818afb89f573d.tar.lz
gsoc2013-evolution-5fa6f6bc8aee26b8345003f35fc818afb89f573d.tar.xz
gsoc2013-evolution-5fa6f6bc8aee26b8345003f35fc818afb89f573d.tar.zst
gsoc2013-evolution-5fa6f6bc8aee26b8345003f35fc818afb89f573d.zip
Do the same as below for request_password, so we dont leave a mainloop
2003-03-03 Not Zed <NotZed@Ximian.com> * mail-session.c (do_user_message): Do the same as below for request_password, so we dont leave a mainloop lying around. 2003-03-03 Jeffrey Stedfast <fejj@ximian.com> * mail-session.c (request_password): Don't connect to the response signal if we are in the main thread - instead just use the return value from gtk_dialog_run and then call pass_response() with the response value. svn path=/trunk/; revision=20122
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/mail-session.c19
2 files changed, 22 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 667b402042..e4484f7d80 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,17 @@
2003-03-03 Not Zed <NotZed@Ximian.com>
+ * mail-session.c (do_user_message): Do the same as below for
+ request_password, so we dont leave a mainloop lying around.
+
+2003-03-03 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-session.c (request_password): Don't connect to the response
+ signal if we are in the main thread - instead just use the return
+ value from gtk_dialog_run and then call pass_response() with the
+ response value.
+
+2003-03-03 Not Zed <NotZed@Ximian.com>
+
* subscribe-dialog.c (fe_got_children): Remove the
e_tree_memory_sort_node, currently it crashes inside gal, the root
node seems to get free'd under it.
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 8da4d0e415..615c15707e 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -261,8 +261,6 @@ request_password (struct _pass_msg *m)
password_dialog = (GtkDialog *) gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_QUESTION,
GTK_BUTTONS_OK_CANCEL, "%s", m->prompt);
-
- g_signal_connect (password_dialog, "response", G_CALLBACK (pass_response), m);
gtk_window_set_title (GTK_WINDOW (password_dialog), title);
g_free (title);
@@ -287,10 +285,12 @@ request_password (struct _pass_msg *m)
gtk_widget_show (m->check);
}
- if (m->ismain)
- gtk_dialog_run (password_dialog);
- else
+ if (m->ismain) {
+ pass_response(password_dialog, gtk_dialog_run (password_dialog), m);
+ } else {
+ g_signal_connect (password_dialog, "response", G_CALLBACK (pass_response), m);
gtk_widget_show ((GtkWidget *) password_dialog);
+ }
}
static void
@@ -467,11 +467,12 @@ do_user_message (struct _mail_msg *mm)
/* We only need to wait for the result if we allow cancel otherwise show but send result back instantly */
if (m->allow_cancel) {
- g_signal_connect (message_dialog, "response", G_CALLBACK (user_message_response), m);
- if (m->ismain)
- gtk_dialog_run (message_dialog);
- else
+ if (m->ismain) {
+ user_message_response(message_dialog, gtk_dialog_run (message_dialog), m);
+ } else {
+ g_signal_connect (message_dialog, "response", G_CALLBACK (user_message_response), m);
gtk_widget_show ((GtkWidget *) message_dialog);
+ }
} else {
gtk_widget_show ((GtkWidget *) message_dialog);
m->result = TRUE;