[gnome-shell-extensions/wip/fmuellner/gtk4: 53/55] workspace-indicator: Stop using header func for separators




commit f22177c51c60b81969aa261ca7c29e9165ffd2d6
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Apr 15 23:32:20 2020 +0200

    workspace-indicator: Stop using header func for separators
    
    GTK4 added built-in support for this common pattern, so use that
    instead.

 extensions/workspace-indicator/prefs.js | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/extensions/workspace-indicator/prefs.js b/extensions/workspace-indicator/prefs.js
index 5d78162..374c14f 100644
--- a/extensions/workspace-indicator/prefs.js
+++ b/extensions/workspace-indicator/prefs.js
@@ -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(


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