[gnome-maps/wip/mlundblad/cleanup-gtk-deprecations: 16/20] accountListBox: Stop using generic GtkContainer add method
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/cleanup-gtk-deprecations: 16/20] accountListBox: Stop using generic GtkContainer add method
- Date: Wed, 24 Mar 2021 22:05:13 +0000 (UTC)
commit 003eca8934b6d7e08e188d8a676e463b618f509a
Author: Marcus Lundblad <ml update uu se>
Date: Wed Mar 24 21:27:58 2021 +0100
accountListBox: Stop using generic GtkContainer add method
In preparation for GTK 4 use class-specific methods
to add and remove children when possible.
src/accountListBox.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/accountListBox.js b/src/accountListBox.js
index 924a8a96..8a032f37 100644
--- a/src/accountListBox.js
+++ b/src/accountListBox.js
@@ -68,10 +68,10 @@ var AccountListBox = GObject.registerClass({
refresh() {
let accounts = Application.checkInManager.accounts;
- this.forall(function(row) {
- row.destroy();
- });
+ this.foreach((row) => this.remove(row));
- accounts.forEach((account) => this.add(new AccountRow({ account: account })));
+ accounts.forEach((account) => {
+ this.insert(new AccountRow({ account: account }), -1);
+ });
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]