summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addAccount.go3
-rw-r--r--gui.go7
-rw-r--r--infoTabUI.go16
3 files changed, 11 insertions, 15 deletions
diff --git a/addAccount.go b/addAccount.go
index d9c3d24..1c61d22 100644
--- a/addAccount.go
+++ b/addAccount.go
@@ -74,6 +74,7 @@ func AddAccountBox(custom func(int, string)) *ui.Box {
entryNick.OnChanged(func(*ui.Entry) {
log.Println("OK. nickname =", entryNick.Text())
+ Data.AccNick = entryNick.Text()
})
hboxAccount.Append(vboxN, false)
// End 'Nickname' vertical box
@@ -90,6 +91,7 @@ func AddAccountBox(custom func(int, string)) *ui.Box {
entryUser.OnChanged(func(*ui.Entry) {
log.Println("OK. username =", entryUser.Text())
+ Data.AccUser = entryUser.Text()
})
hboxAccount.Append(vboxU, false)
// End 'Username' vertical box
@@ -106,6 +108,7 @@ func AddAccountBox(custom func(int, string)) *ui.Box {
entryPass.OnChanged(func(*ui.Entry) {
log.Println("OK. password =", entryPass.Text())
+ Data.AccPass = entryPass.Text()
})
hboxAccount.Append(vboxP, false)
// End 'Password' vertical box
diff --git a/gui.go b/gui.go
index c61e202..11cca30 100644
--- a/gui.go
+++ b/gui.go
@@ -28,6 +28,11 @@ type GuiDataStructure struct {
GitCommit string
GoVersion string
+ // account entry textboxes
+ AccNick string
+ AccUser string
+ AccPass string
+
// stuff for the splash screen / setup tabs
cloudWindow *ui.Window
cloudTab *ui.Tab
@@ -39,8 +44,6 @@ type GuiDataStructure struct {
tabcount int
allButtons []ButtonMap
-
-
// stuff for the 'area'
fontButton *ui.FontButton
attrstr *ui.AttributedString
diff --git a/infoTabUI.go b/infoTabUI.go
index 778eb23..8b78770 100644
--- a/infoTabUI.go
+++ b/infoTabUI.go
@@ -26,20 +26,9 @@ func makeCloudInfoBox(custom func(int, string)) *ui.Box {
vbox.Append(ui.NewColorButton(), false)
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)
- addButton := ui.NewButton("Add Account")
- addButton.OnClicked(func(*ui.Button) {
- log.Println("Not Implemented Yet. Try adding --debugging")
- })
- vbox.Append(addButton, false)
+ vbox.Append(CreateButton("Add Account", "ADD", custom), false)
if (config.String("debugging") == "true") {
addDebuggingButtons(vbox, custom)
@@ -80,7 +69,8 @@ func makeCloudInfoBox(custom func(int, string)) *ui.Box {
hostname := config.String("accounts." + account + ".hostname")
domainname := config.String("accounts." + account + ".domainname")
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)
vbox.Append(ui.NewLabel(a), false)
}