Skip to content

Commit

Permalink
Fix TreeSelection.GetSelected interface (conformal#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel von Blomberg committed Feb 13, 2016
1 parent 6835696 commit 66f9e48
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions gtk/gtk.go
Original file line number Diff line number Diff line change
Expand Up @@ -8365,17 +8365,15 @@ func wrapTreeSelection(obj *glib.Object) *TreeSelection {
}

// GetSelected() is a wrapper around gtk_tree_selection_get_selected().
func (v *TreeSelection) GetSelected(model *ITreeModel, iter *TreeIter) bool {
var pcmodel **C.GtkTreeModel
if model != nil {
cmodel := (*model).toTreeModel()
pcmodel = &cmodel
} else {
pcmodel = nil
}
func (v *TreeSelection) GetSelected() (model ITreeModel, iter TreeIter, ok bool) {
var cmodel *C.GtkTreeModel
var citer C.GtkTreeIter
c := C.gtk_tree_selection_get_selected(v.native(),
pcmodel, iter.native())
return gobool(c)
&cmodel, &citer)
model = wrapTreeModel(wrapObject(unsafe.Pointer(cmodel)))
iter = TreeIter{citer}
ok = gobool(c)
return
}

// SelectPath is a wrapper around gtk_tree_selection_select_path().
Expand Down

0 comments on commit 66f9e48

Please sign in to comment.