summaryrefslogtreecommitdiff
path: root/label.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-28 01:05:06 -0400
committerPietro Gagliardi <[email protected]>2014-06-28 01:05:06 -0400
commitea6200a432c2954ec2b38afc66d1795dd161e8d9 (patch)
tree10665ae3e2ed42bb6a16027b7eb40adf7c8dee58 /label.go
parent05ffc6511ab11fa365b2e8961bc67770bbf79777 (diff)
Began the migration to the new API. Removed locks from the public control APIs; they won't be needed anymore.
Diffstat (limited to 'label.go')
-rw-r--r--label.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/label.go b/label.go
index ca17aca..31c61e2 100644
--- a/label.go
+++ b/label.go
@@ -2,16 +2,11 @@
package ui
-import (
- "sync"
-)
-
// A Label is a static line of text used to mark other controls.
// Label text is drawn on a single line; text that does not fit is truncated.
// A Label can appear in one of two places: bound to a control or standalone.
// This determines the vertical alignment of the label.
type Label struct {
- lock sync.Mutex
created bool
sysData *sysData
initText string
@@ -39,9 +34,6 @@ func NewStandaloneLabel(text string) *Label {
// SetText sets the Label's text.
func (l *Label) SetText(text string) {
- l.lock.Lock()
- defer l.lock.Unlock()
-
if l.created {
l.sysData.setText(text)
return
@@ -51,9 +43,6 @@ func (l *Label) SetText(text string) {
// Text returns the Label's text.
func (l *Label) Text() string {
- l.lock.Lock()
- defer l.lock.Unlock()
-
if l.created {
return l.sysData.text()
}
@@ -61,9 +50,6 @@ func (l *Label) Text() string {
}
func (l *Label) make(window *sysData) error {
- l.lock.Lock()
- defer l.lock.Unlock()
-
l.sysData.alternate = l.standalone
err := l.sysData.make(window)
if err != nil {