Small progress...
This commit is contained in:
parent
724f2c87c6
commit
ca786607fe
|
@ -90,7 +90,7 @@ func (ppf *ppfApp) OpenFile(path string) {
|
|||
ppf.Workarea.Append(container.NewTabItem(pfh.Filename, pfh.GetWorkarea()))
|
||||
}
|
||||
|
||||
func (ppf *ppfApp) NewFile() {
|
||||
func (ppf *ppfApp) NewProtocolFile() {
|
||||
//TODO: show entry screen with choosable ways of:
|
||||
// PROTOCOL editor
|
||||
// create a new protocol
|
||||
|
@ -103,6 +103,10 @@ func (ppf *ppfApp) NewFile() {
|
|||
ppf.Workarea.Append(container.NewTabItem(pfh.Filename, pfh.GetWorkarea()))
|
||||
}
|
||||
|
||||
func (ppf *ppfApp) NewPacketFile() {
|
||||
|
||||
}
|
||||
|
||||
func (ppf *ppfApp) SaveFile(path string) {
|
||||
item := ppf.Workarea.Selected()
|
||||
for _, pfh := range ppf.OpenProtocolFiles {
|
||||
|
|
|
@ -25,16 +25,18 @@ func CreateNewObjectDialog() *NewObjectDialog {
|
|||
// grid layout 100x100px elements in a center layout, 4 buttons, new Protocol, edit protocol, new Packet, edit Packet
|
||||
buttons := []widget.Button{}
|
||||
buttons = append(buttons, *widget.NewButton("New protocol", func() {
|
||||
|
||||
PPF.NewProtocolFile()
|
||||
}))
|
||||
buttons = append(buttons, *widget.NewButton("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() {
|
||||
|
||||
pnod.representation.RemoveAll()
|
||||
pnod.representation.Add(pnod.packetChooser)
|
||||
}))
|
||||
selectgrid := container.NewGridWithColumns(2, nil)
|
||||
for _, v := range buttons {
|
||||
|
@ -43,6 +45,12 @@ 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
|
||||
*/
|
||||
// data
|
||||
}
|
||||
return pnod
|
||||
|
|
Loading…
Reference in New Issue