[gnome-shell] [appWellIcon] Set correct style in constructor
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [appWellIcon] Set correct style in constructor
- Date: Tue, 8 Jun 2010 18:48:28 +0000 (UTC)
commit dad80b3d200de0b793609d6f1bece8bf1c46a6c1
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Jun 6 00:35:26 2010 +0200
[appWellIcon] Set correct style in constructor
Currently, only the base style class is set in the constructor, the
style update according to the state of the represented app is deferred
until the actor is shown.
As existing icons are destroyed and recreated when the number of icons
changes, this behavior causes the icons of running apps to flicker if
CSS transitions are used.
Set the style directly in the constructor and update the code to not
delay style updates until the actor is shown - StWidget does defer
expensive calculations until the actor is mapped anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=620782
js/ui/appDisplay.js | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 71243c3..edf54c7 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -470,24 +470,19 @@ AppWellIcon.prototype = {
}));
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
- this.actor.connect('show', Lang.bind(this, this._onShow));
- this.actor.connect('hide', Lang.bind(this, this._onHideDestroy));
- this.actor.connect('destroy', Lang.bind(this, this._onHideDestroy));
+ this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
- this._stateChangedId = 0;
this._menuTimeoutId = 0;
- },
-
- _onShow: function() {
this._stateChangedId = this.app.connect('notify::state',
Lang.bind(this,
this._onStateChanged));
this._onStateChanged();
},
- _onHideDestroy: function() {
+ _onDestroy: function() {
if (this._stateChangedId > 0)
this.app.disconnect(this._stateChangedId);
+ this._stateChangedId = 0;
this._removeMenuTimeout();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]