aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-01-04 03:11:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-01-04 03:11:09 +0800
commit239be43f7734bcbfdb69cfe9396b6b5d2f933d3f (patch)
tree0f732d0905f26c9ebe6fa2e107fecfff5c61db6f
parentc89dd9d4751440e3c915c34685d9b82f18cd6485 (diff)
downloadgsoc2013-evolution-239be43f7734bcbfdb69cfe9396b6b5d2f933d3f.tar.gz
gsoc2013-evolution-239be43f7734bcbfdb69cfe9396b6b5d2f933d3f.tar.zst
gsoc2013-evolution-239be43f7734bcbfdb69cfe9396b6b5d2f933d3f.zip
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
-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));
}