aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakao Fujiwara <takao.fujiwara@sun.com>2009-04-07 19:34:29 +0800
committerTakao Fujiwara <fujiwarat@src.gnome.org>2009-04-07 19:34:29 +0800
commitc57708891310320ae0160e1fe04e0138c745e7a0 (patch)
treead5a2ad9a670dc840fc93e34659c8f828d4d588d
parent80b575ffb834f003c7e0742b60ac02d5cb09a43a (diff)
downloadgsoc2013-evolution-c57708891310320ae0160e1fe04e0138c745e7a0.tar.gz
gsoc2013-evolution-c57708891310320ae0160e1fe04e0138c745e7a0.tar.zst
gsoc2013-evolution-c57708891310320ae0160e1fe04e0138c745e7a0.zip
Reviewed by Milan Crha <mcrha@redhat.com> Reviewed by Matthew Barnes
2009-04-07 Takao Fujiwara <takao.fujiwara@sun.com> Reviewed by Milan Crha <mcrha@redhat.com> Reviewed by Matthew Barnes <mbarnes@redhat.com> * Fixes bug #537530 * misc/e-attachment-bar.c (update): Use g_filename_to_utf8 for attachment filenames. svn path=/trunk/; revision=37497
-rw-r--r--widgets/ChangeLog10
-rw-r--r--widgets/misc/e-attachment-bar.c18
2 files changed, 22 insertions, 6 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index 3305630c4b..13337e0d76 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,13 @@
+2009-04-07 Takao Fujiwara <takao.fujiwara@sun.com>
+
+ Reviewed by Milan Crha <mcrha@redhat.com>
+ Reviewed by Matthew Barnes <mbarnes@redhat.com>
+
+ * Fixes bug #537530
+
+ * misc/e-attachment-bar.c (update):
+ Use g_filename_to_utf8 for attachment filenames.
+
2009-03-25 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #576694
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index 2da9d3541c..de45861055 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -389,7 +389,7 @@ update (EAttachmentBar *bar)
CamelContentType *content_type;
char *size_string, *label;
GdkPixbuf *pixbuf = NULL;
- const char *desc;
+ char *desc;
attachment = priv->attachments->pdata[i];
@@ -443,20 +443,26 @@ update (EAttachmentBar *bar)
desc = camel_mime_part_get_description (attachment->body);
if (!desc || *desc == '\0') {
- if (attachment->file_name)
- desc = attachment->file_name;
- else
+ if (attachment->file_name) {
+ desc = g_filename_to_utf8 (attachment->file_name, -1, NULL, NULL, NULL);
+ } else {
desc = camel_mime_part_get_filename (attachment->body);
+ if (desc)
+ desc = g_strdup (desc);
+ }
}
if (!desc)
- desc = _("attachment");
+ desc = g_strdup (_("attachment"));
if (attachment->size && (size_string = g_format_size_for_display (attachment->size))) {
label = g_strdup_printf ("%s (%s)", desc, size_string);
+ g_free (desc);
g_free (size_string);
- } else
+ } else {
label = g_strdup (desc);
+ g_free (desc);
+ }
if (pixbuf == NULL) {
char *mime_type;