ui: delete dead code (the default sortable is sufficient)
This commit is contained in:
parent
5c5f2007f4
commit
eea2097b73
12
main.go
12
main.go
@ -225,21 +225,9 @@ func (self *DockerGUI) create_tree_widget(headers ...string) *qt.QTreeWidget {
|
|||||||
tree.OnCustomContextMenuRequested(self.show_context_menu)
|
tree.OnCustomContextMenuRequested(self.show_context_menu)
|
||||||
tree.SetSortingEnabled(true)
|
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
|
return tree
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *DockerGUI) sort_tree_widget(tree *qt.QTreeWidget, column int, order qt.SortOrder) {
|
|
||||||
tree.SortItems(column, order)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add search bar
|
// Add search bar
|
||||||
func (self *DockerGUI) create_searchbar_widget(tree *qt.QTreeWidget, search_placeholder string) *qt.QLineEdit {
|
func (self *DockerGUI) create_searchbar_widget(tree *qt.QTreeWidget, search_placeholder string) *qt.QLineEdit {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user