workspace-indicator: 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:
@@ -39,8 +39,8 @@ class WorkspaceSettingsWidget 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));
|
||||
this._list.connect('row-activated', (l, row) => row.edit());
|
||||
box.append(this._list);
|
||||
|
||||
@@ -114,12 +114,6 @@ class WorkspaceSettingsWidget extends Gtk.ScrolledWindow {
|
||||
this._list.insert(new WorkspaceRow(n), newNames.indexOf(n));
|
||||
});
|
||||
}
|
||||
|
||||
_updateHeader(row, before) {
|
||||
if (!before || row.get_header())
|
||||
return;
|
||||
row.set_header(new Gtk.Separator());
|
||||
}
|
||||
});
|
||||
|
||||
const WorkspaceRow = GObject.registerClass(
|
||||
|
||||
Reference in New Issue
Block a user