aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejJ@ximian.com>2001-12-15 04:06:51 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-12-15 04:06:51 +0800
commit551901216ecf731bf44ded1cc2c61b60d3ef708f (patch)
treef925a529bf286af858c51c6e966a82eb8353a9d2 /mail/mail-config.c
parent900078b3119c8061c5e416d6ef3441a7700c7fdb (diff)
downloadgsoc2013-evolution-551901216ecf731bf44ded1cc2c61b60d3ef708f.tar.gz
gsoc2013-evolution-551901216ecf731bf44ded1cc2c61b60d3ef708f.tar.zst
gsoc2013-evolution-551901216ecf731bf44ded1cc2c61b60d3ef708f.zip
Connect to the destroy signal on the popup dialog.
2001-12-12 Jeffrey Stedfast <fejJ@ximian.com> * mail-config.c (mail_config_check_service): Connect to the destroy signal on the popup dialog. 2001-12-12 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (handle_text_plain): Make sure i != num_specials after we check for any special text markers. Fixes bug #12265. svn path=/trunk/; revision=15085
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 819b251284..184f4fb281 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -2209,20 +2209,27 @@ check_cancelled (GnomeDialog *dialog, int button, gpointer data)
gboolean
mail_config_check_service (const char *url, CamelProviderType type, GList **authtypes, GtkWindow *window)
{
+ static GtkWidget *dialog = NULL;
gboolean ret = FALSE;
struct _check_msg *m;
+ GtkWidget *label;
int id;
- GtkWidget *dialog, *label;
-
- m = mail_msg_new(&check_service_op, NULL, sizeof(*m));
+
+ if (dialog) {
+ gdk_window_raise (dialog->window);
+ *authtypes = NULL;
+ return FALSE;
+ }
+
+ m = mail_msg_new (&check_service_op, NULL, sizeof(*m));
m->url = url;
m->type = type;
m->authtypes = authtypes;
m->success = &ret;
-
+
id = m->msg.seq;
e_thread_put(mail_thread_queued, (EMsg *)m);
-
+
dialog = gnome_dialog_new (_("Connecting to server..."),
GNOME_STOCK_BUTTON_CANCEL,
NULL);
@@ -2233,13 +2240,16 @@ mail_config_check_service (const char *url, CamelProviderType type, GList **auth
gnome_dialog_set_close (GNOME_DIALOG (dialog), FALSE);
gtk_signal_connect (GTK_OBJECT (dialog), "clicked",
GTK_SIGNAL_FUNC (check_cancelled), &id);
+ gtk_signal_connect (GTK_OBJECT (dialog), "delete_event",
+ GTK_SIGNAL_FUNC (check_cancelled), &id);
gtk_window_set_modal (GTK_WINDOW (dialog), FALSE);
gtk_widget_show_all (dialog);
-
+
mail_msg_wait(id);
-
+
gtk_widget_destroy (dialog);
-
+ dialog = NULL;
+
return ret;
}