Compare commits
No commits in common. "846986279c1cdb75a793dd672fd8aa50deeca209" and "7cc22e1553f87e8198ba1473ff9a93cf41d0c339" have entirely different histories.
846986279c
...
7cc22e1553
@ -2,7 +2,6 @@ package convertor
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"ffmpegGui/helper"
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/container"
|
||||
@ -132,7 +131,6 @@ func (v View) getButtonFileVideoForConversion(form *widget.Form, progress *widge
|
||||
progress.Refresh()
|
||||
conversionMessage.Text = ""
|
||||
}, v.w)
|
||||
helper.FileDialogResize(fileDialog, v.w)
|
||||
fileDialog.Show()
|
||||
})
|
||||
|
||||
@ -164,7 +162,6 @@ func (v View) getButtonForSelectingDirectoryForSaving() (button *widget.Button,
|
||||
buttonMessage.Text = r.Path()
|
||||
setStringSuccessStyle(buttonMessage)
|
||||
}, v.w)
|
||||
helper.FileDialogResize(fileDialog, v.w)
|
||||
fileDialog.Show()
|
||||
})
|
||||
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"io"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
@ -68,7 +69,12 @@ func (h ConvertorHandler) checkingFFPathUtilities() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
pathsToFF := getPathsToFF()
|
||||
var pathsToFF []convertor.FFPathUtilities
|
||||
if runtime.GOOS == "windows" {
|
||||
pathsToFF = []convertor.FFPathUtilities{{"ffmpeg\\bin\\ffmpeg.exe", "ffmpeg\\bin\\ffprobe.exe"}}
|
||||
} else {
|
||||
pathsToFF = []convertor.FFPathUtilities{{"ffmpeg/bin/ffmpeg", "ffmpeg/bin/ffprobe"}, {"ffmpeg", "ffprobe"}}
|
||||
}
|
||||
for _, item := range pathsToFF {
|
||||
ffmpegChecking, _ := h.convertorService.ChangeFFmpegPath(item.FFmpeg)
|
||||
if ffmpegChecking == false {
|
||||
|
@ -1,10 +0,0 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package handler
|
||||
|
||||
import "ffmpegGui/convertor"
|
||||
|
||||
func getPathsToFF() []convertor.FFPathUtilities {
|
||||
return []convertor.FFPathUtilities{{"ffmpeg/bin/ffmpeg", "ffmpeg/bin/ffprobe"}, {"ffmpeg", "ffprobe"}}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package handler
|
||||
|
||||
func getPathsToFF() []convertor.FFPathUtilities {
|
||||
return []convertor.FFPathUtilities{{"ffmpeg\\bin\\ffmpeg.exe", "ffmpeg\\bin\\ffprobe.exe"}}
|
||||
}
|
@ -1,11 +1,10 @@
|
||||
package helper
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
)
|
||||
import "runtime"
|
||||
|
||||
func FileDialogResize(fileDialog *dialog.FileDialog, w fyne.Window) {
|
||||
contentSize := w.Content().Size()
|
||||
fileDialog.Resize(fyne.Size{Width: contentSize.Width - 50, Height: contentSize.Height - 50})
|
||||
func PathSeparator() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
return "\\"
|
||||
}
|
||||
return "/"
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package helper
|
||||
|
||||
func PathSeparator() string {
|
||||
return "/"
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package helper
|
||||
|
||||
func PathSeparator() string {
|
||||
return "\\"
|
||||
}
|
BIN
src/icon.png
BIN
src/icon.png
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
@ -19,10 +19,6 @@ import (
|
||||
|
||||
func main() {
|
||||
a := app.New()
|
||||
iconResource, err := fyne.LoadResourceFromPath("icon.png")
|
||||
if err == nil {
|
||||
a.SetIcon(iconResource)
|
||||
}
|
||||
w := a.NewWindow("GUI FFMpeg!")
|
||||
w.Resize(fyne.Size{Width: 800, Height: 600})
|
||||
w.CenterOnScreen()
|
||||
|
@ -1,7 +1,6 @@
|
||||
package setting
|
||||
|
||||
import (
|
||||
"ffmpegGui/helper"
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/container"
|
||||
@ -82,7 +81,6 @@ func (v View) getButtonSelectFile() (filePath *string, button *widget.Button, bu
|
||||
buttonMessage.Text = r.URI().Path()
|
||||
setStringSuccessStyle(buttonMessage)
|
||||
}, v.w)
|
||||
helper.FileDialogResize(fileDialog, v.w)
|
||||
fileDialog.Show()
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user