From 43917f0a6deadef5dbd4c37bec8c7b245c22ce61 Mon Sep 17 00:00:00 2001 From: Dan Vrátil Date: Thu, 9 Aug 2012 16:15:27 +0200 Subject: Remove some unused code from EMailReader This is leftover from the WebKit port and it didn't work properly. Most of the code was removed, some was moved to a better place. --- em-format/e-mail-formatter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'em-format') diff --git a/em-format/e-mail-formatter.c b/em-format/e-mail-formatter.c index 99b00361c9..21779162c5 100644 --- a/em-format/e-mail-formatter.c +++ b/em-format/e-mail-formatter.c @@ -1321,15 +1321,17 @@ e_mail_formatter_set_charset (EMailFormatter *formatter, const gchar *charset) { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); - g_return_if_fail (charset && *charset); if (g_strcmp0 (formatter->priv->charset, charset) == 0) return; - if (formatter->priv->charset) - g_free (formatter->priv->charset); + g_free (formatter->priv->charset); - formatter->priv->charset = g_strdup (charset); + if (!charset) { + formatter->priv->charset = NULL; + } else { + formatter->priv->charset = g_strdup (charset); + } g_object_notify (G_OBJECT (formatter), "charset"); } @@ -1352,9 +1354,7 @@ e_mail_formatter_set_default_charset (EMailFormatter *formatter, if (g_strcmp0 (formatter->priv->default_charset, default_charset) == 0) return; - if (formatter->priv->default_charset) - g_free (formatter->priv->default_charset); - + g_free (formatter->priv->default_charset); formatter->priv->default_charset = g_strdup (default_charset); g_object_notify (G_OBJECT (formatter), "default-charset"); -- cgit