about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-07-30 23:22:16 +0200
committerReto Brunner <reto@labrat.space>2020-07-30 23:22:16 +0200
commit6ee7b1c3fd40b0e2f93dcaa7ffb3b0bdd56ac285 (patch)
treeb84df04a645c1fd2ee94d7a08f2f9c717930e9ab
parent2c244222d508a32d3f5ba600944a46b6fdea1a10 (diff)
downloadaerc-6ee7b1c3fd40b0e2f93dcaa7ffb3b0bdd56ac285.tar.gz
Revert "Rename selecter to selector"
This reverts commit 2c244222d508a32d3f5ba600944a46b6fdea1a10.
-rw-r--r--doc/aerc-stylesets.7.scd12
-rw-r--r--widgets/account-wizard.go30
-rw-r--r--widgets/msgviewer.go12
3 files changed, 27 insertions, 27 deletions
diff --git a/doc/aerc-stylesets.7.scd b/doc/aerc-stylesets.7.scd
index fd7732d..829418e 100644
--- a/doc/aerc-stylesets.7.scd
+++ b/doc/aerc-stylesets.7.scd
@@ -129,12 +129,12 @@ styling.
 :  The style for the loading spinner.
 |  border
 :  The style used to draw borders. *Only the background color is used*.
-|  selector_default
-:  The default style for the selector ui element.
-|  selector_focused
-:  The focused item in a selector ui element.
-|  selector_chooser
-:  The item chooser in a selector ui element.
+|  selecter_default
+:  The default style for the selecter ui element.
+|  selecter_focused
+:  The focused item in a selecter ui element.
+|  selecter_chooser
+:  The item chooser in a selecter ui element.
 
 ## fnmatch style wildcard matching
 The styleset configuration can be made simpler by using the fnmatch
diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go
index 59f22e7..ae45bb8 100644
--- a/widgets/account-wizard.go
+++ b/widgets/account-wizard.go
@@ -179,7 +179,7 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 		At(7, 0)
 	basics.AddChild(wizard.email).
 		At(8, 0)
-	selector := NewSelector([]string{"Next"}, 0, conf.Ui).
+	selecter := NewSelecter([]string{"Next"}, 0, conf.Ui).
 		OnChoose(func(option string) {
 			email := wizard.email.String()
 			if strings.ContainsRune(email, '@') {
@@ -203,9 +203,9 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 			}
 			wizard.advance(option)
 		})
