[gcalctool] Set currency on first start (Bug #640818)



commit 9304d1d6b793d3ce45507fd77cf28fb0e2449b45
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Mar 18 15:29:13 2011 +1100

    Set currency on first start (Bug #640818)

 NEWS                 |    1 +
 src/math-converter.c |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index bfbd5a6..6b5c427 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Overview of changes in gcalctool 5.91.91
     * 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
+    * Set currency on first start (Bug #640818)
 
 Overview of changes in gcalctool 5.91.90
 
diff --git a/src/math-converter.c b/src/math-converter.c
index 19d3fbe..92c2dc9 100644
--- a/src/math-converter.c
+++ b/src/math-converter.c
@@ -223,7 +223,10 @@ math_converter_set_conversion(MathConverter *converter, /*const gchar *category,
     ua = unit_manager_get_unit_by_name(unit_manager_get_default(), unit_a);
     ub = unit_manager_get_unit_by_name(unit_manager_get_default(), unit_b);
     if (!ua || !ub)
+    {
+        gtk_combo_box_set_active(GTK_COMBO_BOX(converter->priv->from_combo), 0);
         return;
+    }
 
     set_active_unit(GTK_COMBO_BOX(converter->priv->from_combo), NULL, ua);
     set_active_unit(GTK_COMBO_BOX(converter->priv->to_combo), NULL, ub);



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