[gnome-maps/wip/mlundblad/remove-more-gtk-widget-destroy: 3/3] socialPlaceListBox: Stop using gtk_widget_destroy()
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/remove-more-gtk-widget-destroy: 3/3] socialPlaceListBox: Stop using gtk_widget_destroy()
- Date: Fri, 23 Apr 2021 21:43:45 +0000 (UTC)
commit 8e9c94b3e753145005c14b3fc51a754b7a2a3375
Author: Marcus Lundblad <ml update uu se>
Date: Fri Apr 23 23:42:32 2021 +0200
socialPlaceListBox: Stop using gtk_widget_destroy()
destroy() will only work for top-levels in GTK 4.
Prepare by using container-specific methods to
remove children.
src/socialPlaceListBox.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/socialPlaceListBox.js b/src/socialPlaceListBox.js
index 7f756393..d12d9197 100644
--- a/src/socialPlaceListBox.js
+++ b/src/socialPlaceListBox.js
@@ -71,9 +71,12 @@ var SocialPlaceListBox = GObject.registerClass({
}
set matches(matches) {
- this.forall(function(row) {
- row.destroy();
- });
+ let row = this.get_row_at_index(0);
+
+ while (row) {
+ this.remove(row);
+ row = this.get_row_at_index(0);
+ }
this._matches = matches;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]