From c0d131a659a999661a3357209f2ccdeeed47f133 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Sep 2025 05:45:29 -0500 Subject: new GUI codebase --- main.go | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index fec3f9a..c140b97 100644 --- a/main.go +++ b/main.go @@ -8,9 +8,9 @@ import ( "path/filepath" "go.wit.com/dev/alexflint/arg" - "go.wit.com/gui" "go.wit.com/lib/fhelp" "go.wit.com/lib/gadgets" + "go.wit.com/lib/gui/prep" "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/gitpb" @@ -27,20 +27,10 @@ var argv args func main() { me = new(autoType) - - // parse the command line - gui.InitArg() + prep.Bash(ARGNAME, argv.DoAutoComplete) // this line should be: prep.Bash(argv) + me.myGui = prep.Gui() // prepares the GUI package for go-args me.pp = arg.MustParse(&argv) - if argv.Bash { - argv.doBash() - os.Exit(0) - } - if len(argv.BashAuto) != 0 { - argv.doBashAuto() - os.Exit(0) - } - // load the ~/.config/forge/ config me.forge = forgepb.Init() me.found = new(gitpb.Repos) @@ -62,9 +52,7 @@ func main() { // user drops to a shell or xterm, then they shouldn't be set there either os.Unsetenv("GO111MODULE") - me.myGui = gui.New() - me.myGui.InitEmbed(resources) - me.myGui.Default() + me.myGui.Start() // loads the GUI toolkit // our main window me.mainWindow = gadgets.RawBasicWindow("GUI release manager " + VERSION) -- cgit v1.2.3