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
This commit is contained in:
Not Zed
2003-03-03 08:17:57 +00:00
committed by Michael Zucci
parent 65f1aefe07
commit 5fa6f6bc8a
2 changed files with 22 additions and 9 deletions

View File

@ -1,3 +1,15 @@
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

View File

@ -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;