Disabling setting default sort column on windows until it will

be fixed in go-gtk (https://github.com/mattn/go-gtk/issues/291).
This commit is contained in:
Stanislav Nikitin 2016-11-22 14:25:16 +05:00
parent 89298d894b
commit e16d6fa878

View File

@ -418,7 +418,11 @@ func (m *MainWindow) InitializeTabs() {
width_int, _ := strconv.Atoi(width)
col := gtk.NewTreeViewColumnWithAttributes(name, gtk.NewCellRendererText(), "markup", position_int)
col.SetSortColumnId(position_int)
// For some reason this cause panic on Windows, so disabling
// default sorting here.
if runtime.GOOS != "windows" {
col.SetSortColumnId(position_int)
}
col.SetReorderable(true)
col.SetResizable(true)
// GtkTreeViewColumn.SetFixedWidth() accepts only positive integers.
@ -507,7 +511,11 @@ func (m *MainWindow) InitializeTabs() {
width_int, _ := strconv.Atoi(width)
col := gtk.NewTreeViewColumnWithAttributes(name, gtk.NewCellRendererText(), "markup", position_int)
col.SetSortColumnId(position_int)
// For some reason this cause panic on Windows, so disabling
// default sorting here.
if runtime.GOOS != "windows" {
col.SetSortColumnId(position_int)
}
col.SetReorderable(true)
col.SetResizable(true)
// GtkTreeViewColumn.SetFixedWidth() accepts only positive integers.