This commit is contained in:
Zach Tibbitts 2007-02-22 20:43:42 +00:00
parent ef850c779c
commit 6fc23e36aa
1 changed files with 7 additions and 0 deletions

View File

@ -47,6 +47,7 @@ else:
bus = dbus.SessionBus() bus = dbus.SessionBus()
existing_session = False
dbus_objects = dbus.Interface(bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus'), 'org.freedesktop.DBus').ListNames() dbus_objects = dbus.Interface(bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus'), 'org.freedesktop.DBus').ListNames()
@ -54,6 +55,12 @@ print dbus_objects
interface = None interface = None
if dbus_version < (0,80,0) and "org.deluge_torrent.Deluge" in dbus_objects:
existing_session = True
elif dbus_version >= (0,80,0):
for item in dbus_objects:
print item
if not "org.deluge_torrent.Deluge" in dbus_objects: if not "org.deluge_torrent.Deluge" in dbus_objects:
print "no existing Deluge session" print "no existing Deluge session"
import deluge, deluge.delugegtk import deluge, deluge.delugegtk