[Webkit-unassigned] [Bug 175937] [GTK] gtk_builder_get_type_from_name doesn't work with WebKitWebView

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 26 05:45:04 PDT 2017


--- Comment #11 from Debarshi Ray <rishi.is at lostca.se> ---
(In reply to Michael Catanzaro from comment #10)
> (In reply to Christian Hergert from comment #9) 
> > Another option is to just use static constructors to register the types you
> > care about. Since GObject should be initialized first (as a dependency of
> > your library) you can probably just g_type_ensure() from a single static
> > constructor.
> This seems like the path of least-resistance.

By constructor, I'd expect something like this:

And in that case, you'd still be fixing this bug. :)

I don't think we should be placing the onus on the application to register the type. That reflects very badly on our platform since it will trip up anybody using GTK+ widget templates - something that we expect people to use to build UIs. If we are not going to make the effort to make these things just work, then it is dishonest for us to advertise them. Especially when there are multiple ways to fix the problem in the platform.

Minutes before I myself hit this problem, I was helping a newcomer on #webkitgtk+ who was puzzled why his GTK+ widget templates were not working in PyGObject. I myself hit this problem while programming in Vala. Having to figure out how g_type_ensure translates into a language binding is a pretty sucky experience, even for someone who has been programming in C/GObject for years.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170826/8e06384c/attachment.html>

More information about the webkit-unassigned mailing list