aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'composer/e-composer-actions.c')
-rw-r--r--composer/e-composer-actions.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index aeae508153..ecf7e84346 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -119,19 +119,21 @@ action_close_cb (GtkAction *action,
{
GtkhtmlEditor *editor;
EComposerHeaderTable *table;
+ GtkWidget *widget;
const gchar *subject;
gint response;
editor = GTKHTML_EDITOR (composer);
+ widget = GTK_WIDGET (composer);
if (!gtkhtml_editor_get_changed (editor) &&
e_composer_autosave_get_saved (composer)) {
- gtk_widget_destroy (GTK_WIDGET (composer));
+ gtk_widget_destroy (widget);
return;
}
- gdk_window_raise (GTK_WIDGET (composer)->window);
+ gdk_window_raise (widget->window);
table = e_msg_composer_get_header_table (composer);
subject = e_composer_header_table_get_subject (table);
@@ -146,11 +148,12 @@ action_close_cb (GtkAction *action,
switch (response) {
case GTK_RESPONSE_YES:
+ gtk_widget_hide (widget);
gtk_action_activate (ACTION (SAVE_DRAFT));
break;
case GTK_RESPONSE_NO:
- gtk_widget_destroy (GTK_WIDGET (composer));
+ gtk_widget_destroy (widget);
break;
case GTK_RESPONSE_CANCEL: