Re: Non-stock icons in toolbar/menu?



> tor 2004-11-18 klockan 13:55 +0100 skrev Murray Cumming:
>> > I have just migrated our app to the UIManager, which is great. But how
>> > do I add my own icons to the actions? Do I need to subclass Action and
>> > override the create_icon method, or is there a better way?
>>
>> I guess that Bryan has done this in coaster
>> http://www.coaster-burn.org/
>> so you might look at that and/or ask him.
>>
>> I am afraid that you might need to register new stock icons, though I
>> have
>> always thought the idea of non-stock stock icons was silly. When we
>> figure
>> this out we should add it to the gtkmm book.
>
> You were correct, Coaster registers new stock icons. I looked at
> coaster-0.1.2/src/stock-registration.cc and found it quite educational.
> I agree that it is silly, but it isn't hard if you know how to do it.
>
> Perhaps I should write an example program.

That would be nice. You could add a non-stock image to the existing example:
http://cvs.gnome.org/viewcvs/gtkmm/examples/book/menus_and_toolbars/

And that would help me to talk to the GTK+ developers about improving this
API.

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



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