popup window if login fails
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
f4acaa113a
commit
76243308af
24
main.go
24
main.go
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "log"
|
import "log"
|
||||||
|
import "fmt"
|
||||||
import "os"
|
import "os"
|
||||||
import "time"
|
import "time"
|
||||||
import "os/user"
|
import "os/user"
|
||||||
|
@ -174,13 +175,22 @@ func buttonClick(b *gui.ButtonMap) {
|
||||||
gui.SocketError()
|
gui.SocketError()
|
||||||
gui.Data.State = "done"
|
gui.Data.State = "done"
|
||||||
} else {
|
} else {
|
||||||
count := countVMS(currentMessage)
|
log.Println("LOGIN currentMessage =", currentMessage)
|
||||||
log.Println("LOGIN VMS currentMessage =", currentMessage)
|
if (currentMessage.Type == pb.Event_OK) {
|
||||||
log.Println("LOGIN VMS count =", count)
|
log.Println("LOGIN WAS OK!")
|
||||||
if (count != 0) {
|
log.Println("LOGIN WAS OK!")
|
||||||
name := "Virtual Machines (" + b.AccNick + ")"
|
log.Println("LOGIN WAS OK!")
|
||||||
mh := gui.AddVmsTab(name, count)
|
}
|
||||||
ReadReceivedData(currentMessage, mh)
|
if (currentMessage.Type == pb.Event_FAIL) {
|
||||||
|
log.Println("LOGIN FAILED")
|
||||||
|
log.Println("LOGIN FAILED")
|
||||||
|
log.Println("LOGIN FAILED")
|
||||||
|
msg := "On account " + gui.Data.AccNick + "\n"
|
||||||
|
msg += "pb.Comment = " + currentMessage.Comment + "\n"
|
||||||
|
msg += "pb.Id = " + fmt.Sprintf("%d", currentMessage.Id) + "\n"
|
||||||
|
msg += "pb.Email = " + currentMessage.Email + "\n"
|
||||||
|
msg += "pb.Username = " + currentMessage.Username + "\n"
|
||||||
|
gui.ErrorWindow("Login Failed", msg)
|
||||||
}
|
}
|
||||||
currentMessage = nil
|
currentMessage = nil
|
||||||
gui.Data.State = "done"
|
gui.Data.State = "done"
|
||||||
|
|
Loading…
Reference in New Issue