Drop use of deprecated dbus.glib

When writing Python apps that will use asynchronous DBus calls and
signals, python-dbus must be initialised with the appropriate main
loop.

sugar currently does this by importing the datastore module from
sugar-toolkit-gtk3, and the datastore module uses the deprecated
and confusing dbus.glib module (which automatically and non-obviously
sets the default GLib main context as the DBus mainloop).

Eliminate the dbus.glib usage from sugar-toolkit-gtk3 as part
of the effort to make sugar initialised the DBus mainloop in a
more explicit and non-deprecated fashion.
This commit is contained in:
Daniel Drake 2013-09-04 13:09:40 -06:00 committed by Daniel Narvaez
parent 2c225c0cee
commit e01837f8be
3 changed files with 2 additions and 3 deletions

View File

@ -29,7 +29,8 @@ from optparse import OptionParser
import dbus import dbus
import dbus.service import dbus.service
import dbus.glib from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
from sugar3.activity import activityhandle from sugar3.activity import activityhandle
from sugar3.activity import i18n from sugar3.activity import i18n

View File

@ -29,7 +29,6 @@ from gi.repository import GObject
from gi.repository import GConf from gi.repository import GConf
from gi.repository import Gio from gi.repository import Gio
import dbus import dbus
import dbus.glib
from sugar3 import env from sugar3 import env
from sugar3 import mime from sugar3 import mime

View File

@ -25,7 +25,6 @@ import logging
from gi.repository import GObject from gi.repository import GObject
import dbus import dbus
import dbus.exceptions import dbus.exceptions
import dbus.glib
from dbus import PROPERTIES_IFACE from dbus import PROPERTIES_IFACE
from sugar3.presence.buddy import Buddy, Owner from sugar3.presence.buddy import Buddy, Owner