parent
25e1f27ac9
commit
92b8bddb6b
15
prefs.js
15
prefs.js
|
|
@ -65,19 +65,10 @@ const setAccessibleDescription = function(widget, description) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getChildrenOf = function(widget) {
|
const getChildrenOf = function(widget) {
|
||||||
if (IS_GTK3) {
|
if (IS_GTK3)
|
||||||
return widget.get_children();
|
return widget.get_children();
|
||||||
} else {
|
else
|
||||||
let listModel = widget.observe_children();
|
return [...widget];
|
||||||
let i = 0;
|
|
||||||
let children = [];
|
|
||||||
let child;
|
|
||||||
while (!!(child = listModel.get_item(i))) {
|
|
||||||
children.push(child);
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue