Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/olpcgames/gtkEvent.py
diff options
context:
space:
mode:
Diffstat (limited to 'olpcgames/gtkEvent.py')
-rw-r--r--olpcgames/gtkEvent.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/olpcgames/gtkEvent.py b/olpcgames/gtkEvent.py
index 6b20102..aad1098 100644
--- a/olpcgames/gtkEvent.py
+++ b/olpcgames/gtkEvent.py
@@ -1,8 +1,8 @@
"""gtkEvent.py: translate GTK events into Pygame events."""
-import pygtk
-pygtk.require('2.0')
-import gtk
-import gobject
+import gi
+gi.require_version('Gtk', '3.0')
+from gi.repository import Gtk
+from gi.repository import GObject
import pygame
from olpcgames import eventwrap
import logging
@@ -233,7 +233,7 @@ class Translator(object):
else:
x = event.x
y = event.y
- state = event.state
+ state = event.get_state()
rel = (x - self.__mouse_pos[0],
y - self.__mouse_pos[1])