Example #1
0
 def _load_ball_cb(self, widget, event, ball):
     if ball == 'custom':
         chooser(self, 'Image', self._new_ball_from_journal)
     else:
         self._bounce_window.ball.new_ball(os.path.join(
             activity.get_bundle_path(), 'images', ball + '.svg'))
         self._bounce_window.set_background(BGDICT[BALLDICT[ball][1]][1])
     self._current_ball = ball
Example #2
0
 def _combo_cb(self, arg=None):
     ''' Load a new ball based on the selector value. '''
     if not hasattr(self, '_ball_selector'):
         return
     if BALLS[self._ball_selector.get_active()] == _('basketball'):
         self.bounce_window.ball.new_ball(os.path.join(
                 activity.get_bundle_path(), 'basketball.svg'))
     elif BALLS[self._ball_selector.get_active()] == _('soccer ball'):
         self.bounce_window.ball.new_ball(os.path.join(
                 activity.get_bundle_path(), 'soccer.svg'))
     else:
         chooser(self, '', self._new_ball_from_journal)
 def _load_bg_cb(self, widget, event, bg):
     if bg == 'custom':
         chooser(self, 'Image', self._new_background_from_journal)
     else:
         self._bounce_window.set_background(BGDICT[bg][1])
 def _load_bg_cb(self, widget, event, bg):
     if bg == 'custom':
         chooser(self, 'Image', self._new_background_from_journal)
     else:
         self._bounce_window.set_background(BGDICT[bg][1])