forge/structs.go

77 lines
2.5 KiB
Go
Raw Normal View History

2025-02-01 11:57:52 -06:00
// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
// Use of this source code is governed by the GPL 3.0
package main
import (
2024-12-02 06:59:56 -06:00
"go.wit.com/dev/alexflint/arg"
"go.wit.com/gui"
"go.wit.com/lib/gadgets"
2024-12-02 06:59:56 -06:00
"go.wit.com/lib/protobuf/forgepb"
2024-12-04 15:35:48 -06:00
"go.wit.com/lib/protobuf/gitpb"
)
var me *mainType
func (b *mainType) Disable() {
2024-02-13 16:18:37 -06:00
b.mainbox.Disable()
}
func (b *mainType) Enable() {
2024-02-13 16:18:37 -06:00
b.mainbox.Enable()
}
// this app's variables
type mainType struct {
2024-12-05 12:29:47 -06:00
pp *arg.Parser // for parsing the command line args. Yay to alexf lint!
forge *forgepb.Forge // for holding the forge protobuf files
myGui *gui.Node // the gui toolkit handle
found *gitpb.Repos // stores the list of repos to process things on
foundPaths []string // stores gopaths to act on (when doing go-clone)
configSave bool // if the config file should be saved after finishing
2024-12-14 13:12:42 -06:00
urlbase string // base URL
2024-12-02 06:59:56 -06:00
// our view of the repositories
// patchWin *patchesWindow
2024-12-02 06:59:56 -06:00
mainWindow *gadgets.BasicWindow
2024-02-17 08:38:44 -06:00
2024-02-13 16:18:37 -06:00
// the main box. enable/disable this
mainbox *gui.Node
// the window from the /lib/gui/gowit package
2024-12-23 03:45:30 -06:00
// lw *gadgets.BasicWindow
// #### Sorting options for the repolist
2024-12-23 03:45:30 -06:00
// autoHidePerfect *gui.Node
// autoHideReadOnly *gui.Node
// checkbox for --dry-run
autoDryRun *gui.Node
2024-02-16 17:55:53 -06:00
// checkbox to enable intermittent scanning
// if checked, it will check all your repos for changes
autoScanReposCB *gui.Node
2025-03-02 03:03:29 -06:00
goSrcPwd *gadgets.OneLiner // what is being used as primary directory for your work
gitAuthor *gadgets.OneLiner // ENV GIT_AUTHOR NAME and EMAIL
2025-03-03 23:49:24 -06:00
forgeMode *gui.Node // is the user in 'master', 'devel' or 'user' branches
2024-12-29 21:36:39 -06:00
2024-02-16 17:55:53 -06:00
// these hold the branches that the user can switch all
// the repositories to them
2025-02-21 08:20:44 -06:00
newBranch *gui.Node // deprecate?
setBranchB *gui.Node // deprecate?
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
2025-02-22 04:46:45 -06:00
demoB *gui.Node // opens the demo
2025-03-02 04:13:10 -06:00
modeReleaseW *gui.Node // opens the release window
modePatchW *gui.Node // opens the patch window
modeUserW *gui.Node // opens the user/hack window
argvCheckoutUser bool // shared between the GUI and the command line tools
argvCheckoutDevel bool // shared between the GUI and the command line tools
argvCheckoutMaster bool // shared between the GUI and the command line tools
}