Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ball.py
diff options
context:
space:
mode:
Diffstat (limited to 'ball.py')
-rw-r--r--ball.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/ball.py b/ball.py
index 7750468..b17dbfa 100644
--- a/ball.py
+++ b/ball.py
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
#Copyright (c) 2011, Walter Bender, Paulina Clares, Chris Rowe
+# Ported to GTK3 - 2012:
+# Ignacio Rodríguez <ignaciorodriguez@sugarlabs.org>
+
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
@@ -10,8 +13,7 @@
# along with this library; if not, write to the Free Software
# Foundation, 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA
-
-import gtk
+from gi.repository import Gtk, Gdk, GObject
from math import pi
from sprites import Sprite
@@ -117,7 +119,7 @@ class Ball():
_logger.debug('Image file not found.')
return
try:
- self.ball.set_shape(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.ball.set_shape(GdkPixbuf.Pixbuf.new_from_file_at_size(
filename, SIZE, SIZE))
except:
_logger.debug('Could not load image from %s.', filename)