From ffa1bbe0b91a8c812ddcea5c5d65e55f60d07f33 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 30 Jun 2014 22:48:12 -0400 Subject: Restored the previous new API. I'm going to change it so that events are callbacks rather than using a window handler, but other than that... yeah. --- lineedit.go | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'lineedit.go') diff --git a/lineedit.go b/lineedit.go index a45a443..56ac97c 100644 --- a/lineedit.go +++ b/lineedit.go @@ -2,13 +2,8 @@ package ui -import ( - "sync" -) - // A LineEdit is a control which allows you to enter a single line of text. type LineEdit struct { - lock sync.Mutex created bool sysData *sysData initText string @@ -33,9 +28,6 @@ func NewPasswordEdit() *LineEdit { // SetText sets the LineEdit's text. func (l *LineEdit) SetText(text string) { - l.lock.Lock() - defer l.lock.Unlock() - if l.created { l.sysData.setText(text) return @@ -45,9 +37,6 @@ func (l *LineEdit) SetText(text string) { // Text returns the LineEdit's text. func (l *LineEdit) Text() string { - l.lock.Lock() - defer l.lock.Unlock() - if l.created { return l.sysData.text() } @@ -55,9 +44,6 @@ func (l *LineEdit) Text() string { } func (l *LineEdit) make(window *sysData) error { - l.lock.Lock() - defer l.lock.Unlock() - l.sysData.alternate = l.password err := l.sysData.make(window) if err != nil { -- cgit v1.2.3