aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-10-26 04:15:40 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-10-26 04:15:40 +0800
commit432f75ead1bed9874c45d624201636cfd1775ed9 (patch)
tree3366694817e36667610b1759c526dadf07df699c /composer
parentd7479876f5ee2c682b4af7c71dc7b6901f87df26 (diff)
downloadgsoc2013-evolution-432f75ead1bed9874c45d624201636cfd1775ed9.tar
gsoc2013-evolution-432f75ead1bed9874c45d624201636cfd1775ed9.tar.gz
gsoc2013-evolution-432f75ead1bed9874c45d624201636cfd1775ed9.tar.bz2
gsoc2013-evolution-432f75ead1bed9874c45d624201636cfd1775ed9.tar.lz
gsoc2013-evolution-432f75ead1bed9874c45d624201636cfd1775ed9.tar.xz
gsoc2013-evolution-432f75ead1bed9874c45d624201636cfd1775ed9.tar.zst
gsoc2013-evolution-432f75ead1bed9874c45d624201636cfd1775ed9.zip
(size_to_string): Return NULL
instead of the empty string if the size is less than one K. (update): Only put the size if size_to_string() doesn't return NULL. [#32751] svn path=/trunk/; revision=18439
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog7
-rw-r--r--composer/e-msg-composer-attachment-bar.c10
2 files changed, 14 insertions, 3 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index a7a6e003a2..2caf594e13 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,10 @@
+2002-10-25 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-msg-composer-attachment-bar.c (size_to_string): Return NULL
+ instead of the empty string if the size is less than one K.
+ (update): Only put the size if size_to_string() doesn't return
+ NULL. [#32751]
+
2002-10-18 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-hdrs.c (create_from_optionmenu): Only add the
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index 1bf315ad08..d81c5cc16d 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -98,7 +98,7 @@ size_to_string (gulong size)
I am not sure this will be OK for all the languages. */
if (size < 1e3L) {
- size_string = g_strdup ("");
+ size_string = NULL;
} else {
gdouble displayed_size;
@@ -372,8 +372,12 @@ update (EMsgComposerAttachmentBar *bar)
if (attachment->size) {
size_string = size_to_string (attachment->size);
- label = g_strdup_printf ("%s (%s)", desc, size_string);
- g_free (size_string);
+ if (size_string == NULL) {
+ label = g_strdup (desc);
+ } else {
+ label = g_strdup_printf ("%s (%s)", desc, size_string);
+ g_free (size_string);
+ }
} else
label = g_strdup (desc);