summaryrefslogtreecommitdiff
path: root/cgit-clone/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-27 14:22:41 -0500
committerJeff Carr <[email protected]>2025-09-27 16:33:47 -0500
commit61b648c04fc3f5afa760b8840583e1335cd76229 (patch)
tree6c47626a7aabf5a6c9cb5cc47714887f69cc7021 /cgit-clone/structs.go
parent7a6a5a2582f2926a1a9f806b113bc4a54d4a34f5 (diff)
Diffstat (limited to 'cgit-clone/structs.go')
-rw-r--r--cgit-clone/structs.go51
1 files changed, 51 insertions, 0 deletions
diff --git a/cgit-clone/structs.go b/cgit-clone/structs.go
new file mode 100644
index 0000000..15b17bc
--- /dev/null
+++ b/cgit-clone/structs.go
@@ -0,0 +1,51 @@
+// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
+// Use of this source code is governed by the GPL 3.0
+
+package main
+
+import (
+ "go.wit.com/gui"
+ "go.wit.com/lib/gadgets"
+ "go.wit.com/lib/gui/prep"
+ "go.wit.com/lib/protobuf/forgepb"
+)
+
+var me *mainType
+
+func (b *mainType) Disable() {
+ b.mainbox.Disable()
+}
+
+func (b *mainType) Enable() {
+ b.mainbox.Enable()
+}
+
+// returns the server to connect to
+func myServer() string {
+ return me.forge.GetForgeURL()
+}
+
+// this app's variables
+type mainType struct {
+ // pp *arg.Parser // for parsing the command line args. Yay to alexflint!
+ auto *prep.Auto // more experiments for bash handling
+ forge *forgepb.Forge // for holding the forge protobuf files
+ myGui *prep.GuiPrep // for initializing the GUI toolkits
+ foundPaths []string // stores gopaths to act on (when doing go-clone)
+ configSave bool // if the config file should be saved after finishing
+ urlbase string // base URL
+
+ mainWindow *gadgets.BasicWindow
+ mainbox *gui.Node // the main box. enable/disable this
+ autoDryRun *gui.Node // checkbox for --dry-run
+ goSrcPwd *gadgets.OneLiner // what is being used as primary directory for your work
+ goSrcEdit *gadgets.BasicEntry // what is being used as primary directory for your work
+ gitAuthor *gadgets.OneLiner // ENV GIT_AUTHOR NAME and EMAIL
+
+ // these hold the branches that the user can switch all the repositories to them
+ reposWinB *gui.Node // button that opens the repos window
+ repoAllB *gui.Node // "all" repos button
+ repoDirtyB *gui.Node // "dirty" repos button
+ repoDevelMergeB *gui.Node // "merge to devel" repos button
+ repoWritableB *gui.Node // "what repos are writable" repos button
+}