Re: Can't add new GTK 2.16 methods to GtkStyle
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Can't add new GTK 2.16 methods to GtkStyle
- Date: Sat, 21 Feb 2009 23:40:54 +0100
Emmanuel Rodriguez wrote:
I think it would make sense to let Gtk2::Style::get()
and get_property() be the same method
Actually, letting get_property shadow the GObject method is a bit unlike
TreeModel. With the treemodels the get() varies but you can you can
confidently use get_property() for the object properties in whatever
generic code might operate on Glib::Object descendants.
In generic code, you can never be sure that calling get_property() on an object
will invoke Glib::Object::get_property(). You'd have to fully specify the
method name to be sure.
And since gtk_style_get() and gtk_style_get_property() are so similar to their
GObject counterparts, I think it would be confusing if get() and get_property()
did different things when invoked on a Gtk2::Style.
How about leaving get_property as the GObject property accessor and give
the style accessor another name?
But which name? This has to be picked with care because a subsequent
release of GTK could introduce new methods. I was thinking of using
something like get_style_property. This name seems unique enough,
after all what are the odds of seeing gtk_style_get_style_property
land in GTK?
We try to deviate as little as possible from the C names. I don't think an
exception is justified in this case. So I committed Emmanuel's last patch with
a few minor modifications. Thanks for the great patch, Emmanuel!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]