Effect addins cannot use custom icons

Bug #1198593 reported by Cameron White
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
Medium
Cameron White

Bug Description

While working on the effect-writing documenttation, I noticed that we use PintaCore.Resources.GetIcon to load the icon specified by BaseEffect.Icon. I don't think this will work for addins since they can't add their icons to Pinta.Resources.

Tags: addins
Revision history for this message
Robert Nordan (rpvn) wrote :

I think we can work around this without making any messy changes by documenting how to add icons to the GTK icon set from the add-in. In Pinta.Resources.ResourceManager.GetIcon the comment says this:
// First see if it's a built-in gtk icon, like gtk-new.
// This will also load any icons added by Gtk.IconFactory.AddDefault() .

So if the add-in initialises with something like this, I *think* it might work:

 Gtk.IconFactory fac = new Gtk.IconFactory ();
fac.Add ("my-cool-icon", new Gtk.IconSet (new Pixbuf ("filename.png"));

Haven't tested; my Ubuntu desktop GTK theme thinks icons are for wimps and doesn'ẗ show any. At any rate, this isn't the biggest blocker in the world.

Changed in pinta:
status: New → Triaged
Revision history for this message
Cameron White (cameronwhite91) wrote :

Yeah, it looks like that does work. I don't get icons on my menus either, but the icons are displayed in the history pad after you use the effect.

Revision history for this message
Cameron White (cameronwhite91) wrote :
Changed in pinta:
assignee: nobody → Cameron White (cameronwhite91)
status: Triaged → Fix Committed
Revision history for this message
grofaty (grofaty) wrote :

Just a note, if I remember Ubuntu hides icons by default in menus, isn't it?

On Ubuntu 12.04 terminal:
sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak
ubuntu-tweak
From Tweaks tab select "Menus have icons"

Changed in pinta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.