aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-04-20 22:32:32 +0800
committerDan Winship <danw@src.gnome.org>2001-04-20 22:32:32 +0800
commitc66a38af5fd0147dd45be409e3bfe4afbd6e409a (patch)
tree2a367728922a9a1fab3f732fb37c02c9b82c09d9
parentfda26f20559d16b449a23ff3926e6d5d5f7ec802 (diff)
downloadgsoc2013-evolution-c66a38af5fd0147dd45be409e3bfe4afbd6e409a.tar.gz
gsoc2013-evolution-c66a38af5fd0147dd45be409e3bfe4afbd6e409a.tar.zst
gsoc2013-evolution-c66a38af5fd0147dd45be409e3bfe4afbd6e409a.zip
Convert subject from utf8 before passing it on.
* mail-ops.c: (send_mail_desc): Convert subject from utf8 before passing it on. svn path=/trunk/; revision=9474
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-ops.c18
2 files changed, 18 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e1583f3e79..d4bed1ea05 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-20 Kjartan Maraas <kmaraas@gnome.org>
+
+ * mail-ops.c: (send_mail_desc): Convert subject from utf8
+ before passing it on.
+
2001-04-20 Gediminas Paulauskas <menesis@delfi.lt>
* mail-display.c: #if 0'd out my not-working selection code
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index c97144e1e0..348cb72206 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -32,6 +32,7 @@
/* #include <ctype.h> */
#include <errno.h>
#include <gal/util/e-util.h>
+#include <gal/widgets/e-unicode.h>
#include <camel/camel-mime-filter-from.h>
#include <camel/camel-operation.h>
#include "mail.h"
@@ -580,12 +581,19 @@ struct _send_mail_msg {
static char *send_mail_desc(struct _mail_msg *mm, int done)
{
struct _send_mail_msg *m = (struct _send_mail_msg *)mm;
- const char *subject;
+ char *subject;
+ const char *subject_utf8;
+
+ subject_utf8 = camel_mime_message_get_subject(m->message);
+
+ if (subject_utf8) {
+ char *desc;
- subject = camel_mime_message_get_subject(m->message);
- if (subject && subject[0])
- return g_strdup_printf (_("Sending \"%s\""), subject);
- else
+ subject = e_utf8_to_locale_string (subject_utf8);
+ desc = g_strdup_printf (_("Sending \"%s\""), subject);
+ g_free (subject);
+ return desc;
+ } else
return g_strdup(_("Sending message"));
}