diff options
| author | Jeff Carr <[email protected]> | 2024-02-11 06:32:48 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-11 06:32:48 -0600 |
| commit | e4e12ae90dd2f9775b1d45c1d083a4e44817a655 (patch) | |
| tree | 8e368c2e9fad9a6f0d2e7543fc7bf2f208a85bf0 /main.go | |
| parent | e78fd84d74158731e5cb2ae32ffc1699e5e1cfba (diff) | |
specify repo on command line works
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 36 |
1 files changed, 14 insertions, 22 deletions
@@ -2,6 +2,9 @@ package main import ( + "os" + "path/filepath" + "go.wit.com/gui" "go.wit.com/lib/debugger" "go.wit.com/lib/gadgets" @@ -11,8 +14,7 @@ import ( // This is the beginning of the binary tree of GUI widgets var myGui *gui.Node -// this is the primary window. If you close it, the program will exit -// var mainWindow *gui.Node +var cBox *controlBox // this is a basic window. the user can open and close it var basicWindow *gadgets.BasicWindow @@ -29,9 +31,18 @@ func main() { myGui = gui.New() myGui.Default() - // helloworld() basicWindow = makebasicWindow() + if args.Repo != "" { + filepath := filepath.Join("/home/jcarr/go/src", args.Repo) + os.Chdir(filepath) + + cBox.addRepo(args.Repo) + cBox.readControlFile() + basicWindow.Show() + // go will sit here until the window exits + gui.Watchdog() + } if args.OpenGui { basicWindow.Show() // go will sit here until the window exits @@ -46,22 +57,3 @@ func main() { }() } } - -/* -// This initializes the first window and some widgets -func helloworld() { - mainWindow = myGui.NewWindow("Debian Package Creater for GO Language Applicatiosn").SetProgName("BASEWIN") - - box := mainWindow.NewBox("hbox", true) - // section1 = newChoices(box) - - group := box.NewGroup("control file") - group.NewButton("show basic window", func() { - if basicWindow.Hidden() { - basicWindow.Show() - } else { - basicWindow.Hide() - } - }) -} -*/ |
