Bug 588050 - Cache information icon forever, only look up recent once
Extend ShellTextureCache by adding the concept of a policy, which we expose to the public API for loading URIs. This lets us have the shell tell the cache to keep the information icon texture around forever. Secondly, fix the caching of recent info; we shouldn't always be loading the backup pixbuf. Move recent info loading entirely into ShellTextureCache.
This commit is contained in:
@ -85,7 +85,8 @@ GenericDisplayItem.prototype = {
|
||||
|
||||
let global = Shell.Global.get();
|
||||
let infoIconUri = "file://" + global.imagedir + "info.svg";
|
||||
let infoIcon = Shell.TextureCache.get_default().load_uri_sync(infoIconUri,
|
||||
let infoIcon = Shell.TextureCache.get_default().load_uri_sync(Shell.TextureCachePolicy.FOREVER,
|
||||
infoIconUri,
|
||||
INFORMATION_BUTTON_SIZE,
|
||||
INFORMATION_BUTTON_SIZE);
|
||||
this._informationButton = new Button.iconButton(this.actor, INFORMATION_BUTTON_SIZE, infoIcon);
|
||||
|
Reference in New Issue
Block a user