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()))
|
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:
|
//TODO: show entry screen with choosable ways of:
|
||||||
// PROTOCOL editor
|
// PROTOCOL editor
|
||||||
// create a new protocol
|
// create a new protocol
|
||||||
|
@ -103,6 +103,10 @@ func (ppf *ppfApp) NewFile() {
|
||||||
ppf.Workarea.Append(container.NewTabItem(pfh.Filename, pfh.GetWorkarea()))
|
ppf.Workarea.Append(container.NewTabItem(pfh.Filename, pfh.GetWorkarea()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ppf *ppfApp) NewPacketFile() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func (ppf *ppfApp) SaveFile(path string) {
|
func (ppf *ppfApp) SaveFile(path string) {
|
||||||
item := ppf.Workarea.Selected()
|
item := ppf.Workarea.Selected()
|
||||||
for _, pfh := range ppf.OpenProtocolFiles {
|
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
|
// grid layout 100x100px elements in a center layout, 4 buttons, new Protocol, edit protocol, new Packet, edit Packet
|
||||||
buttons := []widget.Button{}
|
buttons := []widget.Button{}
|
||||||
buttons = append(buttons, *widget.NewButton("New protocol", func() {
|
buttons = append(buttons, *widget.NewButton("New protocol", func() {
|
||||||
|
PPF.NewProtocolFile()
|
||||||
}))
|
}))
|
||||||
buttons = append(buttons, *widget.NewButton("Edit protocol", func() {
|
buttons = append(buttons, *widget.NewButton("Edit protocol", func() {
|
||||||
|
pnod.representation.RemoveAll()
|
||||||
|
pnod.representation.Add(pnod.protocolChooser)
|
||||||
}))
|
}))
|
||||||
buttons = append(buttons, *widget.NewButton("New packet", func() {
|
buttons = append(buttons, *widget.NewButton("New packet", func() {
|
||||||
|
PPF.NewPacketFile()
|
||||||
}))
|
}))
|
||||||
buttons = append(buttons, *widget.NewButton("Edit packet", func() {
|
buttons = append(buttons, *widget.NewButton("Edit packet", func() {
|
||||||
|
pnod.representation.RemoveAll()
|
||||||
|
pnod.representation.Add(pnod.packetChooser)
|
||||||
}))
|
}))
|
||||||
selectgrid := container.NewGridWithColumns(2, nil)
|
selectgrid := container.NewGridWithColumns(2, nil)
|
||||||
for _, v := range buttons {
|
for _, v := range buttons {
|
||||||
|
@ -43,6 +45,12 @@ func CreateNewObjectDialog() *NewObjectDialog {
|
||||||
pnod.selection = container.NewMax(selectgrid)
|
pnod.selection = container.NewMax(selectgrid)
|
||||||
|
|
||||||
pnod.representation.Add(pnod.selection)
|
pnod.representation.Add(pnod.selection)
|
||||||
|
// precreate the choosers
|
||||||
|
/* protocol chooser
|
||||||
|
Accordeon for
|
||||||
|
- Improve existing protocols (Account required)
|
||||||
|
- Open saved protocols
|
||||||
|
*/
|
||||||
// data
|
// data
|
||||||
}
|
}
|
||||||
return pnod
|
return pnod
|
||||||
|
|
Loading…
Reference in New Issue