Re: Can't add new GTK 2.16 methods to GtkStyle

On Wed, Jan 21, 2009 at 9:15 PM, Kevin Ryde <user42 zip com au> wrote:
Emmanuel Rodriguez <emmanuel rodriguez gmail com> writes:

+=for apidoc Gtk2::Style::get
+=for signature $style->get (widget_package, ...)

If both gobject get and get_property are hidden perhaps the pod could
have a crib that GtkStyle doesn't have any GObject properties to get or
set, though if a subclass did you can always $style->Glib::Object::get
to access them (assuming that's true).

Tested and it's true. I added a comment and unit tests to prove that it works.

+=for apidoc Gtk2::Style::get_property
+=for arg widget_package (__hide__)

There's some trick to get the two docs together isn't there?

Well I just copied from other classes. But if you write Alias for
C<method> you assume that the user will search for the doc of "method"

+                warn ("Invalid property `%s' used, returning undef", name);

Should that croak the way g_object_get does on an unknown property?
When in doubt you could either eval to trap, or ask
find_style_property() what's available (if that's wrapped).

The code dies and the unit test check for this.

Emmanuel Rodriguez

Attachment: GtkStyle.patch
Description: Text Data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]