feat: embed license in executable and add menu item to show it

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-23 18:45:13 +03:00
parent 6f1db6b392
commit fb0fa4af92
10 changed files with 48 additions and 19 deletions

View File

@ -92,6 +92,7 @@ type (
Item MIDIDevice
*Model
}
ShowLicense Model
)
// Action methods
@ -123,6 +124,9 @@ func (a Action) Do() {
}
func (a Action) Enabled() bool {
if a.doer == nil {
return false // no doer, not allowed
}
if a.enabler == nil {
return true // no enabler, always allowed
}
@ -588,6 +592,9 @@ func (m *ExportFloat) Do() { m.dialog = ExportFloatExplorer }
func (m *Model) ExportInt16() Action { return MakeEnabledAction((*ExportInt16)(m)) }
func (m *ExportInt16) Do() { m.dialog = ExportInt16Explorer }
func (m *Model) ShowLicense() Action { return MakeEnabledAction((*ShowLicense)(m)) }
func (m *ShowLicense) Do() { m.dialog = License }
func (m *Model) SelectMidiInput(item MIDIDevice) Action {
return MakeEnabledAction(SelectMidiInput{Item: item, Model: m})
}