Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--activity.py32
-rw-r--r--tools.py3
3 files changed, 19 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index b6cb09a..c1ae39d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
*.pyc
+*.pyo
+*.bak
locale
.DS_Store
dist
diff --git a/activity.py b/activity.py
index 5771b99..346a262 100644
--- a/activity.py
+++ b/activity.py
@@ -94,13 +94,6 @@ class PhysicsActivity(activity.Activity):
self._insert_create_tools(toolbar_box.toolbar)
- separator = Gtk.SeparatorToolItem()
- separator.props.draw = False
- separator.set_size_request(0, -1)
- separator.set_expand(True)
- toolbar_box.toolbar.insert(separator, -1)
- separator.show()
-
stop_button = StopButton(self)
toolbar_box.toolbar.insert(stop_button, -1)
stop_button.show()
@@ -129,7 +122,9 @@ class PhysicsActivity(activity.Activity):
for c in tools.allTools:
button = RadioToolButton(icon_name=c.icon)
if firstButton:
- button.set_group(firstButton.get_group())
+ # FIXME: Fatal Python error: (pygame parachute) Segmentation Fault
+ #button.set_group(firstButton.get_group())
+ pass
else:
firstButton = button
button.set_tooltip(c.toolTip)
@@ -145,10 +140,10 @@ class PhysicsActivity(activity.Activity):
self.stop_play_state = not self.stop_play_state
# Update button
if self.stop_play_state:
- self.stop_play.set_icon('media-playback-stop')
+ self.stop_play.set_icon_name('media-playback-stop')
self.stop_play.set_tooltip(_("Stop"))
else:
- self.stop_play.set_icon('media-playback-start')
+ self.stop_play.set_icon_name('media-playback-start')
self.stop_play.set_tooltip(_("Start"))
def radioClicked(self, button):
@@ -159,16 +154,21 @@ class PhysicsActivity(activity.Activity):
"""Send focus events to pygame to allow it to idle when in background.
"""
if data.state == Gdk.VisibilityState.FULLY_OBSCURED:
- pygame.event.post(pygame.event.Event(pygame.USEREVENT,
- action="focus_out"))
+ # FIXME: pygame.error: video system not initialized
+ #pygame.event.post(pygame.event.Event(pygame.USEREVENT,
+ # action="focus_out"))
+ pass
else:
self.game.show_fake_cursor = True
- pygame.event.post(pygame.event.Event(pygame.USEREVENT,
- action="focus_in"))
+ # FIXME: pygame.error: video system not initialized
+ #pygame.event.post(pygame.event.Event(pygame.USEREVENT,
+ # action="focus_in"))
def _window_event(self, window, event):
"""Send focus out event to pygame when switching to a desktop view.
"""
if event.changed_mask & Gdk.WindowState.ICONIFIED:
- pygame.event.post(pygame.event.Event(pygame.USEREVENT,
- action="focus_out"))
+ # FIXME: pygame.error: video system not initialized
+ #pygame.event.post(pygame.event.Event(pygame.USEREVENT,
+ # action="focus_out"))
+ pass
diff --git a/tools.py b/tools.py
index 358e1fe..9bf45ba 100644
--- a/tools.py
+++ b/tools.py
@@ -230,7 +230,7 @@ class TriangleTool(Tool):
self.line_delta = [mouse_x_y[0] - self.pt1[0],
mouse_x_y[1] - self.pt1[1]]
pygame.draw.polygon(self.game.screen, (100, 180, 255),
- self.vertices, 3)
+ self.vertices, 3)
pygame.draw.line(self.game.screen, (100, 180, 255),
self.pt1, mouse_x_y, 1)
@@ -557,7 +557,6 @@ class DestroyTool(Tool):
self.vertices = None
def handleToolEvent(self, event):
- Tool.handleToolEvent(self, event)
if pygame.mouse.get_pressed()[0]:
if not self.vertices: self.vertices = []
self.vertices.append(tuple_to_int(event.pos))