diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-08 16:42:57 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-08 16:42:57 -0500 |
| commit | 3aa59d4ab9d1217fa47c4b1b265fd435547ed62f (patch) | |
| tree | bdffbdb57872231213018a6e1df732bcc0687067 /gtkcalls_unix.go | |
| parent | d9b0bd3c700f7c559757834f7463410cfafd6c1e (diff) | |
Added Combobox/Listbox.Len() and its GTK+ implementation.
Diffstat (limited to 'gtkcalls_unix.go')
| -rw-r--r-- | gtkcalls_unix.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtkcalls_unix.go b/gtkcalls_unix.go index 6d9706d..bde6b74 100644 --- a/gtkcalls_unix.go +++ b/gtkcalls_unix.go @@ -155,6 +155,13 @@ func gtk_combo_box_text_remove(widget *gtkWidget, index int) { C.gtk_combo_box_text_remove(togtkcombobox(widget), C.gint(index)) } +func gtkComboBoxLen(widget *gtkWidget) int { + cb := (*C.GtkComboBox)(unsafe.Pointer(widget)) + model := C.gtk_combo_box_get_model(cb) + // this is the same as with a Listbox so + return gtkTreeModelListLen(model) +} + func gtk_entry_new() *gtkWidget { return fromgtkwidget(C.gtk_entry_new()) } |
