Closed floriangriese closed 7 years ago
Hey @flo12345678, thanks for the contribution! Do you know what version of Gtk.jl introduced this change and whether the new method is available in previous versions? We just have to make sure we set the Gtk requirement bounds appropriately in REQUIRE.
Maybe 0.11.0?
Should @Canvas
be changed too?
Yes, anything Gtk-related with a @
should drop it.
How do I find out at which Gtk version it was introduced? Do I have to search the History in Gtk?
How do I find out at which Gtk version it was introduced?
It's admittedly pretty annoying so I went ahead and did it. The correct version is 0.11.0. For reference, I found the PR that made the change by searching the closed PRs, clicked the SHA of the merge commit, then checked the top, where the GitHub UI tells you the first and most recent tag that contains the commit. In this case it's v0.11.0, so we should change the Gtk line in REQUIRE to be Gtk 0.11.0
. If you could make that change, that would be fantastic!
Slightly off-topic, but does Gtk
even work anymore?
$ WINSTON_OUTPUT=gtk ./julia -q
julia> VERSION
v"0.6.1-pre.0"
julia> using Winston
julia> Winston.output_surface
:gtk
julia> plot([1,2,3])
Error showing value of type Winston.FramedPlot:
ERROR: closures are not yet c-callable
I'm not keen on requiring both Tk
and Gtk
.
I didn't realize Gtk wasn't a preexisting requirement. Why is there anything related to Gtk in here, then?
It's optional, you can use it instead of Tk
. Ideally we could express that in REQUIRE
, something like:
Tk 0.5.2 || Gtk 0.11.0
Ah yes, the age-old need for explicit optional dependencies. Hopefully in 1.0...
Assuming the bug above is easily fixable, why not just adopt Gtk? It can be precompiled, whereas I think Tk currently cannot, and that's a pretty big advantage. At last check (may not be relevant anymore) it also has considerably higher drawing performance, despite the fact that both are using what should be the same Cairo backend.
I am using Gtk/Winston and this works very well, so I am all for @timholy suggestion. That Winston can be so easy integrated into Gtk is what makes this package to important to me.
But: Can somewhat hit the merge button (and do a release) since this PR did fix an actual issue and is ready to go.
Ok, ae419c392ed22e9d25e31e6bbfff63e0ec4ee268. Thanks @flo12345678!
Thanks @nolta. The bug you found is (by the way) also present in Julia 0.5. I just do not encounter it, since I directly embed Winston into a Gtk surface.
@Gtk.GtkWindow is deprecated, use Gtk.GtkWindow instead.