[gnome-calculator] Use angle units from settings in --solve (bgo#778274)



commit 3bd5e6c88ce5d815d93c7c1d3769134fdaf5f43c
Author: Robert Roth <robert roth off gmail com>
Date:   Wed Feb 8 05:52:54 2017 +0200

    Use angle units from settings in --solve (bgo#778274)

 src/gnome-calculator.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-calculator.vala b/src/gnome-calculator.vala
index f1cccb1..5cb9a75 100644
--- a/src/gnome-calculator.vala
+++ b/src/gnome-calculator.vala
@@ -217,10 +217,12 @@ public class Calculator : Gtk.Application
             if (decimal == null)
                 decimal = "";
 
+            settings = new Settings ("org.gnome.calculator");
+            var angle_units = (AngleUnit) settings.get_enum ("angle-units");
             var e = new SolveEquation (solve_equation.replace (tsep_string, "").replace (decimal, "."));
             e.base = 10;
             e.wordlen = 32;
-            e.angle_units = AngleUnit.DEGREES;
+            e.angle_units = angle_units;
 
             ErrorCode error;
             string? error_token = null;


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