ui: delete dead code (the default sortable is sufficient)

This commit is contained in:
mappu 2025-01-06 19:23:08 +13:00
parent 5c5f2007f4
commit eea2097b73

12
main.go
View File

@ -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 {