dash: Make sure item labels are only destroyed once

Labels are currently destroyed from both animateOutAndDestroy()
and destroy(), which now (rightfully) triggers a gjs warning. As
the label is created unconditionally since commit 36e5ae4a25,
mirror that and always release it in destroy() and hide it
elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=791233
This commit is contained in:
Marco Trevisan (Treviño) 2017-12-04 20:45:35 -05:00
parent 3b4be770a0
commit d5805f9f0d

View File

@ -178,15 +178,12 @@ var DashItemContainer = new Lang.Class({
},
destroy: function() {
if (this.label)
this.label.destroy();
this.label.destroy();
this.parent();
},
animateOutAndDestroy: function() {
if (this.label)
this.label.destroy();
this.label.hide();
if (this.child == null) {
this.destroy();