Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-02-07 17:26:19 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-02-07 17:26:19 (GMT)
commit5c787a8a3a58ead27fbb011c02e9c09d61634b6e (patch)
tree8fade94f02b5a654d098f60d73e31c5cdf1f2057
parent2d5ba90d4d380fa11a85997182ff00cc6f6e5cd0 (diff)
convert entries to int
-rw-r--r--YupanaActivity.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/YupanaActivity.py b/YupanaActivity.py
index bb86a6e..d065ec3 100644
--- a/YupanaActivity.py
+++ b/YupanaActivity.py
@@ -195,7 +195,6 @@ class YupanaActivity(activity.Activity):
separator_factory(self.custom_toolbar, False, True)
button_factory('view-refresh', self.custom_toolbar, self._custom_cb,
tooltip=_('Reload custom values.'))
-
def _new_yupana_cb(self, button=None):
''' Start a new yupana. '''
@@ -218,12 +217,12 @@ class YupanaActivity(activity.Activity):
self.status.set_label(_('fibanocci mode'))
def _custom_cb(self, button=None):
- if hasattr(self, 'ones'):
- self._yupana.custom[0] = self._ones.get_text()
- self._yupana.custom[1] = self._twos.get_text()
- self._yupana.custom[2] = self._threes.get_text()
- self._yupana.custom[3] = self._fives.get_text()
- self._yupana.custom[4] = self._base.get_text()
+ if hasattr(self, '_ones'):
+ self._yupana.custom[0] = int(self._ones.get_text())
+ self._yupana.custom[1] = int(self._twos.get_text())
+ self._yupana.custom[2] = int(self._threes.get_text())
+ self._yupana.custom[3] = int(self._fives.get_text())
+ self._yupana.custom[4] = int(self._base.get_text())
self._reload_custom = False
else:
self._reload_custom = True