2024-02-11 01:00:05 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.wit.com/gui"
|
|
|
|
"go.wit.com/lib/gadgets"
|
2024-02-11 06:32:48 -06:00
|
|
|
"go.wit.com/lib/gui/repostatus"
|
2024-02-11 01:00:05 -06:00
|
|
|
)
|
|
|
|
|
2024-02-11 06:32:48 -06:00
|
|
|
type controlBox struct {
|
2024-02-11 01:00:05 -06:00
|
|
|
group *gui.Node // the group
|
|
|
|
grid *gui.Node // the grid
|
|
|
|
|
|
|
|
Package *gadgets.OneLiner
|
2024-02-11 02:16:51 -06:00
|
|
|
Source *gadgets.OneLiner
|
2024-02-11 03:51:37 -06:00
|
|
|
Version *gadgets.OneLiner
|
2024-02-11 01:00:05 -06:00
|
|
|
Maintainer *gadgets.OneLiner
|
|
|
|
Architecture *gadgets.BasicDropdown
|
|
|
|
InstallPath *gadgets.BasicCombobox
|
|
|
|
Depends *gadgets.OneLiner
|
|
|
|
BuildDepends *gadgets.OneLiner
|
|
|
|
Recommends *gadgets.OneLiner
|
2024-11-19 04:37:20 -06:00
|
|
|
Conflicts *gadgets.BasicEntry
|
|
|
|
Test gui.Widget
|
2024-02-11 01:00:05 -06:00
|
|
|
Description *gadgets.OneLiner
|
2024-02-11 06:32:48 -06:00
|
|
|
|
|
|
|
// repostatus things
|
2024-02-12 15:23:44 -06:00
|
|
|
pathL *gadgets.OneLiner
|
|
|
|
lastTag *gadgets.OneLiner
|
|
|
|
dirtyL *gadgets.OneLiner
|
|
|
|
currentL *gadgets.OneLiner
|
|
|
|
buildDate *gadgets.OneLiner
|
2024-02-20 23:13:26 -06:00
|
|
|
tagDate *gadgets.OneLiner
|
2024-02-12 15:23:44 -06:00
|
|
|
status *repostatus.RepoStatus
|
2024-02-11 01:00:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// This initializes the control box
|
2024-02-11 06:32:48 -06:00
|
|
|
func newControl(parent *gui.Node) *controlBox {
|
|
|
|
var c *controlBox
|
|
|
|
c = new(controlBox)
|
2024-02-11 01:00:05 -06:00
|
|
|
c.group = parent.NewGroup("choices")
|
|
|
|
c.grid = c.group.NewGrid("gridiron", 8, 1)
|
|
|
|
|
|
|
|
c.Package = gadgets.NewOneLiner(c.grid, "Package")
|
|
|
|
c.grid.NextRow()
|
2024-02-11 02:16:51 -06:00
|
|
|
|
|
|
|
c.Source = gadgets.NewOneLiner(c.grid, "Source")
|
|
|
|
c.grid.NextRow()
|
|
|
|
|
2024-02-11 03:51:37 -06:00
|
|
|
c.Version = gadgets.NewOneLiner(c.grid, "Version")
|
|
|
|
c.grid.NextRow()
|
|
|
|
|
2024-02-11 01:00:05 -06:00
|
|
|
c.Architecture = gadgets.NewBasicDropdown(c.grid, "Architecture")
|
2024-11-16 11:00:46 -06:00
|
|
|
c.Architecture.AddText("all")
|
|
|
|
c.Architecture.AddText("riscv64")
|
2024-02-11 01:00:05 -06:00
|
|
|
c.Architecture.AddText("amd64")
|
2024-11-16 11:00:46 -06:00
|
|
|
c.Architecture.AddText("arm64")
|
2024-11-16 13:51:51 -06:00
|
|
|
c.Architecture.AddText("ppc64")
|
|
|
|
c.Architecture.AddText("i386")
|
|
|
|
c.Architecture.AddText("sparc64")
|
|
|
|
c.Architecture.AddText("alpha")
|
2024-11-16 11:00:46 -06:00
|
|
|
c.Architecture.SetText("riscv64")
|
2024-02-11 01:00:05 -06:00
|
|
|
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.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()
|
|
|
|
|
2024-11-19 04:37:20 -06:00
|
|
|
c.Conflicts = gadgets.NewBasicEntry(c.grid, "Conflicts")
|
|
|
|
c.grid.NextRow()
|
|
|
|
|
2024-02-11 01:00:05 -06:00
|
|
|
c.Description = gadgets.NewOneLiner(c.grid, "Description")
|
2024-02-11 06:32:48 -06:00
|
|
|
c.grid.NextRow()
|
2024-02-11 01:00:05 -06:00
|
|
|
|
|
|
|
return c
|
|
|
|
}
|