示例#1
0
// Append a row to the list store for the tree view
func addRow(listStore *gtk.ListStore, version, feature string) {
	// Get an iterator for a new row at the end of the list store
	iter := listStore.Append()

	// Set the contents of the list store row that the iterator represents
	err := listStore.Set(iter,
		[]int{COLUMN_VERSION, COLUMN_FEATURE},
		[]interface{}{version, feature})

	if err != nil {
		log.Fatal("Unable to add row:", err)
	}
}