diff options
| author | Pietro Gagliardi <[email protected]> | 2014-04-01 16:43:56 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-04-01 16:43:56 -0400 |
| commit | 2647d28f2bdc91bbc7350ceb1dec648b68d22599 (patch) | |
| tree | a7220e7101996f86f11ee5cac098be25c00c31f9 /sysdata_unix.go | |
| parent | 81153617dcfd1e30e75b7adbe29967088fdea410 (diff) | |
Removed the initText parameter from sysData.make() and changed all invocations to call sysData.setText() separately; this avoids the need to check if sysData.setText() is valid. Also implemented that on GTK+.
Diffstat (limited to 'sysdata_unix.go')
| -rw-r--r-- | sysdata_unix.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sysdata_unix.go b/sysdata_unix.go index d60bef4..50b51cd 100644 --- a/sysdata_unix.go +++ b/sysdata_unix.go @@ -64,7 +64,6 @@ var classTypes = [nctypes]*classData{ c_combobox: &classData{ make: gtk_combo_box_text_new, makeAlt: gtk_combo_box_text_new_with_entry, - // TODO setText text: gtk_combo_box_text_get_active_text, append: gtk_combo_box_text_append_text, insert: gtk_combo_box_text_insert_text, @@ -86,7 +85,6 @@ var classTypes = [nctypes]*classData{ c_listbox: &classData{ make: gListboxNewSingle, makeAlt: gListboxNewMulti, - // TODO setText text: gListboxText, append: gListboxAppend, insert: gListboxInsert, @@ -112,7 +110,7 @@ var classTypes = [nctypes]*classData{ }, } -func (s *sysData) make(initText string, window *sysData) error { +func (s *sysData) make(window *sysData) error { ct := classTypes[s.ctype] ret := make(chan *C.GtkWidget) defer close(ret) @@ -152,7 +150,6 @@ func (s *sysData) make(initText string, window *sysData) error { } <-ret } - s.setText(initText) return nil } @@ -183,9 +180,6 @@ func (s *sysData) hide() { } func (s *sysData) setText(text string) { - if classTypes[s.ctype].setText == nil { // does not have concept of text - return - } ret := make(chan struct{}) defer close(ret) uitask <- func() { |
