auto-move-windows: Stop using header func for separators

GTK4 added built-in support for this common pattern, so use that
instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
This commit is contained in:
Florian Müllner
2020-04-15 23:32:20 +02:00
parent 22ea58a849
commit d5c31273ee
+1 -7
View File
@@ -40,8 +40,8 @@ class AutoMoveSettingsWidget extends Gtk.ScrolledWindow {
this._list = new Gtk.ListBox({
selection_mode: Gtk.SelectionMode.NONE,
valign: Gtk.Align.START,
show_separators: true,
});
this._list.set_header_func(this._updateHeader.bind(this));
box.append(this._list);
const context = this._list.get_style_context();
@@ -143,12 +143,6 @@ class AutoMoveSettingsWidget extends Gtk.ScrolledWindow {
this._settings.unblock_signal_handler(this._changedId);
this._updateAction.enabled = true;
}
_updateHeader(row, before) {
if (!before || row.get_header())
return;
row.set_header(new Gtk.Separator());
}
});
const RuleRow = GObject.registerClass({