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 13fdaa80bf
commit 6c655a6c71

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();