[gcalctool] Only use thousands separators in base 10



commit b553c4b1b61d3b470dec499d9dc1b3b3dc677cec
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Mar 18 14:46:55 2011 +1100

    Only use thousands separators in base 10

 NEWS                |    1 +
 src/mp-serializer.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 3f93710..bfbd5a6 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Overview of changes in gcalctool 5.91.91
     * Disable localized digits (Bug #644980)
     * Fix crash doing bitwise operations with large numbers (Bug #637328)
     * Don't use automatic exponential format when not in base 10
+    * Only use thousands separators in base 10
 
 Overview of changes in gcalctool 5.91.90
 
diff --git a/src/mp-serializer.c b/src/mp-serializer.c
index e3af219..3b451ee 100644
--- a/src/mp-serializer.c
+++ b/src/mp-serializer.c
@@ -105,7 +105,7 @@ mp_cast_to_string_real(MpSerializer *serializer, const MPNumber *x, int base, gb
         g_string_prepend_c(string, d < 16 ? digits[d] : '?');
 
         i++;
-        if (serializer->priv->show_tsep && i == serializer->priv->tsep_count) {
+        if (serializer->priv->base == 10 && serializer->priv->show_tsep && i == serializer->priv->tsep_count) {
             g_string_prepend_unichar(string, serializer->priv->tsep);
             i = 0;
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]