From 20f346e53aa33bf5ee4a01b09a75b793358776c8 Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Mon, 18 Mar 2024 13:32:42 -0400 Subject: [PATCH] mintUpdate.py: Re-set the type-to-search column any time the model is replaced. This needs to be done each time, not just at treeview construction. Issue: - Restart mintupdate. Click in updates window, type to search. Observe that it works. - Refresh updates, try again. Observe that the UI freezes. The search column has been reset, and will use column 0 by default. --- usr/lib/linuxmint/mintUpdate/mintUpdate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/lib/linuxmint/mintUpdate/mintUpdate.py b/usr/lib/linuxmint/mintUpdate/mintUpdate.py index 7d5561d3..070eed0d 100755 --- a/usr/lib/linuxmint/mintUpdate/mintUpdate.py +++ b/usr/lib/linuxmint/mintUpdate/mintUpdate.py @@ -1166,6 +1166,7 @@ def run(self): self.application.builder.get_object("notebook_details").set_current_page(0) self.application.treeview.set_model(model) + self.application.treeview.set_search_column(UPDATE_DISPLAY_NAME) del model Gdk.threads_leave() @@ -1487,7 +1488,6 @@ def __init__(self): self.treeview.set_tooltip_column(UPDATE_TOOLTIP) - self.treeview.set_search_column(UPDATE_DISPLAY_NAME) self.treeview.set_search_equal_func(name_search_func) self.treeview.append_column(column_type) self.treeview.append_column(column_upgrade) @@ -2210,7 +2210,6 @@ def open_history(self, widget): treeview.append_column(self.column_new_version) treeview.set_headers_clickable(True) treeview.set_reorderable(False) - treeview.set_search_column(COL_NAME) treeview.set_search_equal_func(name_search_func) treeview.set_enable_search(True) treeview.show() @@ -2288,6 +2287,7 @@ def open_history(self, widget): model.set_sort_column_id(COL_DATE, Gtk.SortType.DESCENDING) treeview.set_model(model) + treeview.set_search_column(COL_NAME) def on_query_tooltip(widget, x, y, keyboard, tooltip): if not widget.get_tooltip_context(x, y, keyboard):