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