From edf533f08bf43a2a869930b92868b0d80cb08fe5 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 3 Dec 2024 00:32:29 -0600 Subject: [PATCH] continued move to protobuf --- argv.go | 40 ---------------------------------------- globalBuildOptions.go | 6 +++--- globalDisplayOptions.go | 15 --------------- main.go | 2 +- 4 files changed, 4 insertions(+), 59 deletions(-) diff --git a/argv.go b/argv.go index ac0bdd9..cf8e62c 100644 --- a/argv.go +++ b/argv.go @@ -6,8 +6,6 @@ package main */ import ( - "os" - "go.wit.com/dev/alexflint/arg" "go.wit.com/lib/debugger" "go.wit.com/lib/gui/logsettings" @@ -47,41 +45,3 @@ func init() { func (argv) Version() string { return "autotypist " + VERSION } - -// This will process the command line arguements after everything is initialized -// If any of them are called, don't show the GUI at all and just exit. -func handleCmdLine() { - var doExit bool = false - - if myargv.CheckoutDevel { - me.autotypistWindow.Hide() - me.repos.View.ArgCheckoutDevel() - doExit = true - } else { - log.Info("not switching to devel branches") - } - - if myargv.CheckoutUser { - me.autotypistWindow.Hide() - me.repos.View.ArgCheckoutUser() - doExit = true - } else { - log.Info("not switching to user branches") - } - - if myargv.GitPull { - me.autotypistWindow.Hide() - if me.repos.View.ArgGitPull() { - log.Info("git pull everywhere worked") - } else { - log.Info("git failed somewhere") - } - doExit = true - } else { - log.Info("not running git pull everywhere") - } - - if doExit { - os.Exit(0) - } -} diff --git a/globalBuildOptions.go b/globalBuildOptions.go index 95c8a14..7ebdb19 100644 --- a/globalBuildOptions.go +++ b/globalBuildOptions.go @@ -61,19 +61,19 @@ func globalBuildOptions(vbox *gui.Node) { grid.NextRow() grid.NewButton("git checkout master branch", func() { - me.repos.View.ArgCheckoutMaster() + me.forge.CheckoutMaster() }) grid.NewLabel("") // set the order of these in the config file grid.NextRow() grid.NewButton("git checkout devel branch", func() { - me.repos.View.ArgCheckoutDevel() + me.forge.CheckoutDevel() }) grid.NewLabel("") // set the order of these in the config file grid.NextRow() grid.NewButton("git checkout "+usr.Username+" branch", func() { - me.repos.View.ArgCheckoutUser() + me.forge.CheckoutUser() }) grid.NewLabel("") grid.NextRow() diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go index ea5c41a..c7b332a 100644 --- a/globalDisplayOptions.go +++ b/globalDisplayOptions.go @@ -5,7 +5,6 @@ import ( "go.wit.com/gui" "go.wit.com/lib/debugger" - "go.wit.com/lib/gui/gowit" "go.wit.com/lib/gui/logsettings" "go.wit.com/log" ) @@ -63,20 +62,6 @@ func globalDisplayOptions(vbox *gui.Node) { tagsW.win.Toggle() } }) - - var listallB *gui.Node - listallB = group1.NewButton("Download Apps", func() { - listallB.Disable() - if me.lw == nil { - me.lw = gowit.ListWindow(me.repos.View) - } - if me.lw.Hidden() { - me.lw.Show() - } else { - me.lw.Hide() - } - listallB.Enable() - }) } func debuggerBox(vbox *gui.Node) { diff --git a/main.go b/main.go index 5decd5e..cff1c7d 100644 --- a/main.go +++ b/main.go @@ -57,7 +57,7 @@ func main() { // process everything on the command line // may exit here - handleCmdLine() + // handleCmdLine() // setup the autoscan functions me.repos.View.RegisterHideFunction(hideFunction)