keyboard: Fix suggestions box

The suggestions box actor was not being correctly populated.
Make it correctly use the St.BoxLayout add_child() method.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3422
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2965
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1806>
This commit is contained in:
Jia Chao 2021-04-13 10:07:54 +08:00 committed by Marge Bot
parent 62e40a1350
commit f76e6877c7

View File

@ -198,7 +198,7 @@ class Suggestions extends St.BoxLayout {
add(word, callback) { add(word, callback) {
let button = new St.Button({ label: word }); let button = new St.Button({ label: word });
button.connect('clicked', callback); button.connect('clicked', callback);
this.add(button); this.add_child(button);
} }
clear() { clear() {