summaryrefslogtreecommitdiff
path: root/caribou/antler/main.py
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gmail.com>2011-08-29 23:05:11 -0400
committerEitan Isaacson <eitan@monotonous.org>2011-08-31 09:19:27 -0700
commit1857bd953dc02ac781991f0b97b488b4f300b01f (patch)
tree49a4315bc8ef9b4c736e3f3e0410daa8cf39a335 /caribou/antler/main.py
parentf810f7bfa40fd53bbf2f47d628ad0f0279b24b72 (diff)
downloadcaribou-1857bd953dc02ac781991f0b97b488b4f300b01f.tar.gz
Use GLib, GObject from gi.repository instead of glib, gobject
Use GLib and GObject from gi.repository instead of glib and gobject modules for compatibility with pygobject-3.0. Otherwise, when running on a system with pygobject-2.0 and pygobject-3.0 installed, caribou-preferences fails with ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',)) https://bugzilla.gnome.org/show_bug.cgi?id=657666
Diffstat (limited to 'caribou/antler/main.py')
-rw-r--r--caribou/antler/main.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/caribou/antler/main.py b/caribou/antler/main.py
index 6bd3932..fab1c60 100644
--- a/caribou/antler/main.py
+++ b/caribou/antler/main.py
@@ -1,17 +1,16 @@
-from gi.repository import Caribou
+from gi.repository import Caribou, GObject
from window import AntlerWindowEntry
from keyboard_view import AntlerKeyboardView
-import gobject
import sys
class AntlerKeyboardService(Caribou.KeyboardService):
def __init__(self):
- gobject.GObject.__init__(self)
+ GObject.GObject.__init__(self)
self.register_keyboard("Antler")
self.window = AntlerWindowEntry(AntlerKeyboardView)
def run(self):
- loop = gobject.MainLoop()
+ loop = GObject.MainLoop()
loop.run()
def do_show(self, timestamp):