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



Emmanuel Rodriguez wrote:
I tried to how the C++ and D bindings where doing with gtk_style_get
and gtk_style_get_property and they didn't implement it yet. I was
finding odd that no one implemented gtk_style_get yet, but I think
that this is a 2.16 method that not marked as 'since 2.16'. Can some
one confirm this?

Yep, I think that's correct. Hence: <http://bugzilla.gnome.org/show_bug.cgi?id=568464>.

I have implemented Torsten's proposal.

Patch looks great!  Only a few minor nits:

 #include "gtk2perl.h"
+
 MODULE = Gtk2::Style   PACKAGE = Gtk2::Style   PREFIX = gtk_style_

Please try to avoid needless whitespace changes.

+#if GTK_CHECK_VERSION (2, 15, 0) /* FIXME 2.16.0 */

Please use "/* FIXME: 2.16 */". This way it's easier to change all these version checks with one or two runs of `perl -pi´.

+        class_peek = g_type_class_peek(widget_type);

g_type_class_peek might return NULL, so we need to guard against this here by croak()ing in this case. But I think just using g_type_class_ref() and later _unref() is better still.

+  my $property = $style -> get_property('Gtk2::TreeView', 'expander-size');

I don't think this variable is used anywhere.

Otherwise, it looks fine to me.  muppet?



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