Re: Enabling drag destination



On Tue, 22 Nov 2011 07:24:40 +0800
"Alan Knowles" <alan akbkhome com> wrote:
> http://roojs.com/blog.php/View/186/Drag%20and%20Drop%20with%20seed%20(Javascript)%20and%20Gtk
> 
> works with seed, should be ok on gjs
> 
> i did not have much luck with mime type dragging, it works ok with
> strings, but everything else was problematic.
> 
> Never had time or need to investigate further.

Thanks for the reply.

I did check this out before posting and with
gobject-introspection-1.30.0 it doesn't work for the same reason that
constructing a Gtk.TargetEntry object doesn't work, namely that this;

var targets = new Gtk.TargetList();

generates this error in gjs:

Unable to construct boxed type TargetList since it has no zero-args
<constructor>, can only wrap an existing one"

and this error in seed-3.2.0, complete with segfault:

CRITICAL **: Struct/union of type: TargetList has size 0 in
introspection data. Please check GIR
Segmentation fault

I don't mind re-implementing this in python but I suspect python users
using the introspection bindings (rather than the old pygtk bindings)
are going to have the same problem.  Do you think so?

I have to say that I have had less than stellar results with gobject
introspection.  I have noticed that the asynchronous line reading
functions of Gio.DataInputStream are busted in
gobject-introspection-1.30.0, about which a bug report seems to have
been ignored.  Every new release brings a game of chase, some of which
have work arounds and some of which (like this one) appear not to.
gobject-introspection-0.10 seems to be more reliable but unfortunately
gnome-3.2 requires the later version.

A naive observer might conclude that as long as gobject-introspection
provides the calls that gnome-shell needs, then it is ready for release:
whether the remainder of the bindings work seems to be a matter of
chance.

Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]