[MonoDevelop] Stock Icons

Michael Hutchinson m.j.hutchinson at gmail.com
Fri Mar 20 18:16:09 EDT 2009


On Fri, Mar 20, 2009 at 12:14 PM, John Tindell <john at yeticode.co.uk> wrote:
> using monodevelop but for a standard gtk app. The error occurs when I run
> the app. I used the Stock Icons > Edit Icon Factory from within monodevelop
> to add in the icons. I wasn't sure if there was something I was doing wrong
> via code, or if there was an option I needed to set within monodevelop
> register the icon factory.

Take a look at GetIcon in
http://anonsvn.mono-project.com/viewvc/trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui/ResourceService.cs?view=markup
for a more "correct" was to render icons. For example, I'm pretty sure
you shouldn't be creating a new style object.

Looking at the stetic-generated code, it appears that the icons are
registered in the first call to Stetic.Gui.Initialize(Gtk.Widget),
which is called from every stetic-generated Build method. Hence, if
you want to use the icon before instantiating any stetic widget or
window, you should call Stetic.Gui.Initialize(null).

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list