GNOME Bugzilla – Bug 661858
Add annotations for some GtkRadio* constructors
Last modified: 2011-11-06 15:53:09 UTC
In language bindings, this amounts to changing $radio_button->new_from_widget to Gtk3::RadioButton->new_from_widget ($radio_button), which makes sense. But it can also be seen as an API change.
Created attachment 199072 [details] [review] gtk: add annotations for some GtkRadio* constructors Since constructors like gtk_radio_button_new_from_widget take an instance of their type as the first argument, the gi scanner interprets them as methods.
Review of attachment 199072 [details] [review]: looks good to me; if the issue is the bindings API change then the patch should probably be double-reviewed by the pygobject and/or gjs maintainers.
Looks fine to me
So this is just a cosmetic difference for gjs; we don't treat constructors specially. I assume the perl bindings do? If so that seems fine to me. If John said the same for pygobject this looks good to commit.
(In reply to comment #4) > So this is just a cosmetic difference for gjs; we don't treat constructors > specially. I assume the perl bindings do? Yeah, in Perl, constructors get the class name as their first argument. In the i11n layer we thus skip the first argument for constructors. For this particular patch, constructor vs. method means Gtk3::RadioButton->new_from_widget ($radio_button) vs. Gtk3::RadioButton::new_from_widget ($radio_button) > If so that seems fine to me. If John said the same for pygobject this looks > good to commit. Alright, will commit soon. Thanks for the reviews.
Pushed.