-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GTK4 doesn't have Gtk.Builder.connectSignals #308
Comments
If you want to provide a replacement for the deprecated function, PR:s are welcome. I don't have enough time to add an implementation myself. The first thing I would recommend though would be to carefully read the GTK documentation to see what their proposed migration solution is. |
I will try to create an implementation of what is GtkBuilderScopeInterface in C during the next weeks. Either I can write it in node or in C, maybe I will need some help. The resulting code should allow the creation of a class like what I have posted in issue #305, but with another name, something like:
|
Ok. Don't have time to look into this in details at the moment, but whatever you do make sure to check what PyGObject and GJS are doing, I try to stay as close to them as possible. |
I am sorry to say that I do not make any progress with it. Obviously, I need to register the callback functions somehow. I tried to override the setScope method and started out with this:
This outputs all the functions of The intended usage looks like this:
|
@romgrk After reading tons of source code of the GTK project, a came to the conclusion that
This looks quite promising. When clicking the action button, it writes Yippie! to the console, as expected. However, when clicking the button a second time, the application crashes (core dump). |
Hey!
|
Sorry, I cannot reopen issue #305.
Your example uses GTK 3, however the GTK documentation clearly states that this function no longer exists:
https://docs.gtk.org/gtk4/migrating-3to4.html
Somehow, I have the feeling that there should be a language-specific implementation of Gtk.BuilderScope. Since Gtk.BuilderCScope is the C/C++ implementation, naming it Gtk.BuilderJSScope would make sense.
Originally posted by @rexkogitans in #305 (comment)
The text was updated successfully, but these errors were encountered: