Hi, there,

Since the "strange desapparition" of stock icons, I've been struggling to
put icons in my apps.

I use Gtk.Action a lot, so, after loading the icon from resources, I've
converted this:

var actOpen = new Gtk.Action( "open", "Open", "Open file", Gtk.Stock.Open );

To this:

var actOpen = new Gtk.Action( "open", "Open", "Open file", "open" ) {
IconName = "open" };

After including hte icon in the IconTheme:

Gtk.IconTheme.AddBuiltin( "open", 32, iconOpen );

And it works.
Is this correct? Is it the expected way to achieve this?

I would have expected to do something like creating my own IconTheme:

var iconTheme = new Gtk,IconTheme();
iconTheme.Add( "open", 32, iconOpen );
...

Gtk.IconTheme.Default = iconTheme.

But haven't found a clue of how it is done, or whether it should be done or
not.

-- baltasar
_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to