[gnome-calculator] Fix layout based decimal saperator on number pad.



commit 41169ec8668e1ee09104cfcf06b54df701bcda77
Author: PioneerAxon <arth svnit gmail com>
Date:   Mon Jun 9 01:34:24 2014 +0530

    Fix layout based decimal saperator on number pad.
    
    Original fix submitted by Pierre Ossman.
    See bugzilla Bug #652362 for more information.

 src/math-display.vala |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/math-display.vala b/src/math-display.vala
index 613460a..c708ed4 100644
--- a/src/math-display.vala
+++ b/src/math-display.vala
@@ -173,8 +173,9 @@ public class MathDisplay : Gtk.Viewport
             return true;
         }
 
-        /* Numeric keypad will often insert '.' regardless of locale */
-        if (event.keyval == Gdk.Key.KP_Decimal)
+        /* Numeric keypad will insert '.' or ',' depending on layout */
+        if ((event.keyval == Gdk.Key.KP_Decimal) ||
+            (event.keyval == Gdk.Key.KP_Separator))
         {
             equation.insert_numeric_point ();
             return true;


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