diff options
author | Cristhofer Travieso <cristhofert97@gmail.com> | 2012-09-12 16:19:35 (GMT) |
---|---|---|
committer | Cristhofer Travieso <cristhofert97@gmail.com> | 2012-09-12 16:27:29 (GMT) |
commit | f8c81a72ce93b41ec43ba9697b741cf7fd954834 (patch) | |
tree | 0351e9e16a008817918e281c219f48743a48fa46 | |
parent | f32d54aa5f3a87cf989a7e687f72020ecc9ea350 (diff) |
Fix in-comma separator errorv1.1
-rw-r--r-- | activity.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/activity.py b/activity.py index 55fc5ed..4c32eda 100644 --- a/activity.py +++ b/activity.py @@ -34,8 +34,8 @@ ENTER_KEY = 65293 class ConvertActivity(activity.Activity): def __init__(self, handle): activity.Activity.__init__(self, handle, True) - - self.max_participants = 1 + + self.max_participants = 1 self.dic = {} # Canvas @@ -205,7 +205,7 @@ class ConvertActivity(activity.Activity): def _get_active_text(self, combobox): active = combobox.get_active() keys = self.dic.keys() - keys.sort() + keys.sort() if active < 0: return None text = keys[active] @@ -218,7 +218,8 @@ class ConvertActivity(activity.Activity): active_combo2 = self.combo2.get_active() self.combo1.set_active(active_combo2) self.combo2.set_active(active_combo1) - self.spin.set_value(float(self.label.get_text().split(' ~ ')[1])) + self.spin.set_value(float( + self.label.get_text().split(' ~ ')[1].replace(',', '.'))) self._call() def resize_label(self, widget, event): |