Add directory selection for saving converted files

Introduce logic and UI for selecting and persisting a directory to save converted files. Extend existing components with directory selection buttons, message updates, and storage preferences.
This commit is contained in:
2025-06-08 00:18:56 +05:00
parent 394824ce88
commit 6c0abac1c5
4 changed files with 123 additions and 4 deletions

View File

@@ -10,10 +10,16 @@ type SettingContract interface {
GetLanguages() []Lang
GetCurrentLangOrDefaultLang() (currentLang Lang, isDefault bool)
SetLang(language Lang) error
GetDirectoryForSaving() string
SetDirectoryForSaving(path string)
GetFFmpegPath() string
SetFFmpegPath(path string)
GetFFprobePath() string
SetFFprobePath(path string)
GetFFplayPath() string
SetFFplayPath(path string)
}
@@ -63,3 +69,11 @@ func (s *setting) SetLang(language Lang) error {
s.fyneApp.Preferences().SetString("language", language.Code)
return nil
}
func (s *setting) GetDirectoryForSaving() string {
return s.fyneApp.Preferences().String("directoryForSaving")
}
func (s *setting) SetDirectoryForSaving(path string) {
s.fyneApp.Preferences().SetString("directoryForSaving", path)
}