Add emblem to iconinfo without modifying theme

Hi all:

I’m using lookup_by_gicon in the current theme to get the icon for an specific icon (let’s say, the “folder” icon), which, as you know, returns an IconInfo object. The problem is that I want to add emblems (like the “symbolic link” emblem) to that icon, but if I do that using emblemIcon.copyarea() to paint it over the IconInfo element, it seems that the theme cache is modified, so every time I paint that icon (this is, every time I paint a “folder” icon) it has the emblem. So as soon as I add a soft link to a folder, I end with all and every folder painted with the “symlink” emblem.

Is it possible to do a “deep copy” of an IconInfo object to avoid this?

Thanks.

I found the problem: it was in the “load” method, that it seems that caches the pixbufs. Doing a copy of the pixbuf solves the problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.