aboutsummaryrefslogtreecommitdiffstats
path: root/composer/evolution-composer.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-10-30 09:36:48 +0800
committerDan Winship <danw@src.gnome.org>2001-10-30 09:36:48 +0800
commit46dee516710185ab5fb881a02580c66f3e82181c (patch)
tree726f24567c51d27580c4f444ee7d7b33b5f5671e /composer/evolution-composer.c
parente6e77f1fc333b12693989ccbbd9a432465c6ffd6 (diff)
downloadgsoc2013-evolution-46dee516710185ab5fb881a02580c66f3e82181c.tar
gsoc2013-evolution-46dee516710185ab5fb881a02580c66f3e82181c.tar.gz
gsoc2013-evolution-46dee516710185ab5fb881a02580c66f3e82181c.tar.bz2
gsoc2013-evolution-46dee516710185ab5fb881a02580c66f3e82181c.tar.lz
gsoc2013-evolution-46dee516710185ab5fb881a02580c66f3e82181c.tar.xz
gsoc2013-evolution-46dee516710185ab5fb881a02580c66f3e82181c.tar.zst
gsoc2013-evolution-46dee516710185ab5fb881a02580c66f3e82181c.zip
Set the (new) "no_body" flag on the composer.
* evolution-composer.c (init): Set the (new) "no_body" flag on the composer. (impl_Composer_set_body_text): And unset it here. (unset_no_body): And here (called if/when the composer is realized). * e-msg-composer.c (build_message): If the composer has the "no_body" flag set, and a single attachment, promote that attachment to be the message body. svn path=/trunk/; revision=14393
Diffstat (limited to 'composer/evolution-composer.c')
-rw-r--r--composer/evolution-composer.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/composer/evolution-composer.c b/composer/evolution-composer.c
index c19f286a66..289a8a3765 100644
--- a/composer/evolution-composer.c
+++ b/composer/evolution-composer.c
@@ -109,6 +109,7 @@ impl_Composer_set_body_text (PortableServer_Servant servant,
composer = EVOLUTION_COMPOSER (bonobo_object);
e_msg_composer_set_body_text (composer->composer, text);
+ composer->composer->no_body = FALSE;
}
static void
@@ -244,13 +245,23 @@ class_init (EvolutionComposerClass *klass)
}
static void
+unset_no_body (EMsgComposer *composer, gpointer user_data)
+{
+ composer->no_body = FALSE;
+}
+
+static void
init (EvolutionComposer *composer)
{
const MailConfigAccount *account;
account = mail_config_get_default_account ();
composer->composer = e_msg_composer_new ();
-
+ composer->composer->no_body = TRUE;
+
+ gtk_signal_connect (GTK_OBJECT (composer->composer), "realize",
+ GTK_SIGNAL_FUNC (unset_no_body), NULL);
+
gtk_signal_connect (GTK_OBJECT (composer->composer), "send",
GTK_SIGNAL_FUNC (send_cb), NULL);
gtk_signal_connect (GTK_OBJECT (composer->composer), "postpone",