diff options
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() - } - }) -} -*/ |
