Revive the right block of the program
Moved the right part of the program from the old version. Slightly reworked the structure.
This commit is contained in:
@@ -2,6 +2,7 @@ package application
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/internal/application/convertor"
|
||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/internal/application/setting"
|
||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/internal/ffmpeg"
|
||||
)
|
||||
@@ -11,6 +12,8 @@ type AppContract interface {
|
||||
GetSetting() setting.SettingContract
|
||||
GetProgressBarService() ProgressBarContract
|
||||
GetFFmpegService() ffmpeg.UtilitiesContract
|
||||
GetItemsToConvert() convertor.ItemsToConvertContract
|
||||
GetQueueService() convertor.QueueListContract
|
||||
Run()
|
||||
}
|
||||
|
||||
@@ -19,14 +22,25 @@ type application struct {
|
||||
setting setting.SettingContract
|
||||
progressBarService ProgressBarContract
|
||||
ffmpegService ffmpeg.UtilitiesContract
|
||||
itemsToConvert convertor.ItemsToConvertContract
|
||||
queueService convertor.QueueListContract
|
||||
}
|
||||
|
||||
func NewApp(fyneApp fyne.App, setting setting.SettingContract, progressBarService ProgressBarContract, ffmpegService ffmpeg.UtilitiesContract) AppContract {
|
||||
func NewApp(
|
||||
fyneApp fyne.App,
|
||||
setting setting.SettingContract,
|
||||
progressBarService ProgressBarContract,
|
||||
ffmpegService ffmpeg.UtilitiesContract,
|
||||
itemsToConvert convertor.ItemsToConvertContract,
|
||||
queueService convertor.QueueListContract,
|
||||
) AppContract {
|
||||
return &application{
|
||||
fyneApp: fyneApp,
|
||||
setting: setting,
|
||||
progressBarService: progressBarService,
|
||||
ffmpegService: ffmpegService,
|
||||
itemsToConvert: itemsToConvert,
|
||||
queueService: queueService,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +60,14 @@ func (a *application) GetFFmpegService() ffmpeg.UtilitiesContract {
|
||||
return a.ffmpegService
|
||||
}
|
||||
|
||||
func (a *application) GetItemsToConvert() convertor.ItemsToConvertContract {
|
||||
return a.itemsToConvert
|
||||
}
|
||||
|
||||
func (a *application) GetQueueService() convertor.QueueListContract {
|
||||
return a.queueService
|
||||
}
|
||||
|
||||
func (a *application) Run() {
|
||||
a.fyneApp.Run()
|
||||
}
|
||||
|
Reference in New Issue
Block a user