Moved the menu to a new structure.

This commit is contained in:
2025-06-09 23:30:05 +05:00
parent e6db590937
commit 077d7a82a9
4 changed files with 87 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
package controller
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/lang"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/internal/gui/view"
)
@@ -34,3 +36,32 @@ func (c *controller) actionMainSettingsSave(setting *view.MainSettingForm) error
c.convertor()
return nil
}
func (c *controller) actionAbout() {
ffmpegVersion := c.app.GetFFmpegService().GetFFmpegVersion()
ffprobeVersion := c.app.GetFFmpegService().GetFFprobeVersion()
ffplayVersion := c.app.GetFFmpegService().GetFFplayVersion()
appVersion := c.app.FyneApp().Metadata().Version
window := c.app.FyneApp().NewWindow(lang.L("about"))
window.Resize(fyne.Size{Width: 793, Height: 550})
window.SetFixedSize(true)
content := view.About(appVersion, ffmpegVersion, ffprobeVersion, ffplayVersion)
window.SetContent(content)
window.CenterOnScreen()
window.Show()
}
func (c *controller) actionHelpFFplay() {
window := c.app.FyneApp().NewWindow(lang.L("helpFFplay"))
window.Resize(fyne.Size{Width: 800, Height: 550})
window.SetFixedSize(true)
content := view.HelpFFplay()
window.SetContent(content)
window.CenterOnScreen()
window.Show()
}