diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-10 14:59:39 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-10 14:59:39 -0400 |
| commit | 1e66637cd206066bced74b637e62283d9b367004 (patch) | |
| tree | 3d0c5a96eb7c5dd48232c4c935d4ca70e94311af /combobox.go | |
| parent | ad8a90ec7e4cfa8b6c3325cf2b2ce737c10f4804 (diff) | |
More go fmt.
Diffstat (limited to 'combobox.go')
| -rw-r--r-- | combobox.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/combobox.go b/combobox.go index 02040cb..83b58b7 100644 --- a/combobox.go +++ b/combobox.go @@ -9,16 +9,16 @@ import ( // A Combobox is a drop-down list of items, of which at most one can be selected at any given time. You may optionally make the combobox editable to allow custom items. Initially, no item will be selected (and no text entered in an editable Combobox's entry field). What happens to the text shown in a Combobox if its width is too small is implementation-defined. type Combobox struct { - lock sync.Mutex - created bool - sysData *sysData - initItems []string + lock sync.Mutex + created bool + sysData *sysData + initItems []string } func newCombobox(editable bool, items ...string) (c *Combobox) { c = &Combobox{ - sysData: mksysdata(c_combobox), - initItems: items, + sysData: mksysdata(c_combobox), + initItems: items, } c.sysData.alternate = editable return c @@ -67,7 +67,7 @@ func (c *Combobox) InsertBefore(what string, before int) { if before < 0 || before >= len(c.initItems) { goto badrange } - m = make([]string, 0, len(c.initItems) + 1) + m = make([]string, 0, len(c.initItems)+1) m = append(m, c.initItems[:before]...) m = append(m, what) c.initItems = append(m, c.initItems[before:]...) @@ -91,7 +91,7 @@ func (c *Combobox) Delete(index int) { if index < 0 || index >= len(c.initItems) { goto badrange } - c.initItems = append(c.initItems[:index], c.initItems[index + 1:]...) + c.initItems = append(c.initItems[:index], c.initItems[index+1:]...) return badrange: panic(fmt.Errorf("index %d out of range in Combobox.Delete()", index)) @@ -149,11 +149,11 @@ func (c *Combobox) make(window *sysData) (err error) { func (c *Combobox) setRect(x int, y int, width int, height int, rr *[]resizerequest) { *rr = append(*rr, resizerequest{ - sysData: c.sysData, - x: x, - y: y, - width: width, - height: height, + sysData: c.sysData, + x: x, + y: y, + width: width, + height: height, }) } |
