[gnome-shell] userMenu: Force reload of background-image on icon changes
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] userMenu: Force reload of background-image on icon changes
- Date: Mon, 24 Sep 2012 20:05:41 +0000 (UTC)
commit 6f3cf0ae50af0f7a9cd68760abe695009605c0d7
Author: Florian MÃllner <fmuellner gnome org>
Date: Fri Sep 21 16:24:50 2012 +0200
userMenu: Force reload of background-image on icon changes
When changing the user's avatar image, AccountsService will
overwrite the old image with the new one, so the location
returned by get_icon_file() is always the same.
In order to pick up the change, we need to make sure to clear the
previous image from both StTextureCache and StThemeNode's paint
cache.
https://bugzilla.gnome.org/show_bug.cgi?id=679268
js/ui/userMenu.js | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js
index 0a3192d..6ed2e84 100644
--- a/js/ui/userMenu.js
+++ b/js/ui/userMenu.js
@@ -73,6 +73,11 @@ const UserAvatarWidget = new Lang.Class({
let file = Gio.File.new_for_path(iconFile);
this.actor.child = null;
this.actor.style = 'background-image: url("%s");'.format(iconFile);
+
+ // AccountsService uses a fixed location for avatar images, so
+ // we need to clear out all cached data to pick up image changes,
+ // see https://bugzilla.gnome.org/show_bug.cgi?id=679268
+ this.actor.clear_background_image();
} else {
this.actor.style = null;
this.actor.child = new St.Icon({ icon_name: 'avatar-default-symbolic',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]