projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Fixes NB#89889, if the size is < 1Kb then show it as 1Kb
[modest]
/
src
/
modest-text-utils.c
diff --git
a/src/modest-text-utils.c
b/src/modest-text-utils.c
index
9619c8d
..
deb2971
100644
(file)
--- a/
src/modest-text-utils.c
+++ b/
src/modest-text-utils.c
@@
-906,6
+906,7
@@
modest_text_utils_quote_body (GString *output, const gchar *text,
iter = text;
len = strlen(text);
iter = text;
len = strlen(text);
+ remaining = g_string_new ("");
do {
l = get_next_line (text, len, iter);
iter = iter + l->len + 1;
do {
l = get_next_line (text, len, iter);
iter = iter + l->len + 1;
@@
-1004,13
+1005,17
@@
modest_text_utils_quote_html (const gchar *text,
"<body>\n<br/>\n");
if (text || cite || signature) {
"<body>\n<br/>\n");
if (text || cite || signature) {
+ GString *quoted_text;
g_string_append (result_string, "<pre>\n");
if (signature) {
quote_html_add_to_gstring (result_string, SIGNATURE_MARKER);
quote_html_add_to_gstring (result_string, signature);
}
quote_html_add_to_gstring (result_string, cite);
g_string_append (result_string, "<pre>\n");
if (signature) {
quote_html_add_to_gstring (result_string, SIGNATURE_MARKER);
quote_html_add_to_gstring (result_string, signature);
}
quote_html_add_to_gstring (result_string, cite);
- quote_html_add_to_gstring (result_string, text);
+ quoted_text = g_string_new ("");
+ quoted_text = modest_text_utils_quote_body (quoted_text, text, ">", limit);
+ quote_html_add_to_gstring (result_string, quoted_text->str);
+ g_string_free (quoted_text, TRUE);
if (attachments) {
gchar *attachments_string = quoted_attachments (attachments);
quote_html_add_to_gstring (result_string, attachments_string);
if (attachments) {
gchar *attachments_string = quoted_attachments (attachments);
quote_html_add_to_gstring (result_string, attachments_string);
@@
-1650,8
+1655,10
@@
modest_text_utils_get_display_size (guint64 size)
const guint MB=1024 * KB;
const guint GB=1024 * MB;
const guint MB=1024 * KB;
const guint GB=1024 * MB;
+ if (size == 0)
+ return g_strdup_printf (_FM("sfil_li_size_kb"));
if (0 <= size && size < KB)
if (0 <= size && size < KB)
- return g_strdup_printf (_FM("sfil_li_size_kb"), 1);
+ return g_strdup_printf (_FM("sfil_li_size_1kb_99kb"), 1);
else if (KB <= size && size < 100 * KB)
return g_strdup_printf (_FM("sfil_li_size_1kb_99kb"), size / KB);
else if (100*KB <= size && size < MB)
else if (KB <= size && size < 100 * KB)
return g_strdup_printf (_FM("sfil_li_size_1kb_99kb"), size / KB);
else if (100*KB <= size && size < MB)