[gnome-shell/wip/clutter-deprecation-fixes: 7/25] st-container: Remove destroy_children



commit ca5786b4852d014c4d636f593bc9804ba5805eb2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Feb 13 19:41:56 2012 -0500

    st-container: Remove destroy_children
    
    We used to have a method, destroy_children, on StContainer. A very similar
    method has been added to ClutterActor, so, let's just use these instead.

 js/gdm/loginDialog.js           |    2 +-
 js/ui/appDisplay.js             |    2 +-
 js/ui/autorunManager.js         |    2 +-
 js/ui/calendar.js               |    6 +++---
 js/ui/dash.js                   |    2 +-
 js/ui/endSessionDialog.js       |    2 +-
 js/ui/modalDialog.js            |    2 +-
 js/ui/shellMountOperation.js    |    2 +-
 js/ui/workspaceSwitcherPopup.js |    2 +-
 src/st/st-container.c           |   21 ---------------------
 10 files changed, 11 insertions(+), 32 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 46f3fa4..6d4ae2b 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -694,7 +694,7 @@ const SessionList = new Lang.Class({
     },
 
     _populate: function() {
-        this._itemList.destroy_children();
+        this._itemList.destroy_all_children();
         this._activeSessionId = null;
         this._items = {};
 
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 5d845e6..5490562 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -236,7 +236,7 @@ const ViewByCategories = new Lang.Class({
 
     _removeAll: function() {
         this._categories = [];
-        this._categoryBox.destroy_children();
+        this._categoryBox.destroy_all_children();
     },
 
     refresh: function() {
diff --git a/js/ui/autorunManager.js b/js/ui/autorunManager.js
index 2dec5fb..175eecf 100644
--- a/js/ui/autorunManager.js
+++ b/js/ui/autorunManager.js
@@ -339,7 +339,7 @@ const AutorunResidentNotification = new Lang.Class({
 
     updateForMounts: function(mounts) {
         // remove all the layout content
-        this._layout.destroy_children();
+        this._layout.destroy_all_children();
 
         for (let idx = 0; idx < mounts.length; idx++) {
             let element = mounts[idx];
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 0c33ed0..9a7258a 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -406,7 +406,7 @@ const Calendar = new Lang.Class({
 
     _buildHeader: function() {
         let offsetCols = this._useWeekdate ? 1 : 0;
-        this.actor.destroy_children();
+        this.actor.destroy_all_children();
 
         // Top line of the calendar '<| September 2009 |>'
         this._topBox = new St.BoxLayout();
@@ -685,7 +685,7 @@ const EventsList = new Lang.Class({
     },
 
     _showOtherDay: function(day) {
-        this.actor.destroy_children();
+        this.actor.destroy_all_children();
 
         let dayBegin = _getBeginningOfDay(day);
         let dayEnd = _getEndOfDay(day);
@@ -702,7 +702,7 @@ const EventsList = new Lang.Class({
     },
 
     _showToday: function() {
-        this.actor.destroy_children();
+        this.actor.destroy_all_children();
 
         let now = new Date();
         let dayBegin = _getBeginningOfDay(now);
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 5835bc4..15e0ced 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -148,7 +148,7 @@ const DashItemContainer = new Lang.Class({
         if (this.child == actor)
             return;
 
-        this.actor.destroy_children();
+        this.actor.destroy_all_children();
 
         this.child = actor;
         this.actor.add_actor(this.child);
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
index 39cbcf8..2a6e6c8 100644
--- a/js/ui/endSessionDialog.js
+++ b/js/ui/endSessionDialog.js
@@ -501,7 +501,7 @@ const EndSessionDialog = new Lang.Class({
         let [type, timestamp, totalSecondsToStayOpen, inhibitorObjectPaths] = parameters;
         this._totalSecondsToStayOpen = totalSecondsToStayOpen;
         this._inhibitors = [];
-        this._applicationList.destroy_children();
+        this._applicationList.destroy_all_children();
         this._type = type;
 
         if (!(this._type in DialogContent)) {
diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js
index a647959..66c17d4 100644
--- a/js/ui/modalDialog.js
+++ b/js/ui/modalDialog.js
@@ -105,7 +105,7 @@ const ModalDialog = new Lang.Class({
     setButtons: function(buttons) {
         let hadChildren = this._buttonLayout.get_children() > 0;
 
-        this._buttonLayout.destroy_children();
+        this._buttonLayout.destroy_all_children();
         this._actionKeys = {};
 
         for (let i = 0; i < buttons.length; i++) {
diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js
index 8a91d98..93f9d9c 100644
--- a/js/ui/shellMountOperation.js
+++ b/js/ui/shellMountOperation.js
@@ -359,7 +359,7 @@ const ShellProcessesDialog = new Lang.Class({
 
     _setAppsForPids: function(pids) {
         // remove all the items
-        this._applicationList.destroy_children();
+        this._applicationList.destroy_all_children();
 
         pids.forEach(Lang.bind(this, function(pid) {
             let tracker = Shell.WindowTracker.get_default();
diff --git a/js/ui/workspaceSwitcherPopup.js b/js/ui/workspaceSwitcherPopup.js
index 58dd657..15383db 100644
--- a/js/ui/workspaceSwitcherPopup.js
+++ b/js/ui/workspaceSwitcherPopup.js
@@ -105,7 +105,7 @@ const WorkspaceSwitcherPopup = new Lang.Class({
     },
 
     _redraw : function(direction, activeWorkspaceIndex) {
-        this._list.destroy_children();
+        this._list.destroy_all_children();
 
         for (let i = 0; i < global.screen.n_workspaces; i++) {
             let indicator = null;
diff --git a/src/st/st-container.c b/src/st/st-container.c
index c249407..0eef8eb 100644
--- a/src/st/st-container.c
+++ b/src/st/st-container.c
@@ -95,27 +95,6 @@ st_container_update_pseudo_classes (StContainer *container)
     }
 }
 
-/**
- * st_container_destroy_children:
- * @container: An #StContainer
- *
- * Destroys all child actors from @container.
- */
-void
-st_container_destroy_children (StContainer *container)
-{
-  StContainerPrivate *priv = container->priv;
-
-  priv->block_update_pseudo_classes = TRUE;
-
-  while (priv->children)
-    clutter_actor_destroy (priv->children->data);
-
-  priv->block_update_pseudo_classes = FALSE;
-
-  st_container_update_pseudo_classes (container);
-}
-
 void
 st_container_move_child (StContainer  *container,
                          ClutterActor *actor,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]