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
This commit is contained in:
Jeffrey Stedfast
2001-12-14 20:06:51 +00:00
committed by Jeffrey Stedfast
parent 900078b311
commit 551901216e
3 changed files with 32 additions and 11 deletions

View File

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

View File

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

View File

@ -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 */