Fix for previous commit, wrong sorting call was masked on Windows.
This commit is contained in:
parent
e16d6fa878
commit
e731653652
@ -418,11 +418,7 @@ func (m *MainWindow) InitializeTabs() {
|
|||||||
width_int, _ := strconv.Atoi(width)
|
width_int, _ := strconv.Atoi(width)
|
||||||
|
|
||||||
col := gtk.NewTreeViewColumnWithAttributes(name, gtk.NewCellRendererText(), "markup", position_int)
|
col := gtk.NewTreeViewColumnWithAttributes(name, gtk.NewCellRendererText(), "markup", position_int)
|
||||||
// For some reason this cause panic on Windows, so disabling
|
col.SetSortColumnId(position_int)
|
||||||
// default sorting here.
|
|
||||||
if runtime.GOOS != "windows" {
|
|
||||||
col.SetSortColumnId(position_int)
|
|
||||||
}
|
|
||||||
col.SetReorderable(true)
|
col.SetReorderable(true)
|
||||||
col.SetResizable(true)
|
col.SetResizable(true)
|
||||||
// GtkTreeViewColumn.SetFixedWidth() accepts only positive integers.
|
// GtkTreeViewColumn.SetFixedWidth() accepts only positive integers.
|
||||||
@ -444,7 +440,11 @@ func (m *MainWindow) InitializeTabs() {
|
|||||||
// Sorting.
|
// Sorting.
|
||||||
// By default we are sorting by server name.
|
// By default we are sorting by server name.
|
||||||
// ToDo: remembering it to configuration storage.
|
// 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.
|
// Sorting functions.
|
||||||
// Race conditions and GC crazyness appears when activated, so for
|
// Race conditions and GC crazyness appears when activated, so for
|
||||||
|
Reference in New Issue
Block a user