Servers sorting by ping and players count.
For now only on "Servers" tab, and REQUIRES custom go-gtk build (see https://github.com/mattn/go-gtk/issues/290#issuecomment-262127956)
This commit is contained in:
@@ -442,6 +442,10 @@ func (m *MainWindow) InitializeTabs() {
|
||||
// ToDo: remembering it to configuration storage.
|
||||
m.all_servers_store_sortable.SetSortColumnId(m.column_pos["Servers"]["Name"], gtk.SORT_ASCENDING)
|
||||
|
||||
// Sorting functions.
|
||||
m.all_servers_store_sortable.SetSortFunc(m.column_pos["Servers"]["Players"], m.sortServersByPlayers)
|
||||
m.all_servers_store_sortable.SetSortFunc(m.column_pos["Servers"]["Ping"], m.sortServersByPing)
|
||||
|
||||
// Selection changed signal, which will update server's short info pane.
|
||||
m.all_servers.Connect("cursor-changed", m.showShortServerInformation)
|
||||
|
||||
|
Reference in New Issue
Block a user