Do not remove destroyed actors from their container

The container already connects to destroy and will do that for us,
preventing a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=633028
This commit is contained in:
Giovanni Campagna 2010-10-28 22:28:17 +02:00
parent 08f7ecad35
commit a19e8d58f5

View File

@ -155,20 +155,24 @@ PopupBaseMenuItem.prototype = {
this._children.push({ actor: child,
column: column,
span: span });
this.actor.connect('destroy', Lang.bind(this, function () { this.removeActor(child); }));
this.actor.connect('destroy', Lang.bind(this, function () { this._removeChild(child); }));
this.actor.add_actor(child);
},
removeActor: function(child) {
_removeChild: function(child) {
for (let i = 0; i < this._children.length; i++) {
if (this._children[i].actor == child) {
this._children.splice(i, 1);
this.actor.remove_actor(child);
return;
}
}
},
removeActor: function(child) {
this.actor.remove_actor(child);
this._removeChild(child);
},
setShowDot: function(show) {
if (show) {
if (this._dot)