GNOME Bugzilla – Bug 631952
better GObject-Introspection support for new-project branch
Last modified: 2010-11-08 10:37:00 UTC
I'll attach patches adding g-i annotations for what I had to use in my sample plugin. I've also tried to correctly register gobject properties, but I got stuck with lists, so I'll let this for another time.
Created attachment 172169 [details] [review] libanjuta: add G-I annotations to IAnjutaProject and AnjutaProjectNode
Created attachment 172171 [details] [review] libanjuta: Register AnjutaProjectNodeInfo and AnjutaProjectProperty as boxed
Review of attachment 172169 [details] [review]: Thanks, I have committed it.
Review of attachment 172171 [details] [review]: Thanks, I have committed it.
Is there some more to do about this or can I close the bug ?
What I would like to add is proper memory handling of AnjutaProjectProperty lists. Since we want to allow for custom property types, we cannot simply free the properties in the dispose method of the project node. And because of the limitations of GObjectIntrospection (I can think of many ways to fix the problem in Vala, but I'm not sure any of them would work with PyGObject).
Another thing that bothers me with gobject-introspection is that the Makefile.am in libanjuta is quite broken. It doesn't behave correctly with "make -j" and also seems to break distcheck.
(In reply to comment #6) > What I would like to add is proper memory handling of AnjutaProjectProperty > lists. What does it need ?
Created attachment 173837 [details] [review] fix to work with recent gobject introspection Interface aren't reconized as such by recent g-i, because it expects IAnjuta to be lowercased as i_anjuta.
(In reply to comment #9) > Interface aren't reconized as such by recent g-i, because it expects IAnjuta to > be lowercased as i_anjuta. You mean that the interface types should be i_anjuta_Debugger and i_anjuta_DebuggerIface by example. It's a bit strange to have type name not starting with an uppercase letter. Do you think it's better to change anjuta or the introspection scanner ?
G-I scanner is expecting IAnjutaDebugger to have i_anjuta_debugger_get_type instead of ianjuta_debugger_get_type. But passing --symbol-prefix=ianjuta makes it behave correctly. So no, neither anjuta nor the g-i scanner needs to change : only the anjuta makefile :-)
Committed in master with slight modification (e.g. everything from 1.0 -> 3.0). Thanks!