summaryrefslogtreecommitdiff
path: root/gtkcalls_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-17 07:32:04 -0500
committerPietro Gagliardi <[email protected]>2014-02-17 07:32:04 -0500
commite395ea105b7329b0de8f3bddc7e04ad191295675 (patch)
treee78dd67ee115aec12c3550dadd5859c424ff4382 /gtkcalls_unix.go
parent24049d8324fb62b72e164f575e9c9c9d378bfbfe (diff)
Whoops, the GList returned by gtk_tree_selection_get_selected_rows contains GtkTreePaths, not GtkTreeRowReferences. Fixed the index getting.
Diffstat (limited to 'gtkcalls_unix.go')
-rw-r--r--gtkcalls_unix.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/gtkcalls_unix.go b/gtkcalls_unix.go
index 0394e39..9b2db99 100644
--- a/gtkcalls_unix.go
+++ b/gtkcalls_unix.go
@@ -304,8 +304,7 @@ func gListboxSelectedMulti(widget *gtkWidget) (indices []int) {
}
indices = make([]int, len)
for i := C.guint(0); i < len; i++ {
- d := (*C.GtkTreeRowReference)(unsafe.Pointer(rows.data))
- path := C.gtk_tree_row_reference_get_path(d)
+ path := (*C.GtkTreePath)(unsafe.Pointer(rows.data))
idx := C.gtk_tree_path_get_indices(path)
indices[i] = int(*idx)
rows = rows.next
@@ -328,8 +327,7 @@ func gListboxSelMultiTexts(widget *gtkWidget) (texts []string) {
}
texts = make([]string, len)
for i := C.guint(0); i < len; i++ {
- d := (*C.GtkTreeRowReference)(unsafe.Pointer(rows.data))
- path := C.gtk_tree_row_reference_get_path(d)
+ path := (*C.GtkTreePath)(unsafe.Pointer(rows.data))
if !fromgbool(C.gtk_tree_model_get_iter(model, &iter, path)) {
// TODO
return