[Evolution-hackers] Empty Trash crash fix
- From: Ross Burton <ross burtonini com>
- To: evolution-hackers lists ximian com
- Subject: [Evolution-hackers] Empty Trash crash fix
- Date: Tue, 13 Jan 2004 21:32:55 +0000
Hi,
If you press Empty Trash when prompts are on, evo will crash. Attached
is a patch to fix this (an EmFolderBrowser is incorrectly passed as a
GtkWindow).
(Please CC: me on any replies)
Ross
Index: em-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-utils.c,v
retrieving revision 1.13
diff -u -r1.13 em-utils.c
--- em-utils.c 12 Jan 2004 22:22:50 -0000 1.13
+++ em-utils.c 13 Jan 2004 21:29:03 -0000
@@ -83,6 +83,9 @@
&& !gconf_client_get_bool(gconf, promptkey, NULL))
return TRUE;
+ if (!GTK_IS_WINDOW (parent))
+ parent = NULL;
+
va_start (ap, fmt);
str = g_strdup_vprintf (fmt, ap);
va_end (ap);
Index: em-folder-browser.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-browser.c,v
retrieving revision 1.15
diff -u -r1.15 em-folder-browser.c
--- em-folder-browser.c 12 Jan 2004 22:22:49 -0000 1.15
+++ em-folder-browser.c 13 Jan 2004 21:29:03 -0000
@@ -590,7 +590,7 @@
{
EMFolderView *emfv = data;
- em_utils_empty_trash ((GtkWidget *) emfv);
+ em_utils_empty_trash (gtk_widget_get_toplevel ((GtkWidget *) emfv));
}
static void
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2987
diff -u -r1.2987 ChangeLog
--- ChangeLog 12 Jan 2004 22:22:46 -0000 1.2987
+++ ChangeLog 13 Jan 2004 21:29:06 -0000
@@ -1,3 +1,12 @@
+2004-01-13 Ross Burton <ross burtonini com>
+
+ * em-folder-browser.c (emfb_empty_trash):
+ Pass the parent window, fixing a crasher.
+
+ * em-utils.c (em_utils_prompt_user):
+ Sanity check the parent window pointer, and use NULL if it's not
+ really a GtkWindow*.
+
2004-01-12 Meilof Veeningen <meilof wanadoo nl>
* em-composer-utils.c: support for posting both to mail and to
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]