Re: Gtk3::Image and GtkIconSize



Yes, that looks fine.  It's mostly what I had but the 0's thing threw
me, so I re-wrote it, which was a mistake.

Thanks,
Dave M

On Sun, Feb 17, 2013 at 12:01 PM, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 17.02.2013 16:22, Dave M wrote:

Did the approach using Glib::Object::Introspection->convert_enum_to_sv
and Glib::Object::Introspection->convert_sv_to_enum as outlined in

<https://mail.gnome.org/archives/gtk-perl-list/2013-January/msg00031.html>
not work?

Yes, I had tried it before, and I got the same problem I'm getting now

with it.  When I run the the GtkImage.t file, there are error messages
like these:
not ok 20 - set_from_icon_set get_icon_set size
#   Failed test 'set_from_icon_set get_icon_set size'
#   at GtkImage.t line 98.
#          got: '0'
#     expected: 'small-toolbar'
not ok 31
#   Failed test at GtkImage.t line 152.
#     Structures begin differing at:
#          $got->[1] = '0'
#     $expected->[1] = 'menu'


I cannot reproduce these failures.  Do you still see them with the attached
patch (which is based on yours)?  I did see these failures:


Are there default values that are supposed to be set but aren't?  For
example, the first time this comes up is test #2.  I Data::Dumper-ed
the values to be compared to see what was going on:
print Dumper [ $img->get_icon_set ];
print Dumper [ undef, 'button' ];
ok (eq_array ([$img->get_icon_set], [undef, 'button']), 'get_icon_set
empty');
$VAR1 = [
           undef,
           0
         ];
$VAR1 = [
           undef,
           'button'
         ];
not ok 2 - get_icon_set empty
#   Failed test 'get_icon_set empty'
#   at GtkImage.t line 54.


But I think these are actually due to changes in gtk+.  At some point, these
getters started returning a GtkIconSize of 0, which translates to "invalid".
gtk+ 2 returned 4 aka. "button" by default, instead.

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list



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