Only connect to the parent's destroy/hide signals while the attachment

2002-01-03  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
	Only connect to the parent's destroy/hide signals while the
	attachment editor dialog is "alive".

svn path=/trunk/; revision=15238
This commit is contained in:
Jeffrey Stedfast
2002-01-03 19:11:09 +00:00
committed by Jeffrey Stedfast
parent c89dd9d475
commit 239be43f77
2 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2002-01-03 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
Only connect to the parent's destroy/hide signals while the
attachment editor dialog is "alive".
2001-12-21 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-select-file.c (composer_hide_cb): Only cancel the

View File

@ -332,8 +332,7 @@ close_cb (GtkWidget *widget, gpointer data)
dialog_data = (DialogData *) data;
attachment = dialog_data->attachment;
gtk_widget_destroy (glade_xml_get_widget (attachment->editor_gui,
"dialog"));
gtk_widget_destroy (dialog_data->dialog);
gtk_object_unref (GTK_OBJECT (attachment->editor_gui));
attachment->editor_gui = NULL;
@ -439,8 +438,8 @@ e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment,
if (attachment != NULL) {
CamelContentType *content_type;
char *type;
const char *disposition;
char *type;
set_entry (editor_gui, "file_name_entry",
camel_mime_part_get_filename (attachment->body));
@ -462,7 +461,10 @@ e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment,
connect_widget (editor_gui, "file_name_entry", "focus_out_event",
file_name_focus_out_cb, dialog_data);
gtk_signal_connect (GTK_OBJECT (parent), "destroy", close_cb, dialog_data);
gtk_signal_connect (GTK_OBJECT (gtk_widget_get_toplevel (parent)), "hide",
close_cb, dialog_data);
/* make sure that when the composer gets hidden/closed that our windows also close */
parent = gtk_widget_get_toplevel (parent);
gtk_signal_connect_while_alive (GTK_OBJECT (parent), "destroy", close_cb, dialog_data,
GTK_OBJECT (dialog_data->dialog));
gtk_signal_connect_while_alive (GTK_OBJECT (parent), "hide", close_cb, dialog_data,
GTK_OBJECT (dialog_data->dialog));
}