js: Remove unnecessary versions of clutter_actor_get_children

clutter_actor_get_children requires making a temporary GSList from
a linked list structure, and then creating a JS Array from that GSList.
For simple cases like the number of children, use clutter_actor_get_n_children.

https://bugzilla.gnome.org/show_bug.cgi?id=677426
This commit is contained in:
Jasper St. Pierre
2012-05-29 20:36:45 -04:00
parent c7b4022283
commit c9296191a8
10 changed files with 20 additions and 25 deletions

View File

@ -906,7 +906,7 @@ const PopupMenuBase = new Lang.Class({
},
isEmpty: function() {
return this.box.get_children().length == 0;
return this.box.get_n_children() == 0;
},
isChildMenu: function(menu) {