add Namespace

This commit is contained in:
Jeff Carr 2025-09-11 15:33:17 -05:00
parent 6acc0b4f8b
commit 7b84ddd64b
2 changed files with 9 additions and 1 deletions

View File

@ -30,6 +30,7 @@ type controlBox struct {
Maintainer *gadgets.OneLiner
Packager *gadgets.BasicEntry
GoPath *gadgets.BasicEntry
Namespace *gadgets.BasicEntry
URL *gadgets.BasicEntry
Architecture *gadgets.BasicDropdown
InstallPath *gadgets.BasicCombobox

View File

@ -22,7 +22,7 @@ func makebasicWindow() *gadgets.BasicWindow {
box1 := win.Box()
// me.cBox = newControl(box1)
newControl(box1)
cbox := newControl(box1)
vbox := box1.Box().Horizontal()
group1 := vbox.NewGroup("controls").Horizontal() // Vertical()
@ -38,6 +38,9 @@ func makebasicWindow() *gadgets.BasicWindow {
group1.NewButton("write control file", func() {
writeDebianControlFile(me.repo)
})
group1.NewButton("update gui", func() {
updateControl(cbox)
})
group1.NewButton("Make .deb", func() {
win.Disable()
@ -98,6 +101,9 @@ func newControl(parent *gui.Node) *controlBox {
c.GoPath = gadgets.NewBasicEntry(c.grid, "GoPath")
c.grid.NextRow()
c.Namespace = gadgets.NewBasicEntry(c.grid, "Namespace")
c.grid.NextRow()
c.URL = gadgets.NewBasicEntry(c.grid, "URL")
c.grid.NextRow()
@ -120,5 +126,6 @@ func newControl(parent *gui.Node) *controlBox {
}
func updateControl(c *controlBox) {
c.Namespace.SetText(me.repo.Namespace)
c.URL.SetText(me.repo.URL)
}