aboutsummaryrefslogtreecommitdiffstats
path: root/composer/evolution-composer.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-10-31 08:26:58 +0800
committerDan Winship <danw@src.gnome.org>2001-10-31 08:26:58 +0800
commite7157ba8938ac2de32ad3c5f5b73db12ddb772c0 (patch)
tree873ddce80b85f860799ef8b1cfc660ebf6b73a80 /composer/evolution-composer.c
parentc99cd2a0f9cc8f02b397960cbcd4faf05967702d (diff)
downloadgsoc2013-evolution-e7157ba8938ac2de32ad3c5f5b73db12ddb772c0.tar.gz
gsoc2013-evolution-e7157ba8938ac2de32ad3c5f5b73db12ddb772c0.tar.zst
gsoc2013-evolution-e7157ba8938ac2de32ad3c5f5b73db12ddb772c0.zip
New.
* Evolution-Composer.idl (setMultipartType): New. * evolution-composer.c (impl_Composer_set_multipart_type): Allow caller to specify a multipart/alternative rather than multipart/mixed. * e-msg-composer.c (build_message): Revert yesterday's changes. Add new ones for sending multipart/alternative. svn path=/trunk/; revision=14510
Diffstat (limited to 'composer/evolution-composer.c')
-rw-r--r--composer/evolution-composer.c41
1 files changed, 24 insertions, 17 deletions
diff --git a/composer/evolution-composer.c b/composer/evolution-composer.c
index 289a8a3765..cf99f86e8b 100644
--- a/composer/evolution-composer.c
+++ b/composer/evolution-composer.c
@@ -98,6 +98,23 @@ impl_Composer_set_headers (PortableServer_Servant servant,
}
static void
+impl_Composer_set_multipart_type (PortableServer_Servant servant,
+ GNOME_Evolution_Composer_MultipartType type,
+ CORBA_Environment *ev)
+{
+ BonoboObject *bonobo_object;
+ EvolutionComposer *composer;
+
+ bonobo_object = bonobo_object_from_servant (servant);
+ composer = EVOLUTION_COMPOSER (bonobo_object);
+
+ if (type == GNOME_Evolution_Composer_ALTERNATIVE) {
+ composer->composer->is_alternative = TRUE;
+ composer->composer->send_html = FALSE;
+ }
+}
+
+static void
impl_Composer_set_body_text (PortableServer_Servant servant,
const CORBA_char *text,
CORBA_Environment *ev)
@@ -109,7 +126,6 @@ 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
@@ -206,12 +222,13 @@ evolution_composer_get_epv (void)
POA_GNOME_Evolution_Composer__epv *epv;
epv = g_new0 (POA_GNOME_Evolution_Composer__epv, 1);
- epv->setHeaders = impl_Composer_set_headers;
- epv->setBodyText = impl_Composer_set_body_text;
- epv->attachMIME = impl_Composer_attach_MIME;
- epv->attachData = impl_Composer_attach_data;
- epv->show = impl_Composer_show;
- epv->send = impl_Composer_send;
+ epv->setHeaders = impl_Composer_set_headers;
+ epv->setMultipartType = impl_Composer_set_multipart_type;
+ epv->setBodyText = impl_Composer_set_body_text;
+ epv->attachMIME = impl_Composer_attach_MIME;
+ epv->attachData = impl_Composer_attach_data;
+ epv->show = impl_Composer_show;
+ epv->send = impl_Composer_send;
return epv;
}
@@ -245,22 +262,12 @@ 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);