[gnome-calculator] Accept entry of comma and decimalpoint as decimal separator (#86)



commit 9e782d5a80f4dada2277aa6b3dcf550fecb73930
Author: Robert Roth <robert roth bee-tf ro>
Date:   Mon Feb 4 19:25:30 2019 +0200

    Accept entry of comma and decimalpoint as decimal separator (#86)

 src/math-display.vala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/math-display.vala b/src/math-display.vala
index 87e31400..87528e0c 100644
--- a/src/math-display.vala
+++ b/src/math-display.vala
@@ -216,7 +216,9 @@ public class MathDisplay : Gtk.Viewport
 
         /* Numeric keypad will insert '.' or ',' depending on layout */
         if ((event.keyval == Gdk.Key.KP_Decimal) ||
-            (event.keyval == Gdk.Key.KP_Separator))
+            (event.keyval == Gdk.Key.KP_Separator) ||
+            (event.keyval == Gdk.Key.decimalpoint) ||
+            (event.keyval == Gdk.Key.comma))
         {
             equation.insert_numeric_point ();
             return true;


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