From e7316536526435756210d2983b6f881f5f759797 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Tue, 22 Nov 2016 14:37:11 +0500 Subject: [PATCH] Fix for previous commit, wrong sorting call was masked on Windows. --- ui/mainwindow_init.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/mainwindow_init.go b/ui/mainwindow_init.go index 38c0ccb..401bcf7 100644 --- a/ui/mainwindow_init.go +++ b/ui/mainwindow_init.go @@ -418,11 +418,7 @@ func (m *MainWindow) InitializeTabs() { width_int, _ := strconv.Atoi(width) col := gtk.NewTreeViewColumnWithAttributes(name, gtk.NewCellRendererText(), "markup", position_int) - // For some reason this cause panic on Windows, so disabling - // default sorting here. - if runtime.GOOS != "windows" { - col.SetSortColumnId(position_int) - } + col.SetSortColumnId(position_int) col.SetReorderable(true) col.SetResizable(true) // GtkTreeViewColumn.SetFixedWidth() accepts only positive integers. @@ -444,7 +440,11 @@ func (m *MainWindow) InitializeTabs() { // Sorting. // By default we are sorting by server name. // ToDo: remembering it to configuration storage. - m.all_servers_store_sortable.SetSortColumnId(m.column_pos["Servers"]["Name"], gtk.SORT_ASCENDING) + // For some reason this cause panic on Windows, so disabling + // default sorting here. + if runtime.GOOS != "windows" { + m.all_servers_store_sortable.SetSortColumnId(m.column_pos["Servers"]["Name"], gtk.SORT_ASCENDING) + } // Sorting functions. // Race conditions and GC crazyness appears when activated, so for