Compare commits
11 Commits
cf2a0933b4
...
0.8.0
Author | SHA1 | Date | |
---|---|---|---|
a053ffbed6 | |||
3149ca25e1
|
|||
992762ef0a
|
|||
411e6c554a
|
|||
bf3340e526
|
|||
6be10dbd75
|
|||
16b32e0167
|
|||
2a7d860cbf
|
|||
40848a70a5 | |||
f17104595d | |||
24d80779ee |
9
FyneApp.toml
Normal file
9
FyneApp.toml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[Details]
|
||||||
|
Icon = "icon.png"
|
||||||
|
Name = "GUI for FFmpeg"
|
||||||
|
ID = "net.kor-elf.projects.gui-for-ffmpeg"
|
||||||
|
Version = "0.8.0"
|
||||||
|
Build = 4
|
||||||
|
|
||||||
|
[Migrations]
|
||||||
|
fyneDo = true
|
File diff suppressed because it is too large
Load Diff
@@ -11,8 +11,10 @@ import (
|
|||||||
encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel/encoder"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel/encoder"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/setting"
|
||||||
"github.com/nicksnyder/go-i18n/v2/i18n"
|
"github.com/nicksnyder/go-i18n/v2/i18n"
|
||||||
"image/color"
|
"image/color"
|
||||||
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -40,13 +42,13 @@ type HandleConvertSetting struct {
|
|||||||
Encoder encoder2.EncoderContract
|
Encoder encoder2.EncoderContract
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewConversion(app kernel.AppContract, formats encoder.ConvertorFormatsContract, runConvert func(setting HandleConvertSetting)) *Conversion {
|
func NewConversion(app kernel.AppContract, formats encoder.ConvertorFormatsContract, runConvert func(setting HandleConvertSetting), settingDirectoryForSaving setting.DirectoryForSavingContract) *Conversion {
|
||||||
conversionMessage := canvas.NewText("", color.RGBA{R: 255, G: 0, B: 0, A: 255})
|
conversionMessage := canvas.NewText("", color.RGBA{R: 255, G: 0, B: 0, A: 255})
|
||||||
conversionMessage.TextSize = 16
|
conversionMessage.TextSize = 16
|
||||||
conversionMessage.TextStyle = fyne.TextStyle{Bold: true}
|
conversionMessage.TextStyle = fyne.TextStyle{Bold: true}
|
||||||
|
|
||||||
fileForConversion := newFileForConversion(app)
|
fileForConversion := newFileForConversion(app)
|
||||||
directoryForSaving := newDirectoryForSaving(app)
|
directoryForSaving := newDirectoryForSaving(app, settingDirectoryForSaving)
|
||||||
overwriteOutputFiles := newOverwriteOutputFiles(app)
|
overwriteOutputFiles := newOverwriteOutputFiles(app)
|
||||||
selectEncoder := newSelectEncoder(app, formats)
|
selectEncoder := newSelectEncoder(app, formats)
|
||||||
|
|
||||||
@@ -194,6 +196,10 @@ func newFileForConversion(app kernel.AppContract) *fileForConversion {
|
|||||||
|
|
||||||
buttonTitle := app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
buttonTitle := app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
MessageID: "choose",
|
MessageID: "choose",
|
||||||
|
}) + "\n\r\n\r" + app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "or",
|
||||||
|
}) + "\n\r\n\r" + app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "dragAndDrop1File",
|
||||||
})
|
})
|
||||||
|
|
||||||
fileForConversion.message = canvas.NewText("", color.RGBA{R: 255, G: 0, B: 0, A: 255})
|
fileForConversion.message = canvas.NewText("", color.RGBA{R: 255, G: 0, B: 0, A: 255})
|
||||||
@@ -224,10 +230,54 @@ func newFileForConversion(app kernel.AppContract) *fileForConversion {
|
|||||||
fileForConversion.eventSelectFile(nil)
|
fileForConversion.eventSelectFile(nil)
|
||||||
|
|
||||||
listableURI := storage.NewFileURI(filepath.Dir(r.URI().Path()))
|
listableURI := storage.NewFileURI(filepath.Dir(r.URI().Path()))
|
||||||
locationURI, err = storage.ListerForURI(listableURI)
|
locationURI, _ = storage.ListerForURI(listableURI)
|
||||||
}, locationURI)
|
}, locationURI)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
app.GetWindow().SetOnDropped(func(position fyne.Position, uris []fyne.URI) {
|
||||||
|
if len(uris) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(uris) > 1 {
|
||||||
|
fileForConversion.message.Text = app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "errorDragAndDrop1File",
|
||||||
|
})
|
||||||
|
setStringErrorStyle(fileForConversion.message)
|
||||||
|
fileForConversion.eventSelectFile(errors.New(fileForConversion.message.Text))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
uri := uris[0]
|
||||||
|
info, err := os.Stat(uri.Path())
|
||||||
|
if err != nil {
|
||||||
|
fileForConversion.message.Text = err.Error()
|
||||||
|
setStringErrorStyle(fileForConversion.message)
|
||||||
|
fileForConversion.eventSelectFile(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if info.IsDir() {
|
||||||
|
fileForConversion.message.Text = app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "errorIsFolder",
|
||||||
|
})
|
||||||
|
setStringErrorStyle(fileForConversion.message)
|
||||||
|
fileForConversion.eventSelectFile(errors.New(fileForConversion.message.Text))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fileForConversion.file.Path = uri.Path()
|
||||||
|
fileForConversion.file.Name = uri.Name()
|
||||||
|
fileForConversion.file.Ext = uri.Extension()
|
||||||
|
|
||||||
|
fileForConversion.message.Text = uri.Path()
|
||||||
|
setStringSuccessStyle(fileForConversion.message)
|
||||||
|
|
||||||
|
fileForConversion.eventSelectFile(nil)
|
||||||
|
|
||||||
|
listableURI := storage.NewFileURI(filepath.Dir(uri.Path()))
|
||||||
|
locationURI, _ = storage.ListerForURI(listableURI)
|
||||||
|
})
|
||||||
|
|
||||||
return fileForConversion
|
return fileForConversion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,7 +297,7 @@ type directoryForSaving struct {
|
|||||||
path string
|
path string
|
||||||
}
|
}
|
||||||
|
|
||||||
func newDirectoryForSaving(app kernel.AppContract) *directoryForSaving {
|
func newDirectoryForSaving(app kernel.AppContract, settingDirectoryForSaving setting.DirectoryForSavingContract) *directoryForSaving {
|
||||||
directoryForSaving := &directoryForSaving{
|
directoryForSaving := &directoryForSaving{
|
||||||
path: "",
|
path: "",
|
||||||
}
|
}
|
||||||
@@ -262,6 +312,13 @@ func newDirectoryForSaving(app kernel.AppContract) *directoryForSaving {
|
|||||||
|
|
||||||
var locationURI fyne.ListableURI
|
var locationURI fyne.ListableURI
|
||||||
|
|
||||||
|
location, err := getDirectoryForSaving(settingDirectoryForSaving)
|
||||||
|
if err == nil {
|
||||||
|
directoryForSaving.path = location.Path()
|
||||||
|
directoryForSaving.message.Text = location.Path()
|
||||||
|
setStringSuccessStyle(directoryForSaving.message)
|
||||||
|
}
|
||||||
|
|
||||||
directoryForSaving.button = widget.NewButton(buttonTitle, func() {
|
directoryForSaving.button = widget.NewButton(buttonTitle, func() {
|
||||||
app.GetWindow().NewFolderOpen(func(r fyne.ListableURI, err error) {
|
app.GetWindow().NewFolderOpen(func(r fyne.ListableURI, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -277,7 +334,11 @@ func newDirectoryForSaving(app kernel.AppContract) *directoryForSaving {
|
|||||||
|
|
||||||
directoryForSaving.message.Text = r.Path()
|
directoryForSaving.message.Text = r.Path()
|
||||||
setStringSuccessStyle(directoryForSaving.message)
|
setStringSuccessStyle(directoryForSaving.message)
|
||||||
locationURI, _ = storage.ListerForURI(r)
|
locationURI, err = storage.ListerForURI(r)
|
||||||
|
|
||||||
|
if err == nil {
|
||||||
|
_, _ = settingDirectoryForSaving.SaveDirectoryForSaving(locationURI.Path())
|
||||||
|
}
|
||||||
|
|
||||||
}, locationURI)
|
}, locationURI)
|
||||||
})
|
})
|
||||||
@@ -285,6 +346,24 @@ func newDirectoryForSaving(app kernel.AppContract) *directoryForSaving {
|
|||||||
return directoryForSaving
|
return directoryForSaving
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getDirectoryForSaving(settingDirectoryForSaving setting.DirectoryForSavingContract) (fyne.ListableURI, error) {
|
||||||
|
path, err := settingDirectoryForSaving.GetDirectoryForSaving()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(path) > 0 {
|
||||||
|
path = "file://" + path
|
||||||
|
}
|
||||||
|
|
||||||
|
uri, err := storage.ParseURI(path)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return storage.ListerForURI(uri)
|
||||||
|
}
|
||||||
|
|
||||||
type overwriteOutputFiles struct {
|
type overwriteOutputFiles struct {
|
||||||
checkbox *widget.Check
|
checkbox *widget.Check
|
||||||
isChecked bool
|
isChecked bool
|
||||||
|
@@ -7,6 +7,7 @@ import (
|
|||||||
error2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/error"
|
error2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/error"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/setting"
|
||||||
"github.com/nicksnyder/go-i18n/v2/i18n"
|
"github.com/nicksnyder/go-i18n/v2/i18n"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@ type ConvertorHandler struct {
|
|||||||
convertorView convertor.ViewContract
|
convertorView convertor.ViewContract
|
||||||
errorView error2.ViewContract
|
errorView error2.ViewContract
|
||||||
convertorRepository convertor.RepositoryContract
|
convertorRepository convertor.RepositoryContract
|
||||||
|
settingDirectoryForSaving setting.DirectoryForSavingContract
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewConvertorHandler(
|
func NewConvertorHandler(
|
||||||
@@ -29,12 +31,14 @@ func NewConvertorHandler(
|
|||||||
convertorView convertor.ViewContract,
|
convertorView convertor.ViewContract,
|
||||||
errorView error2.ViewContract,
|
errorView error2.ViewContract,
|
||||||
convertorRepository convertor.RepositoryContract,
|
convertorRepository convertor.RepositoryContract,
|
||||||
|
settingDirectoryForSaving setting.DirectoryForSavingContract,
|
||||||
) *ConvertorHandler {
|
) *ConvertorHandler {
|
||||||
return &ConvertorHandler{
|
return &ConvertorHandler{
|
||||||
app: app,
|
app: app,
|
||||||
convertorView: convertorView,
|
convertorView: convertorView,
|
||||||
errorView: errorView,
|
errorView: errorView,
|
||||||
convertorRepository: convertorRepository,
|
convertorRepository: convertorRepository,
|
||||||
|
settingDirectoryForSaving: settingDirectoryForSaving,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +49,7 @@ func (h ConvertorHandler) MainConvertor() {
|
|||||||
h.errorView.PanicError(err)
|
h.errorView.PanicError(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
conversion := view.NewConversion(h.app, formats, h.runConvert)
|
conversion := view.NewConversion(h.app, formats, h.runConvert, h.settingDirectoryForSaving)
|
||||||
h.convertorView.Main(conversion)
|
h.convertorView.Main(conversion)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,7 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"archive/zip"
|
"archive/zip"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fyne.io/fyne/v2"
|
||||||
"fyne.io/fyne/v2/canvas"
|
"fyne.io/fyne/v2/canvas"
|
||||||
"fyne.io/fyne/v2/widget"
|
"fyne.io/fyne/v2/widget"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
||||||
|
@@ -86,9 +86,16 @@ func (h MenuHandler) getMenuHelp() *fyne.Menu {
|
|||||||
about.Label = text
|
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{
|
help := fyne.NewMenu(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
MessageID: "help",
|
MessageID: "help",
|
||||||
}), about)
|
}), about, gratitude)
|
||||||
h.app.GetLocalizerService().AddChangeCallback("help", func(text string) {
|
h.app.GetLocalizerService().AddChangeCallback("help", func(text string) {
|
||||||
help.Label = text
|
help.Label = text
|
||||||
help.Refresh()
|
help.Refresh()
|
||||||
@@ -114,6 +121,10 @@ func (h MenuHandler) openAbout() {
|
|||||||
h.menuView.About(ffmpeg, ffprobe)
|
h.menuView.About(ffmpeg, ffprobe)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (h MenuHandler) openGratitude() {
|
||||||
|
h.menuView.Gratitude()
|
||||||
|
}
|
||||||
|
|
||||||
func (h MenuHandler) LanguageSelection() {
|
func (h MenuHandler) LanguageSelection() {
|
||||||
h.localizerView.LanguageSelection(func(lang kernel.Lang) {
|
h.localizerView.LanguageSelection(func(lang kernel.Lang) {
|
||||||
_, _ = h.localizerRepository.Save(lang.Code)
|
_, _ = h.localizerRepository.Save(lang.Code)
|
||||||
|
@@ -12,6 +12,7 @@ type WindowContract interface {
|
|||||||
SetMainMenu(menu *fyne.MainMenu)
|
SetMainMenu(menu *fyne.MainMenu)
|
||||||
NewFileOpen(callback func(fyne.URIReadCloser, error), location fyne.ListableURI) *dialog.FileDialog
|
NewFileOpen(callback func(fyne.URIReadCloser, error), location fyne.ListableURI) *dialog.FileDialog
|
||||||
NewFolderOpen(callback func(fyne.ListableURI, error), location fyne.ListableURI) *dialog.FileDialog
|
NewFolderOpen(callback func(fyne.ListableURI, error), location fyne.ListableURI) *dialog.FileDialog
|
||||||
|
SetOnDropped(callback func(position fyne.Position, uris []fyne.URI))
|
||||||
ShowAndRun()
|
ShowAndRun()
|
||||||
GetLayout() LayoutContract
|
GetLayout() LayoutContract
|
||||||
}
|
}
|
||||||
@@ -80,3 +81,7 @@ func (w Window) ShowAndRun() {
|
|||||||
func (w Window) GetLayout() LayoutContract {
|
func (w Window) GetLayout() LayoutContract {
|
||||||
return w.layout
|
return w.layout
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (w Window) SetOnDropped(callback func(position fyne.Position, uris []fyne.URI)) {
|
||||||
|
w.windowFyne.SetOnDropped(callback)
|
||||||
|
}
|
||||||
|
@@ -62,6 +62,10 @@ other = "Will be downloaded from the site:"
|
|||||||
hash = "sha1-55f87f114628fa2d5d8e67d1e1cda22c0e4f9271"
|
hash = "sha1-55f87f114628fa2d5d8e67d1e1cda22c0e4f9271"
|
||||||
other = "Downloading..."
|
other = "Downloading..."
|
||||||
|
|
||||||
|
[dragAndDrop1File]
|
||||||
|
hash = "sha1-7259670822df1cc92ef5f06ed3c0e9407746975a"
|
||||||
|
other = "drag and drop 1 file"
|
||||||
|
|
||||||
[encoderGroupAudio]
|
[encoderGroupAudio]
|
||||||
hash = "sha1-24321cb5400df96be8f3e2131918bebdb3a01bba"
|
hash = "sha1-24321cb5400df96be8f3e2131918bebdb3a01bba"
|
||||||
other = "Audio"
|
other = "Audio"
|
||||||
@@ -218,6 +222,10 @@ other = "Couldn't convert video"
|
|||||||
hash = "sha1-531abc3f0d12727e542df6e5a22de91098380fc1"
|
hash = "sha1-531abc3f0d12727e542df6e5a22de91098380fc1"
|
||||||
other = "could not create file 'database' in folder 'data'"
|
other = "could not create file 'database' in folder 'data'"
|
||||||
|
|
||||||
|
[errorDragAndDrop1File]
|
||||||
|
hash = "sha1-a8edb5cbd622f3ce4ec07a2377e22ec5fad4491b"
|
||||||
|
other = "You can only drag and drop 1 file."
|
||||||
|
|
||||||
[errorFFmpeg]
|
[errorFFmpeg]
|
||||||
hash = "sha1-ccf0b95c0d1b392dc215258d917eb4e5d0b88ed0"
|
hash = "sha1-ccf0b95c0d1b392dc215258d917eb4e5d0b88ed0"
|
||||||
other = "this is not FFmpeg"
|
other = "this is not FFmpeg"
|
||||||
@@ -234,6 +242,10 @@ other = "this is not FFprobe"
|
|||||||
hash = "sha1-da7b37d7df3fafbd153665b13888413d52b24c17"
|
hash = "sha1-da7b37d7df3fafbd153665b13888413d52b24c17"
|
||||||
other = "Failed to determine FFprobe version"
|
other = "Failed to determine FFprobe version"
|
||||||
|
|
||||||
|
[errorIsFolder]
|
||||||
|
hash = "sha1-f937d090b6e320957514d850657cdf2f911dc6aa"
|
||||||
|
other = "You can only drag and drop a file"
|
||||||
|
|
||||||
[errorQueue]
|
[errorQueue]
|
||||||
hash = "sha1-72aecd9ad85642d84d62dbbf3cf70953c5f696c7"
|
hash = "sha1-72aecd9ad85642d84d62dbbf3cf70953c5f696c7"
|
||||||
other = "Error"
|
other = "Error"
|
||||||
@@ -270,6 +282,14 @@ other = "File:"
|
|||||||
hash = "sha1-7759891ba1ef9f7adc70defc7ac18fbf149c1a68"
|
hash = "sha1-7759891ba1ef9f7adc70defc7ac18fbf149c1a68"
|
||||||
other = "Preset"
|
other = "Preset"
|
||||||
|
|
||||||
|
[gratitude]
|
||||||
|
hash = "sha1-51968fc38e53a9a11c861126c62404674fd6096f"
|
||||||
|
other = "Gratitude"
|
||||||
|
|
||||||
|
[gratitudeText]
|
||||||
|
hash = "sha1-cb343e4d39ca31e6da6f72b9394cc915cb7d1258"
|
||||||
|
other = "I sincerely thank you for your invaluable\n\r and timely assistance:"
|
||||||
|
|
||||||
[help]
|
[help]
|
||||||
hash = "sha1-6a45cef900c668effcb2ab10da05855c1fd10f6f"
|
hash = "sha1-6a45cef900c668effcb2ab10da05855c1fd10f6f"
|
||||||
other = "Help"
|
other = "Help"
|
||||||
@@ -294,6 +314,10 @@ other = "License information"
|
|||||||
hash = "sha1-359fff328717c05104e51a2d29f05bf1875d26b7"
|
hash = "sha1-359fff328717c05104e51a2d29f05bf1875d26b7"
|
||||||
other = "Licenses from other products used in the program"
|
other = "Licenses from other products used in the program"
|
||||||
|
|
||||||
|
[or]
|
||||||
|
hash = "sha1-30bb0333ca1583110e4ced513b5d2455b86f529b"
|
||||||
|
other = "or"
|
||||||
|
|
||||||
[parameterCheckbox]
|
[parameterCheckbox]
|
||||||
hash = "sha1-9e35221d454870996fd51d576249cf47d1784a3c"
|
hash = "sha1-9e35221d454870996fd51d576249cf47d1784a3c"
|
||||||
other = "Enable option"
|
other = "Enable option"
|
||||||
|
@@ -62,6 +62,10 @@ other = "Сайттан жүктеледі:"
|
|||||||
hash = "sha1-55f87f114628fa2d5d8e67d1e1cda22c0e4f9271"
|
hash = "sha1-55f87f114628fa2d5d8e67d1e1cda22c0e4f9271"
|
||||||
other = "Жүктеп алынуда..."
|
other = "Жүктеп алынуда..."
|
||||||
|
|
||||||
|
[dragAndDrop1File]
|
||||||
|
hash = "sha1-7259670822df1cc92ef5f06ed3c0e9407746975a"
|
||||||
|
other = "1 файлды сүйреңіз"
|
||||||
|
|
||||||
[encoderGroupAudio]
|
[encoderGroupAudio]
|
||||||
hash = "sha1-24321cb5400df96be8f3e2131918bebdb3a01bba"
|
hash = "sha1-24321cb5400df96be8f3e2131918bebdb3a01bba"
|
||||||
other = "Аудио"
|
other = "Аудио"
|
||||||
@@ -218,6 +222,10 @@ other = "Бейнені түрлендіру мүмкін болмады"
|
|||||||
hash = "sha1-531abc3f0d12727e542df6e5a22de91098380fc1"
|
hash = "sha1-531abc3f0d12727e542df6e5a22de91098380fc1"
|
||||||
other = "'data' қалтасында 'database' файлын жасау мүмкін болмады"
|
other = "'data' қалтасында 'database' файлын жасау мүмкін болмады"
|
||||||
|
|
||||||
|
[errorDragAndDrop1File]
|
||||||
|
hash = "sha1-a8edb5cbd622f3ce4ec07a2377e22ec5fad4491b"
|
||||||
|
other = "Тек 1 файлды сүйреп апаруға болады"
|
||||||
|
|
||||||
[errorFFmpeg]
|
[errorFFmpeg]
|
||||||
hash = "sha1-ccf0b95c0d1b392dc215258d917eb4e5d0b88ed0"
|
hash = "sha1-ccf0b95c0d1b392dc215258d917eb4e5d0b88ed0"
|
||||||
other = "бұл FFmpeg емес"
|
other = "бұл FFmpeg емес"
|
||||||
@@ -234,6 +242,10 @@ other = "бұл FFprobe емес"
|
|||||||
hash = "sha1-da7b37d7df3fafbd153665b13888413d52b24c17"
|
hash = "sha1-da7b37d7df3fafbd153665b13888413d52b24c17"
|
||||||
other = "FFprobe нұсқасын анықтау мүмкін болмады"
|
other = "FFprobe нұсқасын анықтау мүмкін болмады"
|
||||||
|
|
||||||
|
[errorIsFolder]
|
||||||
|
hash = "sha1-f937d090b6e320957514d850657cdf2f911dc6aa"
|
||||||
|
other = "Тек файлды сүйреп апаруға болады"
|
||||||
|
|
||||||
[errorQueue]
|
[errorQueue]
|
||||||
hash = "sha1-72aecd9ad85642d84d62dbbf3cf70953c5f696c7"
|
hash = "sha1-72aecd9ad85642d84d62dbbf3cf70953c5f696c7"
|
||||||
other = "Қате"
|
other = "Қате"
|
||||||
@@ -270,6 +282,14 @@ other = "Файл:"
|
|||||||
hash = "sha1-7759891ba1ef9f7adc70defc7ac18fbf149c1a68"
|
hash = "sha1-7759891ba1ef9f7adc70defc7ac18fbf149c1a68"
|
||||||
other = "Алдын ала орнатылған"
|
other = "Алдын ала орнатылған"
|
||||||
|
|
||||||
|
[gratitude]
|
||||||
|
hash = "sha1-51968fc38e53a9a11c861126c62404674fd6096f"
|
||||||
|
other = "Алғыс"
|
||||||
|
|
||||||
|
[gratitudeText]
|
||||||
|
hash = "sha1-cb343e4d39ca31e6da6f72b9394cc915cb7d1258"
|
||||||
|
other = "Сізге баға жетпес және уақтылы көмектескеніңіз\n\r үшін шын жүректен алғыс айтамын:"
|
||||||
|
|
||||||
[help]
|
[help]
|
||||||
hash = "sha1-6a45cef900c668effcb2ab10da05855c1fd10f6f"
|
hash = "sha1-6a45cef900c668effcb2ab10da05855c1fd10f6f"
|
||||||
other = "Анықтама"
|
other = "Анықтама"
|
||||||
@@ -294,6 +314,10 @@ other = "Лицензия туралы ақпарат"
|
|||||||
hash = "sha1-359fff328717c05104e51a2d29f05bf1875d26b7"
|
hash = "sha1-359fff328717c05104e51a2d29f05bf1875d26b7"
|
||||||
other = "Бағдарламада пайдаланылатын басқа өнімдердің лицензиялары"
|
other = "Бағдарламада пайдаланылатын басқа өнімдердің лицензиялары"
|
||||||
|
|
||||||
|
[or]
|
||||||
|
hash = "sha1-30bb0333ca1583110e4ced513b5d2455b86f529b"
|
||||||
|
other = "немесе"
|
||||||
|
|
||||||
[parameterCheckbox]
|
[parameterCheckbox]
|
||||||
hash = "sha1-9e35221d454870996fd51d576249cf47d1784a3c"
|
hash = "sha1-9e35221d454870996fd51d576249cf47d1784a3c"
|
||||||
other = "Опцияны қосу"
|
other = "Опцияны қосу"
|
||||||
|
@@ -14,6 +14,7 @@ converterVideoFilesTitle = "Конвертер видео, аудио и кар
|
|||||||
download = "Скачать"
|
download = "Скачать"
|
||||||
downloadFFmpegFromSite = "Будет скачано с сайта:"
|
downloadFFmpegFromSite = "Будет скачано с сайта:"
|
||||||
downloadRun = "Скачивается..."
|
downloadRun = "Скачивается..."
|
||||||
|
dragAndDrop1File = "перетащить 1 файл"
|
||||||
encoderGroupAudio = "Аудио"
|
encoderGroupAudio = "Аудио"
|
||||||
encoderGroupImage = "Картинки"
|
encoderGroupImage = "Картинки"
|
||||||
encoderGroupVideo = "Видео"
|
encoderGroupVideo = "Видео"
|
||||||
@@ -53,10 +54,12 @@ encoder_xbm = "XBM (X BitMap) image"
|
|||||||
error = "Произошла ошибка!"
|
error = "Произошла ошибка!"
|
||||||
errorConverter = "не смогли отконвертировать видео"
|
errorConverter = "не смогли отконвертировать видео"
|
||||||
errorDatabase = "не смогли создать файл 'database' в папке 'data'"
|
errorDatabase = "не смогли создать файл 'database' в папке 'data'"
|
||||||
|
errorDragAndDrop1File = "Можно перетащить только 1 файл"
|
||||||
errorFFmpeg = "это не FFmpeg"
|
errorFFmpeg = "это не FFmpeg"
|
||||||
errorFFmpegVersion = "Не смогли определить версию FFmpeg"
|
errorFFmpegVersion = "Не смогли определить версию FFmpeg"
|
||||||
errorFFprobe = "это не FFprobe"
|
errorFFprobe = "это не FFprobe"
|
||||||
errorFFprobeVersion = "Не смогли определить версию FFprobe"
|
errorFFprobeVersion = "Не смогли определить версию FFprobe"
|
||||||
|
errorIsFolder = "Можно перетаскивать только файл"
|
||||||
errorQueue = "Ошибка"
|
errorQueue = "Ошибка"
|
||||||
errorSelectedEncoder = "Конвертер не выбран"
|
errorSelectedEncoder = "Конвертер не выбран"
|
||||||
errorSelectedFolderSave = "Папка для сохранения не выбрана!"
|
errorSelectedFolderSave = "Папка для сохранения не выбрана!"
|
||||||
@@ -66,12 +69,15 @@ ffmpegLGPL = "Это программное обеспечение исполь
|
|||||||
ffmpegTrademark = "**FFmpeg** — торговая марка **[Fabrice Bellard](http://bellard.org/)** , создателя проекта **[FFmpeg](https://ffmpeg.org/about.html)**."
|
ffmpegTrademark = "**FFmpeg** — торговая марка **[Fabrice Bellard](http://bellard.org/)** , создателя проекта **[FFmpeg](https://ffmpeg.org/about.html)**."
|
||||||
fileForConversionTitle = "Файл:"
|
fileForConversionTitle = "Файл:"
|
||||||
formPreset = "Предустановка"
|
formPreset = "Предустановка"
|
||||||
|
gratitude = "Благодарность"
|
||||||
|
gratitudeText = "Я искренне благодарю вас за неоценимую\n\rи своевременную помощь:"
|
||||||
help = "Справка"
|
help = "Справка"
|
||||||
inProgressQueue = "Выполняется"
|
inProgressQueue = "Выполняется"
|
||||||
languageSelectionFormHead = "Переключить язык"
|
languageSelectionFormHead = "Переключить язык"
|
||||||
languageSelectionHead = "Выберите язык"
|
languageSelectionHead = "Выберите язык"
|
||||||
licenseLink = "Сведения о лицензии"
|
licenseLink = "Сведения о лицензии"
|
||||||
licenseLinkOther = "Лицензии от других продуктов, которые используются в программе"
|
licenseLinkOther = "Лицензии от других продуктов, которые используются в программе"
|
||||||
|
or = "или"
|
||||||
parameterCheckbox = "Включить параметр"
|
parameterCheckbox = "Включить параметр"
|
||||||
pathToFfmpeg = "Путь к FFmpeg:"
|
pathToFfmpeg = "Путь к FFmpeg:"
|
||||||
pathToFfprobe = "Путь к FFprobe:"
|
pathToFfprobe = "Путь к FFprobe:"
|
||||||
|
4
main.go
4
main.go
@@ -73,6 +73,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
settingRepository := setting.NewRepository(db)
|
settingRepository := setting.NewRepository(db)
|
||||||
|
settingDirectoryForSaving := setting.NewSettingDirectoryForSaving(settingRepository)
|
||||||
|
|
||||||
convertorRepository := convertor.NewRepository(settingRepository)
|
convertorRepository := convertor.NewRepository(settingRepository)
|
||||||
pathFFmpeg, err := convertorRepository.GetPathFfmpeg()
|
pathFFmpeg, err := convertorRepository.GetPathFfmpeg()
|
||||||
if err != nil && errors.Is(err, dberror.ErrRecordNotFound) == false {
|
if err != nil && errors.Is(err, dberror.ErrRecordNotFound) == false {
|
||||||
@@ -95,7 +97,7 @@ func main() {
|
|||||||
|
|
||||||
localizerView := localizer.NewView(application)
|
localizerView := localizer.NewView(application)
|
||||||
convertorView := convertor.NewView(application)
|
convertorView := convertor.NewView(application)
|
||||||
convertorHandler := handler.NewConvertorHandler(application, convertorView, errorView, convertorRepository)
|
convertorHandler := handler.NewConvertorHandler(application, convertorView, errorView, convertorRepository, settingDirectoryForSaving)
|
||||||
|
|
||||||
localizerRepository := localizer.NewRepository(settingRepository)
|
localizerRepository := localizer.NewRepository(settingRepository)
|
||||||
menuView := menu.NewView(application)
|
menuView := menu.NewView(application)
|
||||||
|
202
menu/view.go
202
menu/view.go
@@ -13,6 +13,7 @@ import (
|
|||||||
|
|
||||||
type ViewContract interface {
|
type ViewContract interface {
|
||||||
About(ffmpegVersion string, ffprobeVersion string)
|
About(ffmpegVersion string, ffprobeVersion string)
|
||||||
|
Gratitude()
|
||||||
}
|
}
|
||||||
|
|
||||||
type View struct {
|
type View struct {
|
||||||
@@ -25,6 +26,40 @@ func NewView(app kernel.AppContract) *View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v View) Gratitude() {
|
||||||
|
view := v.app.GetAppFyne().NewWindow(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "gratitude",
|
||||||
|
}))
|
||||||
|
view.Resize(fyne.Size{Width: 500, Height: 400})
|
||||||
|
view.SetFixedSize(true)
|
||||||
|
|
||||||
|
image := canvas.NewImageFromFile("icon.png")
|
||||||
|
image.SetMinSize(fyne.Size{Width: 100, Height: 100})
|
||||||
|
image.FillMode = canvas.ImageFillContain
|
||||||
|
|
||||||
|
gratitude := canvas.NewText(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "gratitude",
|
||||||
|
}), colornames.Darkgreen)
|
||||||
|
gratitude.TextStyle = fyne.TextStyle{Bold: true}
|
||||||
|
gratitude.TextSize = 20
|
||||||
|
|
||||||
|
view.SetContent(
|
||||||
|
container.NewScroll(container.NewVBox(
|
||||||
|
container.NewBorder(nil, nil, container.NewVBox(image), nil, container.NewVBox(
|
||||||
|
gratitude,
|
||||||
|
widget.NewLabel(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "gratitudeText",
|
||||||
|
})),
|
||||||
|
widget.NewLabel("Екатерина"),
|
||||||
|
widget.NewLabel("Евгений"),
|
||||||
|
),
|
||||||
|
))),
|
||||||
|
)
|
||||||
|
|
||||||
|
view.CenterOnScreen()
|
||||||
|
view.Show()
|
||||||
|
}
|
||||||
|
|
||||||
func (v View) About(ffmpegVersion string, ffprobeVersion string) {
|
func (v View) About(ffmpegVersion string, ffprobeVersion string) {
|
||||||
view := v.app.GetAppFyne().NewWindow(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
view := v.app.GetAppFyne().NewWindow(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
MessageID: "about",
|
MessageID: "about",
|
||||||
@@ -294,6 +329,19 @@ func (v View) getOther() *fyne.Container {
|
|||||||
widget.NewLabel("Copyright (c) 2022, Fyne.io"),
|
widget.NewLabel("Copyright (c) 2022, Fyne.io"),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
|
container.NewHBox(widget.NewHyperlink("github.com/fyne-io/oksvg", &url.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: "github.com",
|
||||||
|
Path: "fyne-io/oksvg",
|
||||||
|
})),
|
||||||
|
container.NewHBox(widget.NewHyperlink("BSD 3-Clause License", &url.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: "github.com",
|
||||||
|
Path: "fyne-io/oksvg/blob/master/LICENSE",
|
||||||
|
})),
|
||||||
|
widget.NewLabel("Copyright (c) 2018, Steven R Wiley. All rights reserved."),
|
||||||
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/go-gl/gl", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/go-gl/gl", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
@@ -356,33 +404,44 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "godbus/dbus/blob/master/LICENSE",
|
Path: "godbus/dbus/blob/master/LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>), Google"),
|
widget.NewLabel("Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>), Google. All rights reserved."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/gopherjs/gopherjs", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/hack-pad/go-indexeddb", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "gopherjs/gopherjs",
|
Path: "hack-pad/go-indexeddb",
|
||||||
})),
|
})),
|
||||||
container.NewHBox(widget.NewHyperlink("BSD 2-Clause \"Simplified\" License", &url.URL{
|
container.NewHBox(widget.NewHyperlink("Apache License 2.0", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "gopherjs/gopherjs/blob/master/LICENSE",
|
Path: "hack-pad/go-indexeddb/blob/main/LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2013 Richard Musiol. All rights reserved."),
|
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/jinzhu/inflection", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/hack-pad/safejs", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "jinzhu/inflection",
|
Path: "hack-pad/safejs",
|
||||||
})),
|
})),
|
||||||
container.NewHBox(widget.NewHyperlink("The MIT License (MIT)", &url.URL{
|
container.NewHBox(widget.NewHyperlink("Apache License 2.0", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "jinzhu/inflection/blob/master/LICENSE",
|
Path: "hack-pad/safejs/blob/main/LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2015 - Jinzhu"),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
|
container.NewHBox(widget.NewHyperlink("github.com/jeandeaual/go-locale", &url.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: "github.com",
|
||||||
|
Path: "jeandeaual/go-locale",
|
||||||
|
})),
|
||||||
|
container.NewHBox(widget.NewHyperlink("MIT License", &url.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: "github.com",
|
||||||
|
Path: "jeandeaual/go-locale/blob/master/LICENSE",
|
||||||
|
})),
|
||||||
|
widget.NewLabel("Copyright (c) 2020 Alexis Jeandeau"),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/jsummers/gobmp", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/jsummers/gobmp", &url.URL{
|
||||||
@@ -398,17 +457,17 @@ func (v View) getOther() *fyne.Container {
|
|||||||
widget.NewLabel("Copyright (c) 2012-2015 Jason Summers"),
|
widget.NewLabel("Copyright (c) 2012-2015 Jason Summers"),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/mattn/go-sqlite3", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/nfnt/resize", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "mattn/go-sqlite3",
|
Path: "nfnt/resize",
|
||||||
})),
|
})),
|
||||||
container.NewHBox(widget.NewHyperlink("The MIT License (MIT)", &url.URL{
|
container.NewHBox(widget.NewHyperlink("ISC License", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "mattn/go-sqlite3/blob/master/LICENSE",
|
Path: "nfnt/resize/blob/master/LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2014 Yasuhiro Matsumoto"),
|
widget.NewLabel("Copyright (c) 2012, Jan Schlicht <jan.schlicht@gmail.com>"),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/nicksnyder/go-i18n/v2", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/nicksnyder/go-i18n/v2", &url.URL{
|
||||||
@@ -434,7 +493,19 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "pmezard/go-difflib/blob/master/LICENSE",
|
Path: "pmezard/go-difflib/blob/master/LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2013, Patrick Mezard"),
|
widget.NewLabel("Copyright (c) 2013, Patrick Mezard. All rights reserved."),
|
||||||
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
|
container.NewHBox(widget.NewHyperlink("github.com/rymdport/portal", &url.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: "github.com",
|
||||||
|
Path: "rymdport/portal",
|
||||||
|
})),
|
||||||
|
container.NewHBox(widget.NewHyperlink("Apache License 2.0", &url.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: "github.com",
|
||||||
|
Path: "rymdport/portal/blob/main/LICENSE",
|
||||||
|
})),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/srwiley/oksvg", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/srwiley/oksvg", &url.URL{
|
||||||
@@ -447,7 +518,7 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "srwiley/oksvg/blob/master/LICENSE",
|
Path: "srwiley/oksvg/blob/master/LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2018, Steven R Wiley"),
|
widget.NewLabel("Copyright (c) 2018, Steven R Wiley. All rights reserved."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/srwiley/rasterx", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/srwiley/rasterx", &url.URL{
|
||||||
@@ -460,7 +531,7 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "srwiley/rasterx/blob/master/LICENSE",
|
Path: "srwiley/rasterx/blob/master/LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2018, Steven R Wiley"),
|
widget.NewLabel("Copyright (c) 2018, Steven R Wiley. All rights reserved."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/stretchr/testify", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/stretchr/testify", &url.URL{
|
||||||
@@ -476,17 +547,17 @@ func (v View) getOther() *fyne.Container {
|
|||||||
widget.NewLabel("Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors."),
|
widget.NewLabel("Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/tevino/abool", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/ulikunitz/xz", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "tevino/abool",
|
Path: "ulikunitz/xz",
|
||||||
})),
|
})),
|
||||||
container.NewHBox(widget.NewHyperlink("The MIT License (MIT)", &url.URL{
|
container.NewHBox(widget.NewHyperlink("License", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "tevino/abool/blob/master/LICENSE",
|
Path: "ulikunitz/xz/blob/master/LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2016 Tevin Zhang"),
|
widget.NewLabel("Copyright (c) 2014-2022 Ulrich Kunitz. All rights reserved."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/yuin/goldmark", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/yuin/goldmark", &url.URL{
|
||||||
@@ -502,6 +573,19 @@ func (v View) getOther() *fyne.Container {
|
|||||||
widget.NewLabel("Copyright (c) 2019 Yusuke Inuzuka"),
|
widget.NewLabel("Copyright (c) 2019 Yusuke Inuzuka"),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
|
container.NewHBox(widget.NewHyperlink("go.etcd.io/bbolt", &url.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: "pkg.go.dev",
|
||||||
|
Path: "go.etcd.io/bbolt",
|
||||||
|
})),
|
||||||
|
container.NewHBox(widget.NewHyperlink("MIT License", &url.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: "github.com",
|
||||||
|
Path: "etcd-io/bbolt/blob/main/LICENSE",
|
||||||
|
})),
|
||||||
|
widget.NewLabel("Copyright (c) 2013 Ben Johnson"),
|
||||||
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("golang.org/x/image", &url.URL{
|
container.NewHBox(widget.NewHyperlink("golang.org/x/image", &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "pkg.go.dev",
|
Host: "pkg.go.dev",
|
||||||
@@ -512,20 +596,7 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "cs.opensource.google",
|
Host: "cs.opensource.google",
|
||||||
Path: "go/x/image/+/master:LICENSE",
|
Path: "go/x/image/+/master:LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2009 The Go Authors. All rights reserved."),
|
widget.NewLabel("Copyright 2009 The Go Authors."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("golang.org/x/mobile", &url.URL{
|
|
||||||
Scheme: "https",
|
|
||||||
Host: "pkg.go.dev",
|
|
||||||
Path: "golang.org/x/mobile",
|
|
||||||
})),
|
|
||||||
container.NewHBox(widget.NewHyperlink("License", &url.URL{
|
|
||||||
Scheme: "https",
|
|
||||||
Host: "cs.opensource.google",
|
|
||||||
Path: "go/x/mobile/+/master:LICENSE",
|
|
||||||
})),
|
|
||||||
widget.NewLabel("Copyright (c) 2009 The Go Authors. All rights reserved."),
|
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("golang.org/x/net", &url.URL{
|
container.NewHBox(widget.NewHyperlink("golang.org/x/net", &url.URL{
|
||||||
@@ -538,7 +609,7 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "cs.opensource.google",
|
Host: "cs.opensource.google",
|
||||||
Path: "go/x/net/+/master:LICENSE",
|
Path: "go/x/net/+/master:LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2009 The Go Authors. All rights reserved."),
|
widget.NewLabel("Copyright 2009 The Go Authors."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("golang.org/x/sys", &url.URL{
|
container.NewHBox(widget.NewHyperlink("golang.org/x/sys", &url.URL{
|
||||||
@@ -551,7 +622,7 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "cs.opensource.google",
|
Host: "cs.opensource.google",
|
||||||
Path: "go/x/sys/+/master:LICENSE",
|
Path: "go/x/sys/+/master:LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2009 The Go Authors. All rights reserved."),
|
widget.NewLabel("Copyright 2009 The Go Authors."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("golang.org/x/text", &url.URL{
|
container.NewHBox(widget.NewHyperlink("golang.org/x/text", &url.URL{
|
||||||
@@ -564,7 +635,7 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "cs.opensource.google",
|
Host: "cs.opensource.google",
|
||||||
Path: "go/x/text/+/master:LICENSE",
|
Path: "go/x/text/+/master:LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2009 The Go Authors. All rights reserved."),
|
widget.NewLabel("Copyright 2009 The Go Authors."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("gopkg.in/yaml.v3", &url.URL{
|
container.NewHBox(widget.NewHyperlink("gopkg.in/yaml.v3", &url.URL{
|
||||||
@@ -572,38 +643,14 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "go-yaml/yaml/tree/v3.0.1",
|
Path: "go-yaml/yaml/tree/v3.0.1",
|
||||||
})),
|
})),
|
||||||
container.NewHBox(widget.NewHyperlink("Licensed under the Apache License, Version 2.0", &url.URL{
|
container.NewHBox(widget.NewHyperlink("MIT License and Apache License 2.0", &url.URL{
|
||||||
Scheme: "http",
|
Scheme: "http",
|
||||||
Host: "www.apache.org",
|
|
||||||
Path: "licenses/LICENSE-2.0",
|
|
||||||
})),
|
|
||||||
widget.NewLabel("Copyright 2011-2016 Canonical Ltd."),
|
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("gorm.io/gorm", &url.URL{
|
|
||||||
Scheme: "https",
|
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "go-gorm/gorm",
|
Path: "go-yaml/yaml/blob/v3.0.1/LICENSE",
|
||||||
})),
|
})),
|
||||||
container.NewHBox(widget.NewHyperlink("The MIT License (MIT)", &url.URL{
|
widget.NewLabel("Copyright (c) 2006-2010 Kirill Simonov"),
|
||||||
Scheme: "https",
|
widget.NewLabel("Copyright (c) 2006-2011 Kirill Simonov"),
|
||||||
Host: "github.com",
|
widget.NewLabel("Copyright (c) 2011-2019 Canonical Ltd"),
|
||||||
Path: "go-gorm/gorm/blob/master/LICENSE",
|
|
||||||
})),
|
|
||||||
widget.NewLabel("Copyright (c) 2013-NOW Jinzhu <wosmvp@gmail.com>"),
|
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("honnef.co/go/js/dom", &url.URL{
|
|
||||||
Scheme: "https",
|
|
||||||
Host: "github.com",
|
|
||||||
Path: "dominikh/go-js-dom",
|
|
||||||
})),
|
|
||||||
container.NewHBox(widget.NewHyperlink("The MIT License (MIT)", &url.URL{
|
|
||||||
Scheme: "https",
|
|
||||||
Host: "github.com",
|
|
||||||
Path: "dominikh/go-js-dom/blob/master/LICENSE",
|
|
||||||
})),
|
|
||||||
widget.NewLabel("Copyright (c) 2014 Dominik Honnef"),
|
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/golang/go", &url.URL{
|
container.NewHBox(widget.NewHyperlink("github.com/golang/go", &url.URL{
|
||||||
@@ -616,20 +663,7 @@ func (v View) getOther() *fyne.Container {
|
|||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "golang/go/blob/master/LICENSE",
|
Path: "golang/go/blob/master/LICENSE",
|
||||||
})),
|
})),
|
||||||
widget.NewLabel("Copyright (c) 2009 The Go Authors. All rights reserved."),
|
widget.NewLabel("Copyright 2009 The Go Authors."),
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
|
||||||
|
|
||||||
container.NewHBox(widget.NewHyperlink("github.com/golang/go", &url.URL{
|
|
||||||
Scheme: "https",
|
|
||||||
Host: "github.com",
|
|
||||||
Path: "golang/go",
|
|
||||||
})),
|
|
||||||
container.NewHBox(widget.NewHyperlink("BSD 3-Clause \"New\" or \"Revised\" License", &url.URL{
|
|
||||||
Scheme: "https",
|
|
||||||
Host: "github.com",
|
|
||||||
Path: "golang/go/blob/master/LICENSE",
|
|
||||||
})),
|
|
||||||
widget.NewLabel("Copyright (c) 2009 The Go Authors. All rights reserved."),
|
|
||||||
canvas.NewLine(colornames.Darkgreen),
|
canvas.NewLine(colornames.Darkgreen),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
22
setting/directory_for_saving.go
Normal file
22
setting/directory_for_saving.go
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package setting
|
||||||
|
|
||||||
|
type DirectoryForSavingContract interface {
|
||||||
|
GetDirectoryForSaving() (string, error)
|
||||||
|
SaveDirectoryForSaving(path string) (Setting, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type DirectoryForSaving struct {
|
||||||
|
settingRepository RepositoryContract
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewSettingDirectoryForSaving(settingRepository RepositoryContract) *DirectoryForSaving {
|
||||||
|
return &DirectoryForSaving{settingRepository: settingRepository}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (setting DirectoryForSaving) GetDirectoryForSaving() (string, error) {
|
||||||
|
return setting.settingRepository.GetValue("directoryForSaving")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (setting DirectoryForSaving) SaveDirectoryForSaving(path string) (Setting, error) {
|
||||||
|
return setting.settingRepository.CreateOrUpdate("directoryForSaving", path)
|
||||||
|
}
|
Reference in New Issue
Block a user