From d3e6634f5e4edc5c2178102930d043f08e23bdfb Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 5 Sep 2002 15:09:28 +0000 Subject: [PATCH] r1892: Use K, M and G consistantly (Marcin Juszkiewicz). --- ROX-Filer/Help/Changes | 1 + ROX-Filer/src/find.c | 6 +++--- ROX-Filer/src/support.c | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index ad193cf4..1b636c7d 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -6,6 +6,7 @@ ~~~~~~~~~~~ Be more forceful about setting the pinboard backdrop; some themes were overriding it (reported by Biju Chacko). +Use K, M and G consistantly (Marcin Juszkiewicz). 03-Sep-2002 ~~~~~~~~~~~ diff --git a/ROX-Filer/src/find.c b/ROX-Filer/src/find.c index f7650b84..0c69fa86 100644 --- a/ROX-Filer/src/find.c +++ b/ROX-Filer/src/find.c @@ -920,11 +920,11 @@ static Eval *parse_eval(const gchar **expression) if (MATCH(_("Byte")) || MATCH(_("Bytes"))) ; - else if (MATCH("Kb")) + else if (MATCH("Kb") || MATCH("K")) value *= 1<<10; - else if (MATCH("Mb")) + else if (MATCH("Mb") || MATCH("M")) value *= 1<<20; - else if (MATCH("Gb")) + else if (MATCH("Gb") || MATCH("G")) value *= 1<<30; else if (MATCH(_("Sec")) || MATCH(_("Secs"))) ; diff --git a/ROX-Filer/src/support.c b/ROX-Filer/src/support.c index d841b882..291dea97 100644 --- a/ROX-Filer/src/support.c +++ b/ROX-Filer/src/support.c @@ -257,10 +257,10 @@ char *format_size(off_t size) { size += 1023; size >>= 10; - units = "Gb"; + units = "G"; } else - units = "Mb"; + units = "M"; } else units = "K"; @@ -277,7 +277,7 @@ char *format_size(off_t size) return buffer; } -/* Return a string in the form '23Mb' in a static buffer valid until +/* Return a string in the form '23M' in a static buffer valid until * the next call. Aligned to the right (5 chars). */ char *format_size_aligned(off_t size) @@ -338,10 +338,10 @@ gchar *format_double_size(double size) { size += 1023; size /= 1024; - units = "Gb"; + units = "G"; } else - units = "Mb"; + units = "M"; } else units = "K"; -- 2.11.4.GIT