Add layout system and file selection logic

Introduce a new layout system for managing main window content and tabs. Integrate file selection and drag-and-drop functionality for adding files to the conversion list, with automatic tab switching to "Added Files". Refactor existing components to support these features.
This commit is contained in:
2025-06-07 23:44:47 +05:00
parent 6e8b148c81
commit 394824ce88
7 changed files with 381 additions and 145 deletions

View File

@@ -1,9 +1,12 @@
package convertor
import "errors"
import (
"errors"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/internal/ffmpeg"
)
type Queue struct {
Setting *ConvertSetting
Setting *ffmpeg.ConvertSetting
Status StatusContract
Error error
}
@@ -46,7 +49,7 @@ type QueueListenerContract interface {
type QueueListContract interface {
AddListener(queueListener QueueListenerContract)
GetItems() map[int]*Queue
Add(setting *ConvertSetting)
Add(setting *ffmpeg.ConvertSetting)
EventChangeQueue(key int, queue *Queue)
Remove(key int)
GetItem(key int) (*Queue, error)
@@ -72,7 +75,7 @@ func (l *queueList) GetItems() map[int]*Queue {
return l.items
}
func (l *queueList) Add(setting *ConvertSetting) {
func (l *queueList) Add(setting *ffmpeg.ConvertSetting) {
queue := Queue{
Setting: setting,
Status: StatusType(Waiting),