[pygtk] gconf notify problems

Thomas Dybdahl Ahle thomas at ahle.dk
Wed Aug 23 00:00:05 WST 2006


Hi, I'm trying to write a program using pygtk and gconf.
I can't make the gconf.notify_add thing work though. It never calls the
specified function. Even when everything updates live in gconf-editor.

I made this small demo, to illustrate what doesnt work

import gconf,gobject,thread
thread.start_new(gobject.MainLoop().run, ())
c = gconf.client_get_default()
c.add_dir("/apps/pychess", gconf.CLIENT_PRELOAD_NONE)
c.set_string("/apps/pychess/test", "test")
def func (): print "HELLO"
c.notify_add ("/apps/pychess/test", func)
c.set_string("/apps/pychess/test", "other")
gobject.MainLoop().quit()

"HELLO" is never printed when I run it.
I use gnome-python2-2.12.4

-- 
Thanks - Thomas



More information about the pygtk mailing list