[gcalctool/gnome-2-28] Handle ', ' as radix point when editing display



commit a229dae9d4e72ef2c77b4b253fded420ddc06046
Author: Robert Ancell <robert ancell gmail com>
Date:   Tue Oct 13 11:30:06 2009 +1100

    Handle ',' as radix point when editing display

 ChangeLog        |    4 ++++
 src/mp-convert.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3f078b7..8d2249d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,10 @@
 gcalctool change history.
 =========================
 
+2009-10-13 Robert Ancell <robert ancell gmail com>
+
+    * Handle ',' as radix point when editing display
+
 2009-10-09 Robert Ancell <robert ancell gmail com>
 
     * Fix inactive random button
diff --git a/src/mp-convert.c b/src/mp-convert.c
index eb0ff79..b17b536 100644
--- a/src/mp-convert.c
+++ b/src/mp-convert.c
@@ -640,7 +640,7 @@ mp_set_from_string(const char *str, int base, MPNumber *z)
         mp_add(z, &fraction, z);
     }
     
-    if (*c == '.') {
+    if (*c == '.' || *c == ',') {
         has_fraction = TRUE;
         c++;
     } else {



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