[gnome-maps/wip/mlundblad/remove-more-gtk-widget-destroy: 2/6] sidebar: Stop using gtk_widget_destroy




commit 0ddec9e92cd69184c9a69102fb846131dbe64b33
Author: Marcus Lundblad <ml update uu se>
Date:   Fri Apr 23 23:02:52 2021 +0200

    sidebar: 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/sidebar.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/sidebar.js b/src/sidebar.js
index 3e97e3dc..842faa80 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -163,7 +163,7 @@ var Sidebar = GObject.registerClass({
 
         this._query.connect('point-removed', (obj, point, index) => {
             let row = this._entryList.get_row_at_index(index);
-            row.destroy();
+            this._entryList.remove(row);
         });
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]