aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer-attachment.c14
2 files changed, 14 insertions, 6 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index f52cc964b3..98db6dd43b 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -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
diff --git a/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c
index fcfc09928d..ddb73f2f52 100644
--- a/composer/e-msg-composer-attachment.c
+++ b/composer/e-msg-composer-attachment.c
@@ -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));
}