diff options
Diffstat (limited to 'stateWindow.go')
| -rw-r--r-- | stateWindow.go | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/stateWindow.go b/stateWindow.go index 194f220..bc5616d 100644 --- a/stateWindow.go +++ b/stateWindow.go @@ -9,17 +9,18 @@ import ( ) // This initializes the first window, a group and a button +// this is terribly old code. redo this all after widgets are switched to protobuf func makebasicWindow() *gadgets.BasicWindow { log.Warn("init basicWindow state") - basicWindow = gadgets.NewBasicWindow(myGui, "Create .deb files for GO applications") - basicWindow.Make() - basicWindow.Custom = func() { + win := gadgets.NewBasicWindow(me.myGui, "Create .deb files for GO applications") + win.Make() + win.Custom = func() { log.Info("got to close") os.Exit(0) } - box1 := basicWindow.Box() - cBox = newControl(box1) + box1 := win.Box() + me.cBox = newControl(box1) vbox := box1.Box().Horizontal() group1 := vbox.NewGroup("controls").Horizontal() // Vertical() @@ -29,19 +30,19 @@ func makebasicWindow() *gadgets.BasicWindow { }) group1.NewButton("read control file", func() { - cBox.readControlFile() + me.cBox.readControlFile() }) group1.NewButton("Make .deb", func() { - basicWindow.Disable() - if ok, err := cBox.buildPackage(); ok { + win.Disable() + if ok, err := me.cBox.buildPackage(); ok { log.Info("build worked") os.Exit(0) } else { log.Warn("build failed", err) } - basicWindow.Enable() + win.Enable() }) - return basicWindow + return win } |
