Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
authorGary Martin <gary@garycmartin.com>2010-10-08 15:25:04 (GMT)
committer Gary Martin <gary@garycmartin.com>2010-10-08 15:25:04 (GMT)
commit2161743d9147092cfaaa6b4faf275325e00e5c4f (patch)
treeeba2c3cba2ee418323c8a296c14e19c84bc6cf98 /activity.py
parent4dfc1de9c92a6607f137dc7f7a1333d155d88eb2 (diff)
Quick pass through pylint.
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/activity.py b/activity.py
index 24eed3c..477303d 100644
--- a/activity.py
+++ b/activity.py
@@ -28,7 +28,7 @@ import gtk
try:
# >= 0.86 toolbars
- from sugar.graphics.toolbarbox import ToolbarButton, ToolbarBox
+ from sugar.graphics.toolbarbox import ToolbarBox
from sugar.activity.widgets import ActivityToolbarButton
from sugar.activity.widgets import StopButton
except ImportError:
@@ -51,7 +51,8 @@ class PhysicsActivity(olpcgames.PyGameActivity):
"""
surface = pygame.display.get_surface()
width, height = surface.get_width(), surface.get_height()
- pixbuf = gtk.gdk.pixbuf_new_from_data(pygame.image.tostring(surface, "RGB"),
+ pixbuf = gtk.gdk.pixbuf_new_from_data(pygame.image.tostring(surface,
+ "RGB"),
gtk.gdk.COLORSPACE_RGB, 0, 8,
width, height,
3 * width)
@@ -158,7 +159,8 @@ class PhysicsActivity(olpcgames.PyGameActivity):
self.radioList[button] = c.name
def stop_play_cb(self, button):
- pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT, action="stop_start_toggle"))
+ pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT,
+ action="stop_start_toggle"))
self.stop_play_state = not self.stop_play_state
# Update button
if self.stop_play_state:
@@ -169,12 +171,15 @@ class PhysicsActivity(olpcgames.PyGameActivity):
self.stop_play.set_tooltip(_("Start"))
def radioClicked(self, button):
- pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT, action=self.radioList[button]))
+ pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT,
+ action=self.radioList[button]))
def _focus_event(self, event, data=None):
- """Send focus events to pygame to allow it to more gracefully idle when in the background.
+ """Send focus events to pygame to allow it to idle when in background.
"""
if data.state == gtk.gdk.VISIBILITY_FULLY_OBSCURED:
- pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT, action="focus_out"))
+ pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT,
+ action="focus_out"))
else:
- pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT, action="focus_in"))
+ pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT,
+ action="focus_in"))