aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Doulik <rodo@ximian.com>2004-07-23 00:36:15 +0800
committerRadek Doulik <rodo@src.gnome.org>2004-07-23 00:36:15 +0800
commit7ddc1267500f3fc0f9c340e598089735e081fc4a (patch)
treeb10b9d885ba546a643593a4335cd8f83b084627d
parentd862e865114a6105ceb69088120c07cc2e39e612 (diff)
downloadgsoc2013-evolution-7ddc1267500f3fc0f9c340e598089735e081fc4a.tar
gsoc2013-evolution-7ddc1267500f3fc0f9c340e598089735e081fc4a.tar.gz
gsoc2013-evolution-7ddc1267500f3fc0f9c340e598089735e081fc4a.tar.bz2
gsoc2013-evolution-7ddc1267500f3fc0f9c340e598089735e081fc4a.tar.lz
gsoc2013-evolution-7ddc1267500f3fc0f9c340e598089735e081fc4a.tar.xz
gsoc2013-evolution-7ddc1267500f3fc0f9c340e598089735e081fc4a.tar.zst
gsoc2013-evolution-7ddc1267500f3fc0f9c340e598089735e081fc4a.zip
removed body content + signature html concatenating and call
2004-07-22 Radek Doulik <rodo@ximian.com> * e-msg-composer.c (set_editor_text): removed body content + signature html concatenating and call e_msg_composer_show_sig_file instead Fixes #59490 svn path=/trunk/; revision=26705
-rw-r--r--composer/ChangeLog8
-rw-r--r--composer/e-msg-composer.c26
2 files changed, 12 insertions, 22 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 3689cf7cc1..cf09a1183a 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,11 @@
+2004-07-22 Radek Doulik <rodo@ximian.com>
+
+ * e-msg-composer.c (set_editor_text): removed body content +
+ signature html concatenating and call e_msg_composer_show_sig_file
+ instead
+
+ Fixes #59490
+
2004-07-20 Not Zed <NotZed@Ximian.com>
* e-msg-composer-attachment.c: include config.h. See #61395.
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index a3204c2334..06280c0c13 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1126,9 +1126,6 @@ set_editor_text(EMsgComposer *composer, const char *text, int set_signature, int
BonoboWidget *editor;
CORBA_Environment ev;
Bonobo_Unknown object;
- char *sig, *mem = NULL;
- const char *content;
- size_t len;
g_return_if_fail (composer->persist_stream_interface != CORBA_OBJECT_NIL);
@@ -1138,25 +1135,7 @@ set_editor_text(EMsgComposer *composer, const char *text, int set_signature, int
CORBA_exception_init (&ev);
- /* This copying bullshit is because the bonobo stream interface is just painful */
- len = strlen(text);
- if (set_signature && (sig = get_signature_html (composer))) {
- char *p;
-
- len += strlen (sig);
- content = mem = g_malloc (len + (pad_signature ? 4 : 0) + 1);
- p = g_stpcpy (mem, text);
- if (pad_signature)
- p = g_stpcpy (p, "<br>");
- strcpy (p, sig);
- g_free (sig);
- } else {
- content = text;
- }
-
- stream = bonobo_stream_mem_create(content, len, TRUE, FALSE);
- g_free(mem);
-
+ stream = bonobo_stream_mem_create (text, strlen (text), TRUE, FALSE);
object = bonobo_object_corba_objref (BONOBO_OBJECT (stream));
Bonobo_PersistStream_load (persist, (Bonobo_Stream) object, "text/html", &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
@@ -1169,6 +1148,9 @@ set_editor_text(EMsgComposer *composer, const char *text, int set_signature, int
CORBA_exception_free (&ev);
bonobo_object_unref (BONOBO_OBJECT (stream));
+
+ if (set_signature)
+ e_msg_composer_show_sig_file (composer);
}
/* Commands. */