2 print "WARNING: this hasn't been updated to current API yet, and might not work"
3 #FIXME: doesn't work with the new bindings
9 class GConfService(dbus
.Service
):
12 dbus
.Service
.__init
__(self
, "org.gnome.GConf", dbus
.SessionBus())
14 gconf_object_tree
= self
.GConfObjectTree(self
)
16 class GConfObjectTree(dbus
.ObjectTree
):
17 def __init__(self
, service
):
18 dbus
.ObjectTree
.__init
__(self
, "/org/gnome/GConf", service
)
20 self
.client
= gconf
.client_get_default()
22 def object_method_called(self
, message
, object_path
, method_name
, argument_list
):
23 print ("Method %s called on GConf key %s" % (method_name
, object_path
))
25 if "getString" == method_name
:
26 return self
.client
.get_string(object_path
)
27 elif "setString" == method_name
:
28 self
.client
.set_int(object_path
, argument_list
[0])
29 elif "getInt" == method_name
:
30 return self
.client
.get_int(object_path
)
31 elif "setInt" == method_name
:
32 self
.client
.set_int(object_path
, argument_list
[0])
34 gconf_service
= GConfService()
36 print ("GConf Proxy service started.")
37 print ("Run 'gconf-proxy-client.py' to fetch a GConf key through the proxy...")
39 mainloop
= gobject
.MainLoop()