Re: Gtk3::Image and GtkIconSize

On Sun, Jan 27, 2013 at 5:34 PM, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 21.12.2012 12:24, Torsten Schoenfeld wrote:

On 21.12.2012 12:03, Mario Kemper wrote:

When I change it to...
my $image = Gtk3::Image->new_from_stock( 'gtk-index', 'menu' );

... the following error occurs:
Argument "menu" isn't numeric in subroutine entry at
/usr/lib/perl5/Glib/Object/ line 57, <DATA> line 19.

Does the matching between the numeric values and the corresponding
strings not work yet? Passing '1' does work as expected.

Unfortunately, that seems to be intentional.  Looking at

the "size" parameter has a "[type int]" annotation.  The Perl bindings
thus see a plain integer parameter, and the enum string magic is never
invoked.  The reason for this annotation is explained in

With a recent round of commits to G:O:IÂ, this can now be tackled.  I attach
an initial patch for the cited constructor.  Would you, or anyone else
listening, be willing to complete this patch to include support for all or
part of the following?

â gtk_image_new_from_stock, gtk_image_new_from_icon_set,
gtk_image_new_from_icon_name, [gtk_image_new_from_gicon],
gtk_image_set_from_stock, gtk_image_set_from_icon_set,
gtk_image_set_from_icon_name, [gtk_image_set_from_gicon],
gtk_image_get_stock, gtk_image_get_icon_set, gtk_image_get_icon_name,
â gtk_icon_size_*
â (gtk_icon_set_render_icon), gtk_icon_set_render_icon_pixbuf,
â gtk_icon_source_set_size, gtk_icon_source_get_size

â gtk_action_create_icon
â gtk_scale_button_new
â gtk_tool_item_get_icon_size
â gtk_tool_palette_set_icon_size, gtk_tool_palette_get_icon_size
â gtk_tool_shell_get_icon_size
â gtk_toolbar_get_icon_size, gtk_toolbar_set_icon_size
â gtk_tooltip_set_icon_from_stock, gtk_tooltip_set_icon_from_icon_name,

â (gtk_style_render_icon)
â (gtk_widget_render_icon), gtk_widget_render_icon_pixbuf
â gtk_render_icon_pixbuf

Items in round brackets are deprecated and thus no priority.  Items in
square brackets might need more work (Glib::IO support) than just the icon
size conversion.



I'll volunteer for some, unless Mario wants them.  I'm supposed to be
porting my app to Gtk3 as well, but that's a lot of work... this is
usually more fun (unless XS is involved...).

Dave M

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