-	basics.AddChild(selector).At(9, 0)
+	basics.AddChild(selecter).At(9, 0)
 	wizard.basics = []ui.Interactive{
-		wizard.accountName, wizard.fullName, wizard.email, selector,
+		wizard.accountName, wizard.fullName, wizard.email, selecter,
 	}
 	basics.OnInvalidate(func(_ ui.Drawable) {
 		wizard.Invalidate()
@@ -261,7 +261,7 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 		ui.NewText("Connection mode",
 			conf.Ui.GetStyle(config.STYLE_HEADER))).
 		At(10, 0)
-	imapMode := NewSelector([]string{
+	imapMode := NewSelecter([]string{
 		"IMAP over SSL/TLS",
 		"IMAP with STARTTLS",
 		"Insecure IMAP",
@@ -277,14 +277,14 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 		wizard.imapUri()
 	})
 	incoming.AddChild(imapMode).At(11, 0)
-	selector = NewSelector([]string{"Previous", "Next"}, 1, conf.Ui).
+	selecter = NewSelecter([]string{"Previous", "Next"}, 1, conf.Ui).
 		OnChoose(wizard.advance)
 	incoming.AddChild(ui.NewFill(' ')).At(12, 0)
 	incoming.AddChild(wizard.imapStr).At(13, 0)
-	incoming.AddChild(selector).At(14, 0)
+	incoming.AddChild(selecter).At(14, 0)
 	wizard.incoming = []ui.Interactive{
 		wizard.imapUsername, wizard.imapPassword, wizard.imapServer,
-		imapMode, selector,
+		imapMode, selecter,
 	}
 	incoming.OnInvalidate(func(_ ui.Drawable) {
 		wizard.Invalidate()
@@ -343,7 +343,7 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 		ui.NewText("Connection mode",
 			conf.Ui.GetStyle(config.STYLE_HEADER))).
 		At(10, 0)
-	smtpMode := NewSelector([]string{
+	smtpMode := NewSelecter([]string{
 		"SMTP over SSL/TLS",
 		"SMTP with STARTTLS",
 		"Insecure SMTP",
@@ -359,7 +359,7 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 		wizard.smtpUri()
 	})
 	outgoing.AddChild(smtpMode).At(11, 0)
-	selector = NewSelector([]string{"Previous", "Next"}, 1, conf.Ui).
+	selecter = NewSelecter([]string{"Previous", "Next"}, 1, conf.Ui).
 		OnChoose(wizard.advance)
 	outgoing.AddChild(ui.NewFill(' ')).At(12, 0)
 	outgoing.AddChild(wizard.smtpStr).At(13, 0)
@@ -367,7 +367,7 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 	outgoing.AddChild(
 		ui.NewText("Copy sent messages to 'Sent' folder?",
 			conf.Ui.GetStyle(config.STYLE_HEADER))).At(15, 0)
-	copySent := NewSelector([]string{"Yes", "No"}, 0, conf.Ui).
+	copySent := NewSelecter([]string{"Yes", "No"}, 0, conf.Ui).
 		Chooser(true).OnChoose(func(option string) {
 		switch option {
 		case "Yes":
@@ -377,10 +377,10 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 		}
 	})
 	outgoing.AddChild(copySent).At(16, 0)
-	outgoing.AddChild(selector).At(17, 0)
+	outgoing.AddChild(selecter).At(17, 0)
 	wizard.outgoing = []ui.Interactive{
 		wizard.smtpUsername, wizard.smtpPassword, wizard.smtpServer,
-		smtpMode, copySent, selector,
+		smtpMode, copySent, selecter,
 	}
 	outgoing.OnInvalidate(func(_ ui.Drawable) {
 		wizard.Invalidate()
@@ -398,7 +398,7 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 			"save your settings to accounts.conf.\n\n"+
 			"To add another account in the future, run ':new-account'.",
 		conf.Ui.GetStyle(config.STYLE_DEFAULT)))
-	selector = NewSelector([]string{
+	selecter = NewSelecter([]string{
 		"Previous",
 		"Finish & open tutorial",
 		"Finish",
@@ -412,8 +412,8 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
 			wizard.finish(false)
 		}
 	})
-	complete.AddChild(selector).At(1, 0)
-	wizard.complete = []ui.Interactive{selector}
+	complete.AddChild(selecter).At(1, 0)
+	wizard.complete = []ui.Interactive{selecter}
 	complete.OnInvalidate(func(_ ui.Drawable) {
 		wizard.Invalidate()
 	})
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 6a91741..30c83f7 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -458,7 +458,7 @@ type PartViewer struct {
 	sink        io.WriteCloser
 	source      io.Reader
 	term        *Terminal
-	selector    *Selector
+	selecter    *Selecter
 	grid        *ui.Grid
 	uiConfig    config.UIConfig
 }
@@ -530,7 +530,7 @@ func NewPartViewer(acct *AccountView, conf *config.AercConfig,
 		{ui.SIZE_WEIGHT, ui.Const(1)},
 	})
 
-	selector := NewSelector([]string{"Save message", "Pipe to command"},
+	selecter := NewSelecter([]string{"Save message", "Pipe to command"},
 		0, acct.UiConfig()).
 		OnChoose(func(option string) {
 			switch option {
@@ -541,7 +541,7 @@ func NewPartViewer(acct *AccountView, conf *config.AercConfig,
 			}
 		})
 
-	grid.AddChild(selector).At(2, 0)
+	grid.AddChild(selecter).At(2, 0)
 
 	pv := &PartViewer{
 		conf:        conf,
@@ -554,7 +554,7 @@ func NewPartViewer(acct *AccountView, conf *config.AercConfig,
 		showHeaders: conf.Viewer.ShowHeaders,
 		sink:        pipe,
 		term:        term,
-		selector:    selector,
+		selecter:    selecter,
 		grid:        grid,
 		uiConfig:    acct.UiConfig(),
 	}
@@ -686,7 +686,7 @@ func (pv *PartViewer) Draw(ctx *ui.Context) {
 		)
 		ctx.Printf(0, 2, style,
 			"You can still :save the message or :pipe it to an external command")
-		pv.selector.Focus(true)
+		pv.selecter.Focus(true)
 		pv.grid.Draw(ctx)
 		return
 	}
@@ -713,7 +713,7 @@ func (pv *PartViewer) Event(event tcell.Event) bool {
 	if pv.term != nil {
 		return pv.term.Event(event)
 	}
-	return pv.selector.Event(event)
+	return pv.selecter.Event(event)
 }
 
 type HeaderView struct {