background: when a file changes, remove it from the image cache
MetaBackgroundCache doesn't itself use file watches, so when a image that we are monitoring changes we need to purge it from the cache, so that when we load it again we get the new image. https://bugzilla.gnome.org/show_bug.cgi?id=710756
This commit is contained in:
parent
9d933356e1
commit
50ac1dd197
@ -300,6 +300,8 @@ const Background = new Lang.Class({
|
|||||||
let signalId = this._cache.connect('file-changed',
|
let signalId = this._cache.connect('file-changed',
|
||||||
Lang.bind(this, function(cache, changedFile) {
|
Lang.bind(this, function(cache, changedFile) {
|
||||||
if (changedFile == filename) {
|
if (changedFile == filename) {
|
||||||
|
let imageCache = Meta.BackgroundImageCache.get_default();
|
||||||
|
imageCache.purge(changedFile);
|
||||||
this.emit('changed');
|
this.emit('changed');
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user