Remove st_container_remove_all & rewrite st_container_destroy_children
1. Both functions leaked the nodes in priv->children 2. st_container_remove_all wasn't properly updating first_child and last_child 3. remove_all() is almost never right since it won't cause signal handlers on the children to be removed. In the rare cases where it might be needed the caller can simply use clutter_container_remove(). https://bugzilla.gnome.org/show_bug.cgi?id=640781
This commit is contained in:
@ -206,7 +206,7 @@ Dash.prototype = {
|
||||
|
||||
_redisplay: function () {
|
||||
this._box.hide();
|
||||
this._box.remove_all();
|
||||
this._box.destroy_children();
|
||||
|
||||
let favorites = AppFavorites.getAppFavorites().getFavoriteMap();
|
||||
|
||||
|
@ -470,7 +470,7 @@ EndSessionDialog.prototype = {
|
||||
OpenAsync: function(type, timestamp, totalSecondsToStayOpen, inhibitorObjectPaths, callback) {
|
||||
this._totalSecondsToStayOpen = totalSecondsToStayOpen;
|
||||
this._inhibitors = [];
|
||||
this._applicationList.remove_all();
|
||||
this._applicationList.destroy_children();
|
||||
this._type = type;
|
||||
|
||||
if (!(this._type in DialogContent))
|
||||
|
@ -83,7 +83,7 @@ ModalDialog.prototype = {
|
||||
},
|
||||
|
||||
setButtons: function(buttons) {
|
||||
this._buttonLayout.remove_all();
|
||||
this._buttonLayout.destroy_children();
|
||||
let i = 0;
|
||||
for (let index in buttons) {
|
||||
let buttonInfo = buttons[index];
|
||||
|
@ -769,7 +769,7 @@ WorkspaceIndicatorPanel.prototype = {
|
||||
else
|
||||
this.actor.set_skip_paint(this._box, false);
|
||||
|
||||
this._box.remove_all();
|
||||
this._box.destroy_children();
|
||||
for (let i = 0; i < this._workspaces.length; i++) {
|
||||
let actor = new St.Button({ style_class: 'workspace-indicator',
|
||||
track_hover: true });
|
||||
|
Reference in New Issue
Block a user