Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Saldivar <jsaldivar@paraguayeduca.org>2010-05-25 13:50:45 (GMT)
committer Jorge Saldivar <jsaldivar@paraguayeduca.org>2010-05-25 13:50:45 (GMT)
commit8fc28f25c3331d98970d36785677fce80d9c9eb3 (patch)
tree81729e994454844c0997a7621c4f1409712581cd
parentd4def0b64fe70fed20cc01f85d516173d5a6da50 (diff)
Some bugs fix
-rw-r--r--poll.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/poll.py b/poll.py
index 15d7145..eb7ab4a 100644
--- a/poll.py
+++ b/poll.py
@@ -621,9 +621,8 @@ class PollBuilder(activity.Activity):
radio_box.append(hippo.CanvasWidget(
widget = theme_radiobutton(button)),
hippo.PACK_EXPAND)
- if choice == self.current_vote \
- and self._remember_last_vote:
- button.set_active(True)
+ if choice == self.current_vote:
+ button.set_active(True)
if not self._poll.images[int(choice)] == '':
hbox = gtk.HBox()
@@ -774,9 +773,18 @@ class PollBuilder(activity.Activity):
self._logger.debug('Local vote failed: '
'poll closed.')
self._logger.debug('Results: '+str(self._poll.data))
- self.draw_poll_details_box()
if self._play_vote_sound:
self._play_vote_button_sound()
+ if not self._remember_last_vote:
+ self.current_vote = None
+ self.draw_poll_details_box()
+ else:
+ alert = NotifyAlert(timeout=3)
+ alert.props.title = _('Poll Activity')
+ alert.props.msg = _('To vote you have to select first one option')
+ self.add_alert(alert)
+ alert.connect('response', self._alert_cancel_cb)
+ alert.show()
def button_select_clicked(self, button):
"""Show Choose a Poll canvas"""