Attach to the parent widget's destroy signal - when that gets destroyed,

001-12-11  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
	Attach to the parent widget's destroy signal - when that gets
	destroyed, we need to cancel the editor dialog too. Also connect
	to our parent window's "hide" signal so that when the composer
	gets hidden (ie, it's being sent), we also close the dialogs.

	* e-msg-composer.c (init): Default composer->enable_autosave to
	TRUE.

svn path=/trunk/; revision=15016
This commit is contained in:
Jeffrey Stedfast
2001-12-13 20:14:26 +00:00
committed by Jeffrey Stedfast
parent fe2f7a99bb
commit d103ae62e1
4 changed files with 127 additions and 103 deletions

View File

@ -1,3 +1,14 @@
2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
Attach to the parent widget's destroy signal - when that gets
destroyed, we need to cancel the editor dialog too. Also connect
to our parent window's "hide" signal so that when the composer
gets hidden (ie, it's being sent), we also close the dialogs.
* e-msg-composer.c (init): Default composer->enable_autosave to
TRUE.
2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-select-file.c (confirm): If multiple-selection is
@ -52,6 +63,11 @@
* e-msg-composer.c (drag_data_received): Allow drag & drop for
vcards.
2001-11-30 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (setup_ui): Change the FileSend tooltip the be
the same as the FileSendLater tooltip if we are in offline mode.
2001-11-14 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c (create_composer): popup failure dialog if we

View File

@ -135,6 +135,8 @@ free_attachment_list (EMsgComposerAttachmentBar *bar)
for (p = priv->attachments; p != NULL; p = p->next)
gtk_object_unref (GTK_OBJECT (p->data));
priv->attachments = NULL;
}
static void
@ -594,8 +596,7 @@ button_press_event (GtkWidget *widget,
return GTK_WIDGET_CLASS (parent_class)->button_press_event
(widget, event);
icon_number = e_icon_list_get_icon_at (icon_list,
event->x, event->y);
icon_number = e_icon_list_get_icon_at (icon_list, event->x, event->y);
if (icon_number >= 0) {
e_icon_list_select_icon (icon_list, icon_number);

View File

@ -1,7 +1,7 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* e-msg-composer-attachment.c
*
* Copyright (C) 1999 Ximian, Inc.
* Copyright (C) 1999,2001 Ximian, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
@ -185,6 +185,7 @@ e_msg_composer_attachment_new (const char *file_name,
file_name, g_strerror (errno));
return NULL;
}
wrapper = camel_data_wrapper_new ();
camel_data_wrapper_construct_from_stream (wrapper, stream);
camel_object_unref (CAMEL_OBJECT (stream));
@ -323,8 +324,7 @@ connect_widget (GladeXML *gui,
}
static void
close_cb (GtkWidget *widget,
gpointer data)
close_cb (GtkWidget *widget, gpointer data)
{
EMsgComposerAttachment *attachment;
DialogData *dialog_data;
@ -341,12 +341,11 @@ close_cb (GtkWidget *widget,
}
static void
ok_cb (GtkWidget *widget,
gpointer data)
ok_cb (GtkWidget *widget, gpointer data)
{
DialogData *dialog_data;
EMsgComposerAttachment *attachment;
gchar *str;
char *str;
dialog_data = (DialogData *) data;
attachment = dialog_data->attachment;
@ -462,4 +461,8 @@ 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);
}

View File

@ -462,6 +462,8 @@ build_message (EMsgComposer *composer)
camel_internet_address_get (from, 0, NULL, &pgpid);
}
printf ("build_message(): pgpid = '%s'\n", pgpid);
mail_crypto_pgp_mime_part_sign (&part, pgpid, CAMEL_CIPHER_HASH_SHA1, &ex);
if (from)
@ -1108,7 +1110,7 @@ autosave_save_draft (EMsgComposer *composer)
CamelMimeMessage *message;
CamelStream *stream;
char *file;
gint fd;
int fd;
gboolean success = TRUE;
fd = composer->autosave_fd;
@ -2270,6 +2272,8 @@ init (EMsgComposer *composer)
composer->has_changed = FALSE;
composer->charset = NULL;
composer->enable_autosave = TRUE;
composer->autosave_file = NULL;
composer->autosave_fd = -1;
}