aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-config.c26
-rw-r--r--mail/mail-format.c7
3 files changed, 32 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f1b5cb329c..0b0a1ac86e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+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.
+
2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (compose_msg): Connect to the save-draft signal.
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;
}
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 68b51e8265..74ffc99a22 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1146,7 +1146,8 @@ struct {
{ "begin ", try_uudecoding },
{ "(This file must be converted with BinHex 4.0)\n", try_inline_binhex }
};
-#define NSPECIALS (sizeof (text_specials) / sizeof (*text_specials))
+
+static int num_specials = (sizeof (text_specials) / sizeof (text_specials[0]));
static void
write_one_text_plain_chunk (const char *text, int len, GtkHTML *html, GtkHTMLStream *stream, gboolean printing)
@@ -1200,12 +1201,12 @@ handle_text_plain (CamelMimePart *part, const char *mime_type,
p = text;
while (p && check_specials) {
/* Look for special cases. */
- for (i = 0; i < NSPECIALS; i++) {
+ for (i = 0; i < num_specials; i++) {
start = strstr (p, text_specials[i].start);
if (start && (start == p || start[-1] == '\n'))
break;
}
- if (!start)
+ if (i == num_specials)
break;
/* Deal with special case */