diff options
| author | Jeff Carr <[email protected]> | 2025-09-11 15:23:17 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-11 15:23:17 -0500 |
| commit | ec661807da8b201cd51e544aee59e8de21aeb0df (patch) | |
| tree | e8c8878705d0d5c4051f99878d43f29b2da28ecc /stateWindow.go | |
| parent | 127f36ca1f82ca9c1945e08802a49e4f9e30d2b7 (diff) | |
switch over to using gitpb.Repo directly
Diffstat (limited to 'stateWindow.go')
| -rw-r--r-- | stateWindow.go | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/stateWindow.go b/stateWindow.go index a47c2ec..c5637a2 100644 --- a/stateWindow.go +++ b/stateWindow.go @@ -3,6 +3,7 @@ package main import ( "os" + "go.wit.com/gui" "go.wit.com/lib/gadgets" "go.wit.com/lib/gui/shell" "go.wit.com/log" @@ -34,6 +35,10 @@ func makebasicWindow() *gadgets.BasicWindow { readControlFile(me.repo) }) + group1.NewButton("write control file", func() { + writeDebianControlFile(me.repo) + }) + group1.NewButton("Make .deb", func() { win.Disable() if ok, err := buildPackage(me.repo); ok { @@ -47,3 +52,73 @@ func makebasicWindow() *gadgets.BasicWindow { return win } + +// This initializes the control box +func newControl(parent *gui.Node) *controlBox { + var c *controlBox + c = new(controlBox) + c.group = parent.NewGroup("choices") + c.grid = c.group.NewGrid("gridiron", 8, 1) + + c.Package = gadgets.NewOneLiner(c.grid, "Package") + c.grid.NextRow() + + c.Source = gadgets.NewOneLiner(c.grid, "Source") + c.grid.NextRow() + + c.Version = gadgets.NewOneLiner(c.grid, "Version") + c.grid.NextRow() + + c.Architecture = gadgets.NewBasicDropdown(c.grid, "Architecture") + c.Architecture.AddText("all") + c.Architecture.AddText("riscv64") + c.Architecture.AddText("amd64") + c.Architecture.AddText("arm64") + c.Architecture.AddText("ppc64") + c.Architecture.AddText("i386") + c.Architecture.AddText("sparc64") + c.Architecture.AddText("alpha") + c.Architecture.SetText("riscv64") + c.grid.NextRow() + + c.InstallPath = gadgets.NewBasicCombobox(c.grid, "Install Path") + c.InstallPath.AddText("/usr/bin") + c.InstallPath.AddText("/usr/local/bin") + c.InstallPath.AddText("/bin") + c.InstallPath.AddText("/opt/<pkg>/bin") + c.InstallPath.SetText("/usr/bin") + c.grid.NextRow() + + c.Maintainer = gadgets.NewOneLiner(c.grid, "Maintainer") + c.grid.NextRow() + + c.Packager = gadgets.NewBasicEntry(c.grid, "Packager") + c.grid.NextRow() + + c.GoPath = gadgets.NewBasicEntry(c.grid, "GoPath") + c.grid.NextRow() + + c.URL = gadgets.NewBasicEntry(c.grid, "URL") + c.grid.NextRow() + + c.Depends = gadgets.NewOneLiner(c.grid, "Depends") + c.grid.NextRow() + + c.BuildDepends = gadgets.NewOneLiner(c.grid, "Build-Depends") + c.grid.NextRow() + + c.Recommends = gadgets.NewOneLiner(c.grid, "Recommends") + c.grid.NextRow() + + c.Conflicts = gadgets.NewBasicEntry(c.grid, "Conflicts") + c.grid.NextRow() + + c.Description = gadgets.NewOneLiner(c.grid, "Description") + c.grid.NextRow() + + return c +} + +func updateControl(c *controlBox) { + c.URL.SetText(me.repo.URL) +} |
