diff --git a/main.go b/main.go index ed35739..08f5540 100644 --- a/main.go +++ b/main.go @@ -191,6 +191,21 @@ func mainMouseClick(b *gui.ButtonMap) { log.Println("THIS IS LAME. CONFIG FILE MADE NULL ACCOUNTS key =", key) } } + if (gui.Data.State == "main") { + gui.ShowMainTab() + gui.Data.State = "done" + return + } else if (gui.Data.State == "account1") { + gui.ShowAccountTab(0) + gui.Data.State = "main" + return + } + } else if (b.Action == "ADD TAB") { + log.Println("\tADD TAB TRY b.Action = ", b.Action) + log.Println("\tADD TAB TRY gui.ShowAccountTab(-1)") + gui.ShowAccountTab(-1) + gui.Data.State = "done" + return } else if (b.Action == "QUIT") { onExit(nil) } else if (b.Action == "CREATE") { @@ -229,6 +244,11 @@ func mainMouseClick(b *gui.ButtonMap) { config.Accounts = append(config.Accounts, acc) } + if (gui.Data.State == "main") { + gui.ShowMainTab() + gui.Data.State = "done" + return + } } else if (b.Action == "LOGIN") { log.Println("\tTRIGGER LOGIN ACCOUNT") gui.Data.State = "SEND LOGIN" @@ -336,6 +356,7 @@ func mainMouseClick(b *gui.ButtonMap) { } } + /* if (gui.Data.State == "splash") { gui.Data.State = "account1" return @@ -349,6 +370,7 @@ func mainMouseClick(b *gui.ButtonMap) { } else if (gui.Data.State == "QUIT") { onExit(nil) } + */ } // @@ -382,6 +404,7 @@ func prepareAndSend(event *pb.Event) { } // this watches the GUI primarily to process protobuf's +// maybe this is pointless or wrong func watchGUI() { count := 0 @@ -399,7 +422,5 @@ func watchGUI() { log.Println("gui.State = kill") onExit(nil) } - if (gui.Data.State == "splash") { - } } }