summaryrefslogtreecommitdiff
path: root/doGui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-04 14:43:56 -0500
committerJeff Carr <[email protected]>2025-09-04 14:43:56 -0500
commit05f798dea3869e258dedb6860baf6941152c357f (patch)
treed803dabf325c55be3134aab04709b7fe4b8cde3c /doGui.go
parent5b3764c1b7fff781d9ec84f96ef5ce09aa887f85 (diff)
better instructions
Diffstat (limited to 'doGui.go')
-rw-r--r--doGui.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/doGui.go b/doGui.go
index 1bc8660..579903f 100644
--- a/doGui.go
+++ b/doGui.go
@@ -11,6 +11,7 @@ import (
"time"
"go.wit.com/gui"
+ "go.wit.com/lib/fhelp"
"go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/gitpb"
@@ -75,9 +76,20 @@ func doGui() {
me.myGui = gui.New()
me.myGui.InitEmbed(resources)
me.myGui.SetAppDefaultPlugin(me.forge.Config.DefaultGui) // sets the default GUI plugin to use
- me.myGui.Default()
+ if pname, err := me.myGui.Default(); err != nil {
+ if !fhelp.BuildPlugin("gocui") {
+ log.Info("You can't run the forge GUI since the plugins did not build", pname)
+ okExit("")
+ } else {
+ if err := me.myGui.LoadToolkitNew("gocui"); err != nil {
+ log.Info("The plugins built, but still failed to load", pname)
+ badExit(err)
+ }
+ log.Info("The plugins built and loaded!", pname)
+ }
+ }
- mainWindow := gadgets.NewGenericWindow("Forge: (this kinda works sometimes)", "Current Settings")
+ mainWindow := gadgets.NewGenericWindow("Forge: A federated git development tool by WIT.COM", "Current Settings")
mainWindow.Custom = func() {
log.Warn("MAIN WINDOW CLOSE")
now := time.Now()
@@ -87,7 +99,7 @@ func doGui() {
me.forge.ConfigSave()
}
log.Printf("rill repos.Reload() took (%s)\n", shell.FormatDuration(time.Since(now)))
- os.Exit(0)
+ okExit("")
}
drawWindow(mainWindow)