aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-actions.c
diff options
context:
space:
mode:
authorYan Li <yanli@infradead.org>2009-11-06 16:43:58 +0800
committerYan Li <yanli@infradead.org>2009-11-06 16:43:58 +0800
commitd209b896747b519c42c6326fd1d6550ae7f176e5 (patch)
tree2744e14263b21b17262aabc901c275912e5aa32c /composer/e-composer-actions.c
parent23c781c2475b144a365eaf50dffb88986899b4c8 (diff)
downloadgsoc2013-evolution-d209b896747b519c42c6326fd1d6550ae7f176e5.tar
gsoc2013-evolution-d209b896747b519c42c6326fd1d6550ae7f176e5.tar.gz
gsoc2013-evolution-d209b896747b519c42c6326fd1d6550ae7f176e5.tar.bz2
gsoc2013-evolution-d209b896747b519c42c6326fd1d6550ae7f176e5.tar.lz
gsoc2013-evolution-d209b896747b519c42c6326fd1d6550ae7f176e5.tar.xz
gsoc2013-evolution-d209b896747b519c42c6326fd1d6550ae7f176e5.tar.zst
gsoc2013-evolution-d209b896747b519c42c6326fd1d6550ae7f176e5.zip
Bug #599792 - Anjal composer's Send button doesn't work after pressed Save Drafts button
This is due to an old hack that hiding a composer means we're closing it so save_draft_done() destroys the composer after saved draft. But in Anjal, the composer widget is always hidden (since the editor is reparented to the tab), and will be wrongly destroyed by save_draft_done() when you clicked "Save Draft" button. This patch improved the old hack, by adding a new API e_msg_composer_request_close() that can be used to request closing a composer (so the old hack is no longer needed). Internally, composer->priv->application_exiting is used to store this exiting status. So by this we no longer use a composer's visibility to check whether we're to close it. When you no longer need a composer after saved draft, call e_msg_composer_request_close() before sending the save-draft signal. The e_msg_composer_is_exiting() (removed by 983bea9) has to be bring back, which is needed by other programs that use the composer (Anjal here). (forward ported from 08150f6 of gnome-2-28)
Diffstat (limited to 'composer/e-composer-actions.c')
-rw-r--r--composer/e-composer-actions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index 62372a7f1d..851b0f3e53 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -85,6 +86,7 @@ action_close_cb (GtkAction *action,
switch (response) {
case GTK_RESPONSE_YES:
gtk_widget_hide (widget);
+ e_msg_composer_request_close (composer);
gtk_action_activate (ACTION (SAVE_DRAFT));
break;