diff options
author | Kshitij <Kshitij@Kshitijs-MacBook-Pro.local> | 2012-12-25 14:23:06 (GMT) |
---|---|---|
committer | Kshitij <Kshitij@Kshitijs-MacBook-Pro.local> | 2012-12-25 14:23:06 (GMT) |
commit | 1315986303a98f0f93087c8c36af1886c86e4d1c (patch) | |
tree | f0de1e016e8f429ce92422ff067962b8fd9f580a /olpcgames/gtkEvent.py | |
parent | 87421d81339730f3231edd5245a53bb6658791be (diff) |
PyGI changes
Diffstat (limited to 'olpcgames/gtkEvent.py')
-rw-r--r-- | olpcgames/gtkEvent.py | 10 |
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]) |