summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-09 11:36:44 -0400
committerPietro Gagliardi <[email protected]>2014-03-09 11:36:44 -0400
commita7ec908ebd5e344628717cab874919dfc29cd58c (patch)
tree43e2cba97e5d2a79b65542b9c4a367df3ccf1885
parent1389fda5283165b7bfa123fcd595b0b0e53a8f28 (diff)
Removed gListboxSelected; it was never being called anyway (only gListboxSelectedMulti is; Windows still uses selectedIndex() for Listbox because of differences in how multi-selection listboxes are handled there and Mac OS X never had this function written to begin with).
-rw-r--r--listbox_unix.go15
-rw-r--r--sysdata_unix.go1
2 files changed, 0 insertions, 16 deletions
diff --git a/listbox_unix.go b/listbox_unix.go
index cc6ca44..d3615f1 100644
--- a/listbox_unix.go
+++ b/listbox_unix.go
@@ -136,21 +136,6 @@ func gListboxInsert(widget *gtkWidget, index int, what string) {
C.gtkListStoreSet(ls, &iter, cwhat)
}
-func gListboxSelected(widget *gtkWidget) int {
- var model *C.GtkTreeModel
- var iter C.GtkTreeIter
-
- tv := getTreeViewFrom(widget)
- sel := C.gtk_tree_view_get_selection(tv)
- if !fromgbool(C.gtk_tree_selection_get_selected(sel, &model, &iter)) {
- return -1
- }
- path := C.gtk_tree_model_get_path(model, &iter)
- idx := C.gtk_tree_path_get_indices(path)
- // idx is an array; simply derefernece the pointer to the first element to get the first element/only member
- return int(*idx)
-}
-
func gListboxSelectedMulti(widget *gtkWidget) (indices []int) {
var model *C.GtkTreeModel
diff --git a/sysdata_unix.go b/sysdata_unix.go
index 8b49cad..f55e463 100644
--- a/sysdata_unix.go
+++ b/sysdata_unix.go
@@ -105,7 +105,6 @@ var classTypes = [nctypes]*classData{
text: gListboxText,
append: gListboxAppend,
insert: gListboxInsert,
- selected: gListboxSelected,
selMulti: gListboxSelectedMulti,
smtexts: gListboxSelMultiTexts,
delete: gListboxDelete,