diff options
| author | Pietro Gagliardi <[email protected]> | 2015-02-21 15:53:13 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-02-21 15:53:31 -0500 |
| commit | e252945cb386312d9fb79b2fbe3179e4b1e40a62 (patch) | |
| tree | 68bb701867e568176f2ab44914662657e5b3159f /table_unix.go | |
| parent | 23e6739dfabd61fd732d9b78e13a55aeaa7c2c2d (diff) | |
Implemented Table column names on all platforms. Updates #40.
Diffstat (limited to 'table_unix.go')
| -rw-r--r-- | table_unix.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/table_unix.go b/table_unix.go index 0857014..97873b0 100644 --- a/table_unix.go +++ b/table_unix.go @@ -61,7 +61,11 @@ func finishNewTable(b *tablebase, ty reflect.Type) Table { C.gpointer(unsafe.Pointer(t))) C.gtk_tree_view_set_model(t.treeview, t.modelgtk) for i := 0; i < ty.NumField(); i++ { - cname := togstr(ty.Field(i).Name) + colname := ty.Field(i).Tag.Get("uicolumn") + if colname == "" { + colname = ty.Field(i).Name + } + cname := togstr(colname) switch { case ty.Field(i).Type == reflect.TypeOf((*image.RGBA)(nil)): // can't use GDK_TYPE_PIXBUF here because it's a macro that expands to a function and cgo hates that |
