[gnome-shell] dash: Do not shadow ClutterActor's destroy()
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dash: Do not shadow ClutterActor's destroy()
- Date: Tue, 5 Dec 2017 23:08:25 +0000 (UTC)
commit 74683b7ef7ba10a82db488aa4d79290d8efdfc81
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Tue Dec 5 17:04:24 2017 -0500
dash: Do not shadow ClutterActor's destroy()
Since commit ef1e27966db2 turned DashItemContainer into an StWidget,
the destroy() method overrides the ClutterActor method, which is at
the very least bad style. Instead, follow the usual pattern of using
a ::destroy handler.
https://bugzilla.gnome.org/show_bug.cgi?id=791233
js/ui/dash.js | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index b89040b..43b7c44 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -50,6 +50,10 @@ var DashItemContainer = new Lang.Class({
this._childScale = 0;
this._childOpacity = 0;
this.animatingOut = false;
+
+ this.connect('destroy', () => {
+ this.label.destroy();
+ });
},
vfunc_allocate: function(box, flags) {
@@ -177,11 +181,6 @@ var DashItemContainer = new Lang.Class({
});
},
- destroy: function() {
- this.label.destroy();
- this.parent();
- },
-
animateOutAndDestroy: function() {
this.label.hide();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]