dbus/activity.py is the only module that imports gtk libs. The module could be hacked to work with both gtk2 and gtk3. This hack solves the issues I see in precise and oneiric.
import dbus.service
-import gobject
+try:
+ from gi.repository import GObject as gobject
+except ImportError:
+ import gobject
from bzrlib.plugins.dbus import mapper
from bzrlib.revision import NULL_REVISION
@@ -116,7 +119,6 @@
# make a non-blocking call, which we can then ignore as we dont
# care about responses: Apparently there is some dbus foo to help
# make this not need the stub function
- import gobject
mainloop = gobject.MainLoop()
def handle_reply():
# quit our loop.
dbus/activity.py is the only module that imports gtk libs. The module could be hacked to work with both gtk2 and gtk3. This hack solves the issues I see in precise and oneiric.
=== modified file 'activity.py'
--- activity.py 2008-02-13 00:29:52 +0000
+++ activity.py 2012-01-31 16:29:03 +0000
@@ -26,7 +26,10 @@
import time
import dbus.service
-import gobject
+try:
+ from gi.repository import GObject as gobject
+except ImportError:
+ import gobject
from bzrlib.plugins.dbus import mapper
from bzrlib.revision import NULL_REVISION
@@ -116,7 +119,6 @@
# make a non-blocking call, which we can then ignore as we dont
# care about responses: Apparently there is some dbus foo to help
# make this not need the stub function
- import gobject
mainloop = gobject.MainLoop()
def handle_reply():
# quit our loop.