Re: [Vala] using a GLib.Icon in an IconView



Thanks, but finally I found how to do it:

    var theme = Gtk.IconTheme.get_default();
Gdk.Pixbuf pbuf = theme.lookup_by_gicon(a_themed_icon,48,0).load_icon();

My fault was in using a constructor with Gtk.IconTheme, instead of using the static method get_default.

Thanks anyway.

El 31/10/11 20:01, JM escribió:
Gtk.Invisible w = new Gtk.Invisible();  
Gdk.Pixbuf pixb  = w.render_icon(Gtk.Stock.CONNECT, IconSize.BUTTON,
null);

best regards



Am Montag, den 31.10.2011, 15:59 +0100 schrieb rastersoft:
Hi all:

I'm working with a Gtk.IconView, and need to put standard icons in it. I
have several ThemedIcons, and want to use them there, but IconView
expects a Gdk.Pixbuf. How can I do that? I've been unable to find how to
render a GLib.Icon in a Gdk.Pixbuf.

Thanks.


_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list


--
Nos leemos
                         RASTER    (Linux user #228804)
raster rastersoft com              http://www.rastersoft.com





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