From eea2097b73300e8aad9447f08f7c03ddbe5aa0d9 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 6 Jan 2025 19:23:08 +1300 Subject: [PATCH] ui: delete dead code (the default sortable is sufficient) --- main.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/main.go b/main.go index eca81a1..6439346 100644 --- a/main.go +++ b/main.go @@ -225,21 +225,9 @@ func (self *DockerGUI) create_tree_widget(headers ...string) *qt.QTreeWidget { tree.OnCustomContextMenuRequested(self.show_context_menu) tree.SetSortingEnabled(true) - header := tree.Header() - header.SetSectionResizeMode(qt.QHeaderView__Interactive) - header.SetSortIndicator(0, qt.DescendingOrder) - header.SetSortIndicatorShown(true) - header.OnSortIndicatorChanged(func(col int, order qt.SortOrder) { - self.sort_tree_widget(tree, col, order) - }) - return tree } -func (self *DockerGUI) sort_tree_widget(tree *qt.QTreeWidget, column int, order qt.SortOrder) { - tree.SortItems(column, order) -} - // Add search bar func (self *DockerGUI) create_searchbar_widget(tree *qt.QTreeWidget, search_placeholder string) *qt.QLineEdit {