Add gratitude view and menu item
Introduce a new "Gratitude" view with localized messages and display functionality.
This commit is contained in:
@@ -86,9 +86,16 @@ func (h MenuHandler) getMenuHelp() *fyne.Menu {
|
||||
about.Label = text
|
||||
})
|
||||
|
||||
gratitude := fyne.NewMenuItem(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||
MessageID: "gratitude",
|
||||
}), h.openGratitude)
|
||||
h.app.GetLocalizerService().AddChangeCallback("gratitude", func(text string) {
|
||||
gratitude.Label = text
|
||||
})
|
||||
|
||||
help := fyne.NewMenu(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||
MessageID: "help",
|
||||
}), about)
|
||||
}), about, gratitude)
|
||||
h.app.GetLocalizerService().AddChangeCallback("help", func(text string) {
|
||||
help.Label = text
|
||||
help.Refresh()
|
||||
@@ -114,6 +121,10 @@ func (h MenuHandler) openAbout() {
|
||||
h.menuView.About(ffmpeg, ffprobe)
|
||||
}
|
||||
|
||||
func (h MenuHandler) openGratitude() {
|
||||
h.menuView.Gratitude()
|
||||
}
|
||||
|
||||
func (h MenuHandler) LanguageSelection() {
|
||||
h.localizerView.LanguageSelection(func(lang kernel.Lang) {
|
||||
_, _ = h.localizerRepository.Save(lang.Code)
|
||||
|
Reference in New Issue
Block a user