On Tue, 22 Nov 2011 21:53:23 +0800 Alan Knowles <[email protected]> wrote: > Below is the gir snippet to fix it.. > > <record name="TargetList" > c:type="GtkTargetList" > glib:type-name="GtkTargetList" > glib:get-type="gtk_target_list_get_type" > c:symbol-prefix="target_list"> > <doc xml:whitespace="preserve">A #GtkTargetList structure is a > reference counted list > of #GtkTargetPair. It is used to represent the same > information as a table of #GtkTargetEntry, but in > an efficient form. This structure should be treated as > opaque.</doc> > > <field name="list" writable="1"> > <type name="GLib.List" c:type="GList*"> > <type name="gpointer" c:type="gpointer"/> > </type> > </field> > <field name="ref_count" writable="1"> > <type name="guint" c:type="guint"/> > </field> > > > > I ended up using a reference set of gir's and always using the > typelibs generated from there. It's not very future proof, but at > least it solves some of the worse gir bugs.. > https://github.com/roojs/gir-1.2-gtk-3.0 > > This installs locally, > https://github.com/roojs/gitlive/blob/master/install1.2.sh > > And this code 'prefers' the libs in seed (gjs should be pretty > similar) > > GI = imports.gi.GIRepository; > GLib = imports.gi.GLib; > // we add this in, as it appears to get lost sometimes if we set it > using the ENV. variable in builder.sh > GI.Repository.prepend_search_path(GLib.get_home_dir() + > '/.Builder/girepository-1.2'); > > I normally actually overwrite the GLib/GIRepository distribution > gir's, as there are so many other little things that are broken. > > Ideally, it would be better if g-ir-compiler could merge two gir > files (system+overrides) so maintaining the workarounds was easier > (and easier to report upstream)..
Alan, I am grateful for all that. Presumably these bindings will work under gtk+3.2 (without any gtk+-3.2 additions) but it does seem rather like swimming against the current. However, how do you deal with the shared libraries since I don't think gobject-introspection-0.10 and gobject-introspection-1.30 are parallel installable? Do you start seed with LD_LIBRARY_PATH set to the local version? It would be better if gobject-introspection adopted a more professional approach to the library, but maybe it is just too much of a task to keep all the bindings in order. In that case though, it would be better if JavaScript on GIR (and other interpreted languages on GIR) were not promoted as GNOME and gnome-shell's latest big thing. I have taken the short route and written my utility in C++ and it seems to work OK. I will probably fiddle with my C++ "prototype" to see if I can eventually get it to work under GIR, as an exercise at least. Chris _______________________________________________ javascript-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/javascript-list
