From a6d960bfbfbb76471f2a9fa6d2e9d1280f63be07 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Tue, 9 Jun 2026 18:36:27 +0200 Subject: [PATCH] benchmark: sortable columns (v2.0.8) Wrap ListStore in TreeModelSort and set sort_column_id on every column so clicking any header sorts ascending/descending. Co-Authored-By: Claude Sonnet 4.6 --- linux/blitztext/__init__.py | 2 +- linux/blitztext/gtksettings.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/linux/blitztext/__init__.py b/linux/blitztext/__init__.py index f62dbea..4e7061f 100644 --- a/linux/blitztext/__init__.py +++ b/linux/blitztext/__init__.py @@ -6,4 +6,4 @@ counterpart to the macOS Blitztext menu bar app: it runs natively on the host (not in a container) so it can type into any application via xdotool. """ -__version__ = "2.0.7" +__version__ = "2.0.8" diff --git a/linux/blitztext/gtksettings.py b/linux/blitztext/gtksettings.py index ee34652..b0882c7 100644 --- a/linux/blitztext/gtksettings.py +++ b/linux/blitztext/gtksettings.py @@ -1894,7 +1894,8 @@ notebook.bt-nb tab:checked label { # cols: engine, url, model, device, best_for, time, accuracy, output_friendly, tooltip_full self.bench_store = Gtk.ListStore(str, str, str, str, str, str, str, str, str) - tree = Gtk.TreeView(model=self.bench_store) + bench_sort = Gtk.TreeModelSort(model=self.bench_store) + tree = Gtk.TreeView(model=bench_sort) tree.set_has_tooltip(True) tree.set_tooltip_column(8) # hover any row → full error / output text for title, i, expand in [("Engine", 0, False), ("URL", 1, False), @@ -1904,6 +1905,7 @@ notebook.bt-nb tab:checked label { r = Gtk.CellRendererText() r.set_property("ellipsize", Pango.EllipsizeMode.END) col = Gtk.TreeViewColumn(title, r, text=i); col.set_resizable(True) + col.set_sort_column_id(i) # click header to sort col.set_expand(expand) if i == 1: col.set_max_width(180) # keep URL column from dominating