New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release the cache for a GIcon (directly affected: indicator multiload) #4953
Comments
@JosephMcc Here there are an another reason of why the indicator icons have a different colour. If the indicator icons are set in a passive mode with an orange colour, then If the passive mode of the indicator changed to any other mode, is needed the process of replace the icons with a new one (the blue colour). In this point we need to release the cache of the icons, but currently in cinnamon it's not possible release an icon from the cache, without perform a hard procedure to refresh that involved the release of the whole desktop icons, so, the passive icons will be displayed, instead of the correct ones for the current mode. An icon cache its a good things, but maybe not inside the gio, could be place in a different class and then you can decide if you want to use the cache class or the gio implementation. See also that indicators have an internal cache for icons, this also need to be improved to not cache all icons of course, but currently will not resolve anything as there are two icon caches. |
Instead of create a gicon we can create an St.TextureCahe, but we can not apply style to the texture cache directly, another alternative is create Pixbuf, then create a Clutter.Image, and then set it at the content of a St.Icon, but then we also can not apply any style directly to the St.Icon any attempt will be omitted, like this:
Where the style_class: 'applet-icon', can not be apply. If there are another way i can not find it. |
This was fixed by @mtwebster |
I suppose if i do:
and then i change the icon in the icon_path location for a new one and then i do again:
if i do:
equals need to be false, but this not occurs inside cinnamon, because the icon1 was never released and there are no way for release this icon. As icon1 is in cache with the id: icon_path, the seconds call of the construction of icon2 return the icon1 that is in cache instead of create a new one.
I know this is the cause of also there are not a procedure for release the memory inside cinnamon menu and this is in most of cases a good thing, but not in all cases.
So need to be a way for remove the icons from this cache.
The text was updated successfully, but these errors were encountered: