[gnome-shell] background: when a file changes, remove it from the image cache
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] background: when a file changes, remove it from the image cache
- Date: Thu, 25 Sep 2014 03:06:13 +0000 (UTC)
commit 50ac1dd197db5389492f6910586698abe04c080b
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Sep 24 16:40:00 2014 -0400
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
js/ui/background.js | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 9ca9312..781f202 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -300,6 +300,8 @@ const Background = new Lang.Class({
let signalId = this._cache.connect('file-changed',
Lang.bind(this, function(cache, changedFile) {
if (changedFile == filename) {
+ let imageCache = Meta.BackgroundImageCache.get_default();
+ imageCache.purge(changedFile);
this.emit('changed');
}
}));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]