Either adding a setter function for this field or registiring it as a gobject property. Previously the Python bindings provided it: import xklavier configrec = xklavier.ConfigRec() configrec.set_model(model) Now that's not possible with introspection. The python test script does not show how to set the model. http://cgit.freedesktop.org/libxklavier/tree/tests/test_gi.py The bug I filed to pygobject is: https://bugzilla.gnome.org/show_bug.cgi?id=681566 And as they said the issue may be in libxklavier itself.
Actually, there is no set_model function in C either:) I will add it and make introspectable.
Committed. Please check.
Created attachment 65953 [details] [review] Testcase
Thanks Sergey! I attach a testcase for the python bindings, adds code to test_gi.py . Is failing for me with: Changing model to "pc105"... Traceback (most recent call last): File "tests/test_gi.py", line 108, in <module> rec.set_model("pc105") File "/usr/lib64/python2.7/site-packages/gi/types.py", line 43, in function return info.invoke(*args, **kwargs) gi._glib.GError: Could not locate xkl_config_rec_set_model: `xkl_config_rec_set_model': /usr/lib64/libxklavier.so.16: undefined symbol: xkl_config_rec_set_model
Are you sure you rebuilt libxklavier? What is the result of ls -l /usr/lib64/libxklavier.so*
I'm not installing it system-wide, after "make" I'm running the testcase with: LD_LIBRARY_PATH=libxklavier/.libs/ tests/test_gi.py As commit caa0924e says. Without my change, it success. With it, it fails.
I don't get this Traceback (most recent call last): File "tests/test_gi.py", line 108, in <module> rec.set_model("pc105") File "/home/dnarvaez/Development/sugar-build/shell-port/install/lib64/python2.7/site-packages/gi/types.py", line 47, in function return info.invoke(*args, **kwargs) gi._glib.GError: Could not locate xkl_config_rec_set_model: `xkl_config_rec_set_model': /home/dnarvaez/Development/sugar-build/shell-port/install/lib64/libxklavier.so.16: undefined symbol: xkl_config_rec_set_model [sugar-build libxklavier]$ nm /home/dnarvaez/Development/sugar-build/shell-port/install/lib64/libxklavier.so.16 | grep xkl_config_rec_set_model 00000000000104a0 t xkl_config_rec_set_model
I think I know! Check the file libxklavier/libxklavier.public! Please add that function there. Will that help?
Yup, that works!
Will commit tonight
Thanks! Please commit also the testcase, to make me and Martin Pitt happy :)
should be ok now
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.