aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-12-17 03:23:18 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-12-17 03:23:18 +0800
commitaed127b4f487bc6026b1c89eeb7034973511ba6b (patch)
treea22a042996542bb61aa2ef40769851e9fb05fd72
parent2f1a1a22feb83e27635bb25658ae6b4103285878 (diff)
downloadgsoc2013-evolution-aed127b4f487bc6026b1c89eeb7034973511ba6b.tar
gsoc2013-evolution-aed127b4f487bc6026b1c89eeb7034973511ba6b.tar.gz
gsoc2013-evolution-aed127b4f487bc6026b1c89eeb7034973511ba6b.tar.bz2
gsoc2013-evolution-aed127b4f487bc6026b1c89eeb7034973511ba6b.tar.lz
gsoc2013-evolution-aed127b4f487bc6026b1c89eeb7034973511ba6b.tar.xz
gsoc2013-evolution-aed127b4f487bc6026b1c89eeb7034973511ba6b.tar.zst
gsoc2013-evolution-aed127b4f487bc6026b1c89eeb7034973511ba6b.zip
Use camel_text_to_html(). (e_msg_composer_new_from_url): Same.
2002-12-16 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer.c (get_signature_html): Use camel_text_to_html(). (e_msg_composer_new_from_url): Same. * evolution-composer.c (impl_Composer_set_body): Use camel_text_to_html(). svn path=/trunk/; revision=19127
-rw-r--r--composer/ChangeLog8
-rw-r--r--composer/e-msg-composer.c24
-rw-r--r--composer/evolution-composer.c10
3 files changed, 25 insertions, 17 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index b5fe6fd3b6..97f7db00f0 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,11 @@
+2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-msg-composer.c (get_signature_html): Use camel_text_to_html().
+ (e_msg_composer_new_from_url): Same.
+
+ * evolution-composer.c (impl_Composer_set_body): Use
+ camel_text_to_html().
+
2002-12-07 Jeffrey Stedfast <fejj@ximian.com>
Fix for bug #33295
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 01c95e22b7..c6ba4d0222 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -88,8 +88,6 @@
#include "mail/mail-mt.h"
#include "mail/mail-session.h"
-#include "e-util/e-html-utils.h"
-
#include "e-msg-composer.h"
#include "e-msg-composer-attachment-bar.h"
#include "e-msg-composer-hdrs.h"
@@ -989,27 +987,29 @@ decode_signature_name (const gchar *name)
return dname;
}
+#define CONVERT_SPACES CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES
+
static gchar *
get_signature_html (EMsgComposer *composer)
{
gboolean format_html = FALSE;
char *text = NULL, *html = NULL, *sig_file = NULL, *script = NULL;
-
+
if (composer->signature) {
sig_file = composer->signature->filename;
format_html = composer->signature->html;
script = composer->signature->script;
} else if (composer->auto_signature) {
MailConfigIdentity *id;
- gchar *address;
- gchar *name;
- gchar *organization;
-
+ char *organization;
+ char *address;
+ char *name;
+
id = E_MSG_COMPOSER_HDRS (composer->hdrs)->account->id;
- address = id->address ? e_text_to_html (id->address, E_TEXT_TO_HTML_CONVERT_SPACES) : NULL;
- name = id->name ? e_text_to_html (id->name, E_TEXT_TO_HTML_CONVERT_SPACES) : NULL;
- organization = id->organization ? e_text_to_html (id->organization, E_TEXT_TO_HTML_CONVERT_SPACES) : NULL;
-
+ address = id->address ? camel_text_to_html (id->address, CONVERT_SPACES, 0) : NULL;
+ name = id->name ? camel_text_to_html (id->name, CONVERT_SPACES, 0) : NULL;
+ organization = id->organization ? camel_text_to_html (id->organization, CONVERT_SPACES, 0) : NULL;
+
text = g_strdup_printf ("-- <BR>%s%s%s%s%s%s%s%s",
name ? name : "",
(address && *address) ? " &lt;<A HREF=\"mailto:" : "",
@@ -3769,7 +3769,7 @@ e_msg_composer_new_from_url (const char *url_in)
if (body) {
char *htmlbody;
- htmlbody = e_text_to_html (body, E_TEXT_TO_HTML_PRE);
+ htmlbody = camel_text_to_html (body, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
set_editor_text (composer, htmlbody);
g_free (htmlbody);
}
diff --git a/composer/evolution-composer.c b/composer/evolution-composer.c
index be540b8d2e..cef0110413 100644
--- a/composer/evolution-composer.c
+++ b/composer/evolution-composer.c
@@ -33,7 +33,6 @@
#include <camel/camel.h>
#include "evolution-composer.h"
#include "mail/mail-config.h"
-#include "e-util/e-html-utils.h"
#define PARENT_TYPE BONOBO_OBJECT_TYPE
static BonoboObjectClass *parent_class = NULL;
@@ -95,7 +94,7 @@ impl_Composer_set_headers (PortableServer_Servant servant,
accounts = mail_config_get_accounts ();
while (accounts) {
account = accounts->data;
- if (!g_strcasecmp (account->id->address, from))
+ if (!strcasecmp (account->id->address, from))
break;
accounts = accounts->next;
}
@@ -144,11 +143,12 @@ impl_Composer_set_body (PortableServer_Servant servant,
bonobo_object = bonobo_object_from_servant (servant);
composer = EVOLUTION_COMPOSER (bonobo_object);
- if (!g_strcasecmp (mime_type, "text/plain")) {
- char *htmlbody = e_text_to_html (body, E_TEXT_TO_HTML_PRE);
+ if (!strcasecmp (mime_type, "text/plain")) {
+ char *htmlbody = camel_text_to_html (body, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
+
e_msg_composer_set_body_text (composer->composer, htmlbody);
g_free (htmlbody);
- } else if (!g_strcasecmp (mime_type, "text/html"))
+ } else if (!strcasecmp (mime_type, "text/html"))
e_msg_composer_set_body_text (composer->composer, body);
else
e_msg_composer_set_body (composer->composer, body, mime_type);