Index: dbus_compat.py =================================================================== RCS file: /cvsroot/rox/ROX-Session/dbus_compat.py,v retrieving revision 1.1 diff -c -r1.1 dbus_compat.py *** dbus_compat.py 9 Jul 2005 13:39:17 -0000 1.1 --- dbus_compat.py 15 Feb 2006 00:15:37 -0000 *************** *** 3,5 **** --- 3,16 ---- # us from importing dbus. # Happily, it isn't actually needed so we can leave it blank :-) + + from dbus import Service, Object, method + def BusName(session_service, bus): + return Service(session_service, bus = bus) + + has_service_interface = False + try: + from dbus import service + has_service_interface = True + except: + pass Index: main.py =================================================================== RCS file: /cvsroot/rox/ROX-Session/main.py,v retrieving revision 1.9 diff -c -r1.9 main.py *** main.py 21 Jan 2006 16:01:05 -0000 1.9 --- main.py 15 Feb 2006 00:15:37 -0000 *************** *** 119,125 **** else: class SessionObject3x(dbus.service.Object): def __init__(self, service): ! dbus.service.Object.__init__(self, service, "/Session") # Prefered syntax, but requires python 2.4 or later #@dbus.service.method(constants.control_interface) --- 119,125 ---- else: class SessionObject3x(dbus.service.Object): def __init__(self, service): ! dbus.service.Object.__init__(self, service=service, object_path="/Session") # Prefered syntax, but requires python 2.4 or later #@dbus.service.method(constants.control_interface) Index: mydbus.py =================================================================== RCS file: /cvsroot/rox/ROX-Session/mydbus.py,v retrieving revision 1.1 diff -c -r1.1 mydbus.py *** mydbus.py 28 Jan 2006 11:33:38 -0000 1.1 --- mydbus.py 15 Feb 2006 00:15:37 -0000 *************** *** 1,10 **** import sys, os - import dbus_compat - sys.modules['dbus.services'] = dbus_compat - try: from dbus import * except ImportError: # Debian/unstable doesn't have a version of D-BUS for their # default version of Python. Try the 2.4 bindings.. --- 1,12 ---- import sys, os try: + import dbus_compat + sys.modules['dbus.service'] = dbus_compat from dbus import * + if not dbus_compat.has_service_interface: + import dbus + setattr(dbus, 'service', dbus_compat) except ImportError: # Debian/unstable doesn't have a version of D-BUS for their # default version of Python. Try the 2.4 bindings.. Index: settings3x.py =================================================================== RCS file: /cvsroot/rox/ROX-Session/settings3x.py,v retrieving revision 1.2 diff -c -r1.2 settings3x.py *** settings3x.py 12 Feb 2006 15:02:06 -0000 1.2 --- settings3x.py 15 Feb 2006 00:15:37 -0000 *************** *** 7,13 **** class Settings(dbus.service.Object): def __init__(self, service): ! dbus.service.Object.__init__(self, service, "/Settings") self.xsettings_manager = xsettings.Manager(0) def SetString(self, key, value): --- 7,13 ---- class Settings(dbus.service.Object): def __init__(self, service): ! dbus.service.Object.__init__(self, service=service, object_path="/Settings") self.xsettings_manager = xsettings.Manager(0) def SetString(self, key, value):