summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doGui.go54
-rw-r--r--structs.go6
2 files changed, 25 insertions, 35 deletions
diff --git a/doGui.go b/doGui.go
index a42ef61..54e6d0e 100644
--- a/doGui.go
+++ b/doGui.go
@@ -185,7 +185,7 @@ func drawWindow(win *gadgets.GenericWindow) {
gridM := groupM.RawGrid()
var releaseWin *gadgets.GenericWindow
- me.modeReleaseW = gridM.NewButton("Release Window", func() {
+ gridM.NewButton("Release Window", func() {
log.Info("todo: move releaser here")
log.Info("for now, run guireleaser")
if releaseWin != nil {
@@ -194,24 +194,32 @@ func drawWindow(win *gadgets.GenericWindow) {
}
releaseWin = makeModeMasterWin()
})
- me.modeReleaseW.Disable()
- // the Devel / Patch mode window
- var patchWin *patchesWindow
- me.modePatchW = gridM.NewButton("Patch Window", func() {
- if patchWin != nil {
- patchWin.Toggle()
+ /*
+ // the Devel / Patch mode window
+ var patchWin *patchesWindow
+ gridM.NewButton("Patch Window", func() {
+ if patchWin != nil {
+ patchWin.Toggle()
+ return
+ }
+ patchWin = new(patchesWindow)
+ patchWin.initWindow()
+ patchWin.Show()
+ })
+ */
+ var patches *stdPatchsetTableWin
+ gridM.NewButton("Patch Window", func() {
+ if patches != nil {
+ patches.Toggle()
return
}
- patchWin = new(patchesWindow)
- patchWin.initWindow()
- patchWin.Show()
+ patches = makePatchsetsWin()
})
- me.modePatchW.Disable()
// the user mode "hack Window"
var hackWin *gadgets.GenericWindow
- me.modeUserW = gridM.NewButton("Hack Window", func() {
+ gridM.NewButton("Hack Window", func() {
if hackWin != nil {
hackWin.Toggle()
return
@@ -228,15 +236,6 @@ func drawWindow(win *gadgets.GenericWindow) {
reposWin = makeReposWin()
})
- var patches *stdPatchsetTableWin
- gridM.NewButton("New Patch Window", func() {
- if patches != nil {
- patches.Toggle()
- return
- }
- patches = makePatchsetsWin()
- })
-
// set the initial button state based on the last
// forge mode the user saved in the config file
switch me.forge.Config.Mode {
@@ -261,27 +260,19 @@ func forgeVerifyGuiState() {
me.argvCheckoutDevel = false
me.argvCheckoutMaster = false
- me.modeReleaseW.Disable()
- me.modePatchW.Disable()
- me.modeUserW.Disable()
-
switch me.forge.Config.Mode {
case forgepb.ForgeMode_MASTER:
me.argvCheckoutMaster = true
me.newBranch.SetText("master")
- me.modeReleaseW.Enable()
case forgepb.ForgeMode_DEVEL:
me.argvCheckoutDevel = true
me.newBranch.SetText("devel")
- me.modePatchW.Enable()
case forgepb.ForgeMode_USER:
me.newBranch.SetText(me.forge.Config.GetUsername())
me.argvCheckoutUser = true
- me.modeUserW.Enable()
default:
me.newBranch.SetText(me.forge.Config.GetUsername())
me.argvCheckoutUser = true
- me.modeUserW.Enable()
}
}
@@ -300,9 +291,9 @@ func forgeSwitchMode(newMode forgepb.ForgeMode) {
me.forge.Config.ConfigSave()
}
+/*
func doDisableUserW() {
me.argvCheckoutUser = false
- me.modeUserW.Disable()
var count int
all := me.forge.Repos.SortByFullPath()
@@ -317,11 +308,10 @@ func doDisableUserW() {
if count > 0 {
s := fmt.Sprintf("git delete %d user branches", count)
- me.modeUserW.SetLabel(s)
- me.modeUserW.Enable()
return
}
}
+*/
// this is the magic that generates a window directly from the protocol buffer
func makeStandardReposGrid(pb *gitpb.Repos) *gitpb.ReposTable {
diff --git a/structs.go b/structs.go
index f7a05d1..99d1915 100644
--- a/structs.go
+++ b/structs.go
@@ -67,9 +67,9 @@ type mainType struct {
repoDevelMergeB *gui.Node // "merge to devel" repos button
repoWritableB *gui.Node // "what repos are writable" repos button
demoB *gui.Node // opens the demo
- modeReleaseW *gui.Node // opens the release window
- modePatchW *gui.Node // opens the patch window
- modeUserW *gui.Node // opens the user/hack window
+ // 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