Updating branch refs/heads/master
to dfc21091f888c3f7e372540534dbc30fb7c86ccf (commit)
from cdf354c334956f67e33910bfdfbe1fd2be3a49e0 (commit)
commit dfc21091f888c3f7e372540534dbc30fb7c86ccf
Author: Christian Dywan <[email protected]>
Date: Sun Jul 10 20:26:26 2011 +0200
Show size of attachments next to the name
postler/postler-content.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 9bb8472..415155e 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -833,11 +833,14 @@ public class Postler.Content : WebKit.WebView {
}
reply_markup = reply_markup.replace ("%message%",
"""
- <b>%s</b><div class="actions">
+ <b>%s</b> %s<div class="actions">
<a href="message-part:save:%d"
class="button">%s</a>
<a href="message-part:open:%d"
class="button">%s</a></div>
""".printf (
attachment_part.filename ??
attachment_part.mime_type,
+ /* Estimated size of decoded Base64 is 70% */
+ GLib.format_size_for_display
((int64)(attachment_part.body.len
+ * (mime_type_is_text
(attachment_part.mime_type) ? 1 : 0.7))),
child.parts.position (child.parts.find
(attachment_part)), _("Save"),
child.parts.position (child.parts.find
(attachment_part)), _("Open")));
}
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits