From ebe1d9d61723813f5f64d241345523110a3b3fa6 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 21 Mar 2022 14:45:25 +0000 Subject: rescribe: disable & enable checkboxes alongside other parts when processing --- cmd/rescribe/gui.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cmd/rescribe') diff --git a/cmd/rescribe/gui.go b/cmd/rescribe/gui.go index 7c5a727..31005d9 100644 --- a/cmd/rescribe/gui.go +++ b/cmd/rescribe/gui.go @@ -363,7 +363,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess fmt.Printf("\nAbort\n") cancel() progressBar.SetValue(0.0) - for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} { + for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, wipe, bigpdf, trainingOpts, gobtn} { v.Enable() } abortbtn.Disable() @@ -442,7 +442,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess fmt.Fprintf(os.Stderr, msg) progressBar.SetValue(0.0) - for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} { + for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, wipe, bigpdf, trainingOpts, gobtn} { v.Enable() } abortbtn.Disable() @@ -451,7 +451,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess // Do this in a goroutine so the GUI remains responsive go func() { - for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} { + for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, wipe, bigpdf, trainingOpts, gobtn} { v.Disable() } @@ -477,7 +477,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess fmt.Fprintf(os.Stderr, msg) } progressBar.SetValue(0.0) - for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} { + for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, wipe, bigpdf, trainingOpts, gobtn} { v.Enable() } abortbtn.Disable() @@ -499,7 +499,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess } progressBar.SetValue(0.0) - for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} { + for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, wipe, bigpdf, trainingOpts, gobtn} { v.Enable() } abortbtn.Disable() @@ -514,7 +514,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess fmt.Fprintf(os.Stderr, msg) progressBar.SetValue(0.0) - for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} { + for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, wipe, bigpdf, trainingOpts, gobtn} { v.Enable() } abortbtn.Disable() @@ -543,7 +543,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess fmt.Fprintf(os.Stderr, msg) progressBar.SetValue(0.0) - for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} { + for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, wipe, bigpdf, trainingOpts, gobtn} { v.Enable() } abortbtn.Disable() @@ -552,7 +552,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess progressBar.SetValue(1.0) - for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} { + for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, wipe, bigpdf, trainingOpts, gobtn} { v.Enable() } abortbtn.Disable() -- cgit v1.2.1-24-ge1ad