pass through the account username and password

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-23 10:50:37 -07:00
parent 8cc6e993b9
commit e6e1fec442
3 changed files with 11 additions and 15 deletions

View File

@ -74,6 +74,7 @@ func AddAccountBox(custom func(int, string)) *ui.Box {
entryNick.OnChanged(func(*ui.Entry) { entryNick.OnChanged(func(*ui.Entry) {
log.Println("OK. nickname =", entryNick.Text()) log.Println("OK. nickname =", entryNick.Text())
Data.AccNick = entryNick.Text()
}) })
hboxAccount.Append(vboxN, false) hboxAccount.Append(vboxN, false)
// End 'Nickname' vertical box // End 'Nickname' vertical box
@ -90,6 +91,7 @@ func AddAccountBox(custom func(int, string)) *ui.Box {
entryUser.OnChanged(func(*ui.Entry) { entryUser.OnChanged(func(*ui.Entry) {
log.Println("OK. username =", entryUser.Text()) log.Println("OK. username =", entryUser.Text())
Data.AccUser = entryUser.Text()
}) })
hboxAccount.Append(vboxU, false) hboxAccount.Append(vboxU, false)
// End 'Username' vertical box // End 'Username' vertical box
@ -106,6 +108,7 @@ func AddAccountBox(custom func(int, string)) *ui.Box {
entryPass.OnChanged(func(*ui.Entry) { entryPass.OnChanged(func(*ui.Entry) {
log.Println("OK. password =", entryPass.Text()) log.Println("OK. password =", entryPass.Text())
Data.AccPass = entryPass.Text()
}) })
hboxAccount.Append(vboxP, false) hboxAccount.Append(vboxP, false)
// End 'Password' vertical box // End 'Password' vertical box

7
gui.go
View File

@ -28,6 +28,11 @@ type GuiDataStructure struct {
GitCommit string GitCommit string
GoVersion string GoVersion string
// account entry textboxes
AccNick string
AccUser string
AccPass string
// stuff for the splash screen / setup tabs // stuff for the splash screen / setup tabs
cloudWindow *ui.Window cloudWindow *ui.Window
cloudTab *ui.Tab cloudTab *ui.Tab
@ -39,8 +44,6 @@ type GuiDataStructure struct {
tabcount int tabcount int
allButtons []ButtonMap allButtons []ButtonMap
// stuff for the 'area' // stuff for the 'area'
fontButton *ui.FontButton fontButton *ui.FontButton
attrstr *ui.AttributedString attrstr *ui.AttributedString

View File

@ -26,20 +26,9 @@ func makeCloudInfoBox(custom func(int, string)) *ui.Box {
vbox.Append(ui.NewColorButton(), false) vbox.Append(ui.NewColorButton(), false)
addXbutton := CreateButton("Show bmath's Account", "BMATH", custom) addXbutton := CreateButton("Show bmath's Account", "BMATH", custom)
/*
addXbutton := ui.NewButton("Show bmath's Account")
addXbutton.OnClicked(func(*ui.Button) {
log.Println("gorillaSendProtobuf()")
gorillaSendProtobuf()
})
*/
vbox.Append(addXbutton, false) vbox.Append(addXbutton, false)
addButton := ui.NewButton("Add Account") vbox.Append(CreateButton("Add Account", "ADD", custom), false)
addButton.OnClicked(func(*ui.Button) {
log.Println("Not Implemented Yet. Try adding --debugging")
})
vbox.Append(addButton, false)
if (config.String("debugging") == "true") { if (config.String("debugging") == "true") {
addDebuggingButtons(vbox, custom) addDebuggingButtons(vbox, custom)
@ -80,7 +69,8 @@ func makeCloudInfoBox(custom func(int, string)) *ui.Box {
hostname := config.String("accounts." + account + ".hostname") hostname := config.String("accounts." + account + ".hostname")
domainname := config.String("accounts." + account + ".domainname") domainname := config.String("accounts." + account + ".domainname")
port := config.String("accounts." + account + ".port") port := config.String("accounts." + account + ".port")
a := account + " " + hostname + " " + domainname + " " + port username := config.String("accounts." + account + ".username")
a := account + " " + hostname + " " + domainname + " " + port + " " + username
log.Println("ACCOUNT: ", a) log.Println("ACCOUNT: ", a)
vbox.Append(ui.NewLabel(a), false) vbox.Append(ui.NewLabel(a), false)
} }