After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661858 - Add annotations for some GtkRadio* constructors
Add annotations for some GtkRadio* constructors
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-10-15 17:25 UTC by Torsten Schoenfeld
Modified: 2011-11-06 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk: add annotations for some GtkRadio* constructors (2.91 KB, patch)
2011-10-15 17:25 UTC, Torsten Schoenfeld
committed Details | Review

Description Torsten Schoenfeld 2011-10-15 17:25:17 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.
Comment 1 Torsten Schoenfeld 2011-10-15 17:25:20 UTC
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.
Comment 2 Emmanuele Bassi (:ebassi) 2011-10-15 21:59:18 UTC
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.
Comment 3 johnp 2011-10-24 18:01:06 UTC
Looks fine to me
Comment 4 Colin Walters 2011-11-04 00:23:38 UTC
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.
Comment 5 Torsten Schoenfeld 2011-11-04 08:55:18 UTC
(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.
Comment 6 Torsten Schoenfeld 2011-11-06 15:52:57 UTC
Pushed.