Also small steps get you forward...
This commit is contained in:
parent
ca786607fe
commit
0399b42f70
|
@ -10,7 +10,7 @@ type NewObjectDialog struct {
|
||||||
representation *fyne.Container
|
representation *fyne.Container
|
||||||
// views
|
// views
|
||||||
selection *fyne.Container // 4buttons grid
|
selection *fyne.Container // 4buttons grid
|
||||||
protocolChooser *fyne.Container
|
protocolChooser *container.AppTabs
|
||||||
packetChooser *fyne.Container
|
packetChooser *fyne.Container
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,14 +27,14 @@ func CreateNewObjectDialog() *NewObjectDialog {
|
||||||
buttons = append(buttons, *widget.NewButton("New protocol", func() {
|
buttons = append(buttons, *widget.NewButton("New protocol", func() {
|
||||||
PPF.NewProtocolFile()
|
PPF.NewProtocolFile()
|
||||||
}))
|
}))
|
||||||
buttons = append(buttons, *widget.NewButton("Edit protocol", func() {
|
buttons = append(buttons, *widget.NewButton("Open/Edit protocol", func() {
|
||||||
pnod.representation.RemoveAll()
|
pnod.representation.RemoveAll()
|
||||||
pnod.representation.Add(pnod.protocolChooser)
|
pnod.representation.Add(pnod.protocolChooser)
|
||||||
}))
|
}))
|
||||||
buttons = append(buttons, *widget.NewButton("New packet", func() {
|
buttons = append(buttons, *widget.NewButton("New packet", func() {
|
||||||
PPF.NewPacketFile()
|
PPF.NewPacketFile()
|
||||||
}))
|
}))
|
||||||
buttons = append(buttons, *widget.NewButton("Edit packet", func() {
|
buttons = append(buttons, *widget.NewButton("Open/Edit packet", func() {
|
||||||
pnod.representation.RemoveAll()
|
pnod.representation.RemoveAll()
|
||||||
pnod.representation.Add(pnod.packetChooser)
|
pnod.representation.Add(pnod.packetChooser)
|
||||||
}))
|
}))
|
||||||
|
@ -44,13 +44,18 @@ func CreateNewObjectDialog() *NewObjectDialog {
|
||||||
}
|
}
|
||||||
pnod.selection = container.NewMax(selectgrid)
|
pnod.selection = container.NewMax(selectgrid)
|
||||||
|
|
||||||
pnod.representation.Add(pnod.selection)
|
pnod.representation.Add(pnod.selection) // add selection per default
|
||||||
// precreate the choosers
|
// generate protocol chooser view
|
||||||
/* protocol chooser
|
// App Tabs or vertical Accordion (doesnt exist yet)
|
||||||
Accordeon for
|
pnod.protocolChooser = container.NewAppTabs(nil)
|
||||||
- Improve existing protocols (Account required)
|
// first tab -> official protocol repo, for viewing and editing/improvement
|
||||||
- Open saved protocols
|
// file chooser embedded
|
||||||
*/
|
// second tab -> own protocols, in a folder somewhere.
|
||||||
|
// file chooser embedded
|
||||||
|
|
||||||
|
// generate packet chooser view
|
||||||
|
// Just a file chooser embedded.
|
||||||
|
|
||||||
// data
|
// data
|
||||||
}
|
}
|
||||||
return pnod
|
return pnod
|
||||||
|
|
Loading…
Reference in New Issue