aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer.c55
2 files changed, 38 insertions, 23 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index dc490887dd..446240f0ff 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,5 +1,11 @@
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
+ * e-msg-composer.c (e_msg_composer_new_with_message): Added code
+ to set the body text based on the CamelMimeMessage.
+ (set_editor_text): Use lowercase html tags...
+
+2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
+
* e-msg-composer.c (do_exit): Prompt the user to save their
composition in Drafts.
(set_editor_text): Uhm, use "-- \n" not "--\n" because the space
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index f867be4c94..2e50a9029f 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -44,6 +44,8 @@
#include <camel/camel.h>
+#include "../mail/mail.h"
+
#include "e-util/e-html-utils.h"
#include "e-util/e-setup.h"
#include "e-util/e-gui-utils.h"
@@ -71,6 +73,10 @@ static guint signals[LAST_SIGNAL] = { 0 };
static GnomeAppClass *parent_class = NULL;
+/* local prototypes */
+static GList *add_recipients (GList *list, const char *recips, gboolean decode);
+static void free_recipients (GList *list);
+
static GtkWidget *
create_editor (EMsgComposer *composer)
@@ -364,10 +370,10 @@ set_editor_text (BonoboWidget *editor, const char *sig_file, const char *text)
sig = get_signature (sig_file);
if (sig) {
if (!strncmp ("-- \n", sig, 3))
- fulltext = g_strdup_printf ("%s<BR>\n<PRE>\n%s</PRE>",
+ fulltext = g_strdup_printf ("%s<br>\n<pre>\n%s</pre>",
text, sig);
else
- fulltext = g_strdup_printf ("%s<BR>\n<PRE>\n-- \n%s</PRE>",
+ fulltext = g_strdup_printf ("%s<br>\n<pre>\n-- \n%s</pre>",
text, sig);
} else {
if (!*text)
@@ -1303,9 +1309,13 @@ GtkWidget *
e_msg_composer_new_with_message (CamelMimeMessage *msg)
{
const CamelInternetAddress *to, *cc, *bcc;
- GList *tmp, *To = NULL, *Cc = NULL, *Bcc = NULL;
+ GList *To = NULL, *Cc = NULL, *Bcc = NULL;
+ gboolean want_plain, is_html;
+ CamelDataWrapper *contents;
+ const MailConfig *config;
const gchar *subject;
GtkWidget *new;
+ char *text, *final_text;
guint len, i;
g_return_val_if_fail (gtk_main_level () > 0, NULL);
@@ -1345,27 +1355,26 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg)
e_msg_composer_set_headers (E_MSG_COMPOSER (new), To, Cc, Bcc, subject);
- tmp = To;
- while (tmp) {
- g_free (tmp->data);
- tmp = tmp->next;
- }
- g_list_free (To);
- tmp = Cc;
- while (tmp) {
- g_free (tmp->data);
- tmp = tmp->next;
- }
- g_list_free (Cc);
- tmp = Bcc;
- while (tmp) {
- g_free (tmp->data);
- tmp = tmp->next;
- }
- g_list_free (Bcc);
+ free_recipients (To);
+ free_recipients (Cc);
+ free_recipients (Bcc);
- set_editor_text (BONOBO_WIDGET (E_MSG_COMPOSER (new)->editor),
- NULL, "FIXME: like, uh... put the message here and stuff\n");
+ config = mail_config_fetch ();
+ want_plain = !config->send_html;
+
+ contents = camel_medium_get_content_object (CAMEL_MEDIUM (msg));
+ text = mail_get_message_body (contents, want_plain, &is_html);
+ if (is_html)
+ final_text = g_strdup (text);
+ else
+ final_text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL |
+ E_TEXT_TO_HTML_CONVERT_SPACES);
+ g_free (text);
+
+ e_msg_composer_set_body_text (E_MSG_COMPOSER (new), final_text);
+
+ /*set_editor_text (BONOBO_WIDGET (E_MSG_COMPOSER (new)->editor),
+ NULL, "FIXME: like, uh... put the message here and stuff\n");*/
return new;
}
id=4df10d48123819eba0ddcdd9b44003ae46221582'>- Add LICENSE_FILEamdmi32018-10-082-1/+2 * Deprecate some GNOME 2 applicationsantoine2018-10-081-0/+3 * Update maintainer eMail address.rigoletto2018-10-082-2/+2 * net-p2p/libtorrent-rasterbar and net-p2p/libtorrent-rasterbar-python: Update ...yuri2018-10-071-1/+2 * Fix every instance of RUN_DEPENDS:=${BUILD_DEPENDS} in p5 ports, exceptdes2018-10-065-10/+10 * - Update xfce4-whiskermenu-plugin to 2.3.0madpilot2018-10-023-9/+12 * Cleanup plistsantoine2018-10-011-15/+15 * Bump PORTREVISION on *-sbcl ports after lang/sbcl upgrade.krion2018-10-011-1/+1 * Cleanup plistantoine2018-10-011-259/+259 * The updated libgtop included in the GNOME 3.28 update broke runtime forkwm2018-10-011-0/+1 * Update `x11/nvidia-driver' to version 390.87, which fixed a resourcedanfe2018-09-303-13/+15 * Update babl to 0.1.56.kwm2018-09-303-6/+5 * The FreeBSD GNOME team proudly presents GNOME 3.28 for FreeBSD.kwm2018-09-3076-606/+4234 * Remove expired ports:rene2018-09-305-83/+0 * Remove dependency on kind-of restricted portsantoine2018-09-291-3/+1 * x11/alacritty: Fix build on 32bit architectureszeising2018-09-291-0/+41 * Fix whitespacezeising2018-09-291-1/+1 * x11/alacritty: Update to 0.2.0zeising2018-09-292-161/+182 * Bump PORTREVISION to chase update of multimedia/v4l_compat and libv4lriggs2018-09-293-1/+3 * x11/libxcb: Update to 1.13.1zeising2018-09-292-5/+5 * lang/rust: update to 1.29.1jbeich2018-09-292-0/+2 * Fix build on gcc-based archs.linimon2018-09-281-2/+2 * Update Objective-C LLVM version to 6.0.brooks2018-09-264-4/+4 * x11/ssddm: remove unnedeeded Qt dependenciestcberner2018-09-251-6/+4 * Fix build on gcc-based archs.linimon2018-09-231-1/+1 * - Update to 337ashish2018-09-222-4/+4 * x11/py-xdot: Update to 1.0dbaio2018-09-223-17/+5 * Update ilmbase and openexr to 2.3.0, rename OpenEXR to openexr.mandree2018-09-222-6/+6 * - Update to 336ehaupt2018-09-203-7/+19 * More precisely specify USES=compiler to fix build on gcc-basedlinimon2018-09-181-1/+1 * x11/radare-cutter: update to 1.7.1swills2018-09-182-10/+8 * Mark BROKEN: fails to build with radare2 2.9antoine2018-09-181-0/+2 * Update KDE Frameworks to 5.50tcberner2018-09-1811-33/+33 * Import two upstream patches, fixing UTF-8 normalization and resolvingmadpilot2018-09-173-0/+159 * Bump PORTREVISION on *-sbcl ports after lang/sbcl upgrade.krion2018-09-171-1/+1 * Deprecate dead -devel portsantoine2018-09-161-0/+2 * Add FCITX option.nobutaka2018-09-152-1/+7 * Fix WWWsunpoet2018-09-151-1/+1 * Update WWWsunpoet2018-09-151-1/+1 * Update WWWsunpoet2018-09-151-1/+1 * Update WWWsunpoet2018-09-151-1/+1 * - Add LICENSEamdmi32018-09-142-1/+3 * Change x11/xorgproto to become a build depzeising2018-09-1267-64/+67 * Backport security fixes for x11/sddmadridg2018-09-114-0/+114 * Add EXAMPLES options to ports that should have one.mat2018-09-101-1/+1 * Add DOCS options to ports that should have one.mat2018-09-1013-0/+26 * After an include, PLIST_SUB must be appended to, not overwritten.mat2018-09-102-4/+4 * Reassign all of tobez@'s p5 ports to perl@.des2018-09-101-1/+1 * Update x11/sddm to 0.17.adridg2018-09-0823-172/+353 * Reduce rc warnings from x11/sddm by setting default value for sddm_enableadridg2018-09-081-0/+1 * Update the current KDE Applications to 18.08.1, the latest release.adridg2018-09-071-3/+3 * Switch default version of samba to 4.7antoine2018-09-021-1/+1 * x11/xbanish: Update to 1.6tobik2018-09-012-4/+4 * Unbreak nVidia drivers on recent -CURRENT, after change toglebius2018-09-011-2/+3 * multimedia/libxine: Update to 1.2.9tobik2018-08-311-0/+1 * Deprecate KDE4 software, categories www-x11-themesadridg2018-08-3110-0/+30 * Bump PORTREVISION on *-sbcl ports after lang/sbcl upgrade.krion2018-08-301-1/+1 * Fix build with clang7.adridg2018-08-303-0/+60 * x11/fbdesk: Fix build with Clang 6tobik2018-08-281-0/+19 * x11/slim: enable UTF8 by defaultswills2018-08-281-3/+4 * New port x11/lxqt-aboutjsm2018-08-284-0/+32 * update x11/mate-applets to 1.20.2ericbsd2018-08-273-44/+161 * update x11/mate-desktop to 1.20.3ericbsd2018-08-273-4/+6 * More fixes for kdelibs-kde4 for clang7. Same kind of changeadridg2018-08-262-0/+22 * Update KDE Applications to 18.08tcberner2018-08-253-4/+4 * New port x11/lxqt-runnerjsm2018-08-244-0/+37 * Massage strange comparison for clang7adridg2018-08-242-1/+18 * Update KDE Frameworks to the latest monthly, 5.49adridg2018-08-2424-46/+35 * x11/libX11: Update to 1.6.6zeising2018-08-233-5/+6 * x11/xscreensaver: Update to 5.40zeising2018-08-224-26/+13 * Unbreak nVidia drivers on recent -CURRENT, after change toglebius2018-08-221-0/+4 * Add `x11/perwindowlayoutd' which keeps per-window keyboard layout under X11.danfe2018-08-214-0/+39 * Update to 335ehaupt2018-08-152-4/+4 * x11/tint: Update to 16.6swills2018-08-152-5/+5 * x11/alacritty: Update to newer snapshottobik2018-08-143-318/+270 * Bump PORTREVISION on *-sbcl ports after lang/sbcl upgrade.krion2018-08-141-1/+1 * - Fix LICENSEamdmi32018-08-132-2/+2 * Update to 334ehaupt2018-08-132-5/+4 * Update xfce4-screenshooter-plugin to 1.9.3madpilot2018-08-112-4/+4 * multimedia/x264: update to 0.155.2917jbeich2018-08-101-1/+1 * Update to 3.2.9sunpoet2018-08-091-1/+1 * devel/boost-*: update to 1.68.0jbeich2018-08-095-5/+5 * x11/polybar: update to 3.2.1tcberner2018-08-092-4/+4 * Update x11/mate-terminal to 1.20.3ericbsd2018-08-093-34/+27 * Fix Xprint build issue.mat2018-08-061-0/+3 * - Add LICENSEamdmi32018-08-051-0/+4 * Fix a common grammar error: "can not" means the opposite of "cannot."adamw2018-08-021-1/+1 * - Update to 0.93.2amdmi32018-08-013-17/+4 * x11/kde5: Pull in the complete plasma5 metaport and not only the desktop.tcberner2018-08-011-2/+3 * Remove evieext here as well.zeising2018-08-011-1/+0 * Remove x11/evieextzeising2018-08-014-23/+0 * Switch to xorgproto instead of individual packageszeising2018-08-01189-971/+797 * Bump PORTREVISION for ports depending on the canonical version of GCCgerald2018-07-3038-15/+38 * Update math/libqalculate and math/qalculate to 2.6.1jhale2018-07-272-2/+2 * Fix x11/xorg-minimal when build with VIDEO_DRIVER="intel"eadler2018-07-251-1/+1 * x11/polybar: Update to 3.2.0tobik2018-07-242-5/+4 * Cleanup patch code that does nothing useful these days (changes are longdanfe2018-07-231-11/+2 * Update `x11/nvidia-driver' to version 390.77. Changes in this release:danfe2018-07-212-5/+5 * x11/xprintidle: Change to a more recent fork that has version 2.1yuri2018-07-212-5/+6 * x11/wbar: Unbreak build with Clang 6tobik2018-07-203-0/+60 * Update KDE Frameworks to 5.48.0tcberner2018-07-2012-34/+33 * - update to 5.55jgh2018-07-194-5/+41 * New port: x11/xprintidle: Print X idle timeyuri2018-07-194-0/+29 * Add new port x11/lxqt-globalkeys-l10njsm2018-07-185-0/+81 * New port: x11/admiral -- Merge concurrent outputs for a status bartcberner2018-07-154-0/+133 * Update xfce4-whiskermenu-plugin to 2.2.1madpilot2018-07-143-4/+5 * Update KDE Applications to 18.04.3tcberner2018-07-141-3/+3 * Remove dependencies on lang/python3.mat2018-07-131-3/+4 * devel/py-efl:gblach2018-07-103-12/+12 * Changing maintainer email address (same maintainer, new address)jsm2018-07-105-5/+5 * Do not use x11/lxqt-l10n as a master port. Fix install path of qtermwidget-l...jsm2018-07-106-13/+17 * Remove unneeded depency, and fix pkg-descrjsm2018-07-082-2/+3 * - Add LICENSEamdmi32018-07-082-2/+5 * x11/nxcomp: Fix build with Clang 6tobik2018-07-081-0/+45 * x11/libXScrnSaver: Update to 1.2.3zeising2018-07-072-4/+4 * x11/libXxf86misc: Update to 1.0.4zeising2018-07-072-4/+4 * x11/libXinerama: Update to 1.1.4zeising2018-07-072-4/+4 * x11/radare-cutter: update to 1.5swills2018-07-053-7/+23 * Try to fix build with lldamdmi32018-07-031-0/+2 * Update nVidia driver to the latest long lived branch version 390.67.danfe2018-07-022-5/+6 * lang/ghc: Update to 8.4.3 and bump PORTREVISION's of all Haskell ports.arrowd2018-06-303-3/+3 * devel/icu: update to 62.1jbeich2018-06-292-1/+2 * Bump PORTREVISION on *-sbcl ports after lang/sbcl upgrade.krion2018-06-291-1/+1 * Replace bsd.qt.mk by Uses/qt.mk and Uses/qt-dist.mktcberner2018-06-29