[PATCH] Re: Message window goes blank
- From: Peter Bloomfield <PeterBloomfield MindSpring com>
- To: balsa-list gnome org
- Subject: [PATCH] Re: Message window goes blank
- Date: Sun, 11 Aug 2002 12:35:30 -0400
In the absence of comments, I'll reply to my own post...here's a patch
implementing Alternative 2 for HEAD--that emerged as the simplest fix.
A similar fix for BALSA_2 will be part of a larger, forthcoming, patch
porting LibBalsaMessage from GtkObject to GObject.
src/message-window.c: close window if message is destroyed.
Index: src/message-window.c
===================================================================
RCS file: /cvs/gnome/balsa/src/message-window.c,v
retrieving revision 1.46
diff -u -r1.46 message-window.c
--- src/message-window.c 28 Jul 2002 12:23:08 -0000 1.46
+++ src/message-window.c 11 Aug 2002 16:27:46 -0000
@@ -68,6 +68,8 @@
static void print_cb(GtkWidget * widget, gpointer);
static void trash_cb(GtkWidget * widget, gpointer);
+static void mw_message_destroyed_cb(GtkObject * object, gpointer data);
+
/*
* The list of messages which are being displayed.
*/
@@ -238,6 +240,8 @@
BALSA_PIXMAP_NEXT, TRUE);
}
}
+ gtk_signal_connect(GTK_OBJECT(message), "destroy",
+ GTK_SIGNAL_FUNC(mw_message_destroyed_cb), mw);
gtk_object_unref(GTK_OBJECT(message));
gdk_threads_leave();
return FALSE;
@@ -653,6 +657,15 @@
balsa_find_index_by_mailbox(mailbox));
gtk_widget_destroy(GTK_WIDGET(mw->window));
+}
+
+static void
+mw_message_destroyed_cb(GtkObject * object, gpointer data)
+{
+ MessageWindow *mw = data;
+
+ if (mw->message == (LibBalsaMessage *) object)
+ gtk_widget_destroy(mw->window);
}
static void show_all_headers_tool_cb(GtkWidget * widget, gpointer data)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]