Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2014-07-08 18:21:45 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2014-07-08 18:21:45 (GMT)
commitcbdea15def11047f0c8e28eb0acb2b1478db1c10 (patch)
treeed6ad91404b6236e7850cd8f44263a594874bcd4
parent070923f77c21296807deffd86eba637c0b1e51d6 (diff)
Fx parse of budget entry
-rw-r--r--budgetscreen.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/budgetscreen.py b/budgetscreen.py
index 4efd0ae..48e952b 100644
--- a/budgetscreen.py
+++ b/budgetscreen.py
@@ -234,7 +234,8 @@ class BudgetScreen(Gtk.VBox):
def budget_changed_cb(self, widget, category):
text = widget.get_text()
if text != '':
- self.activity.data['budgets'][category] = {'amount': float(text)}
+ amount = abs(locale.atof(text))
+ self.activity.data['budgets'][category] = {'amount': amount}
else:
del self.activity.data['budgets'][category]
self.queue_draw()