diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-17 03:10:07 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-17 03:10:07 -0500 |
| commit | 24049d8324fb62b72e164f575e9c9c9d378bfbfe (patch) | |
| tree | b0410c429d59889e5ed178a909cd272e81d71f2e | |
| parent | 00abb00e8b00cc4d9ab2f4e466b8459f5e7026dc (diff) | |
Separated GTK+ listbox index retreival and dereferencing, just to be safe/to allow easier debugging.
| -rw-r--r-- | gtkcalls_unix.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtkcalls_unix.go b/gtkcalls_unix.go index 40f61cd..0394e39 100644 --- a/gtkcalls_unix.go +++ b/gtkcalls_unix.go @@ -287,7 +287,8 @@ func gListboxSelected(widget *gtkWidget) int { return -1 } path := C.gtk_tree_model_get_path(model, &iter) - return int(*C.gtk_tree_path_get_indices(path)) + idx := C.gtk_tree_path_get_indices(path) + return int(*idx) } func gListboxSelectedMulti(widget *gtkWidget) (indices []int) { @@ -305,7 +306,8 @@ func gListboxSelectedMulti(widget *gtkWidget) (indices []int) { for i := C.guint(0); i < len; i++ { d := (*C.GtkTreeRowReference)(unsafe.Pointer(rows.data)) path := C.gtk_tree_row_reference_get_path(d) - indices[i] = int(*C.gtk_tree_path_get_indices(path)) + idx := C.gtk_tree_path_get_indices(path) + indices[i] = int(*idx) rows = rows.next } return indices |
