diff options
Diffstat (limited to 'addRepo.go')
| -rw-r--r-- | addRepo.go | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -64,7 +64,7 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str } newRepo := new(Repo) - newRepo.status = rstatus + newRepo.Status = rstatus path = strings.TrimSuffix(path, "/") // trim any extranous '/' chars put in the config file by the user if path == "" { @@ -81,31 +81,31 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str newRepo.vLabel = grid.NewLabel("").SetProgName("current") newRepo.endBox = grid.NewHorizontalBox("HBOX") newRepo.endBox.NewButton("Configure", func() { - if newRepo.status == nil { + if newRepo.Status == nil { log.Warn("status window wasn't created") return } - newRepo.status.Toggle() + newRepo.Status.Toggle() }) newRepo.endBox.NewButton("show diff", func() { r.reposbox.Disable() - // newRepo.status.XtermNohup([]string{"git diff"}) - newRepo.status.Xterm("git diff; bash") + // newRepo.Status.XtermNohup([]string{"git diff"}) + newRepo.Status.Xterm("git diff; bash") r.reposbox.Enable() }) newRepo.endBox.NewButton("commit all", func() { r.reposbox.Disable() // restore anything staged so everything can be reviewed - newRepo.status.RunCmd([]string{"git", "restore", "--staged", "."}) - newRepo.status.XtermWait("git diff") - newRepo.status.XtermWait("git add --all") - newRepo.status.XtermWait("git commit -a") - newRepo.status.XtermWait("git push") - if newRepo.status.CheckDirty() { + newRepo.Status.RunCmd([]string{"git", "restore", "--staged", "."}) + newRepo.Status.XtermWait("git diff") + newRepo.Status.XtermWait("git add --all") + newRepo.Status.XtermWait("git commit -a") + newRepo.Status.XtermWait("git push") + if newRepo.Status.CheckDirty() { // commit was not done, restore diff - newRepo.status.RunCmd([]string{"git", "restore", "--staged", "."}) + newRepo.Status.RunCmd([]string{"git", "restore", "--staged", "."}) } else { newRepo.NewScan() } @@ -113,23 +113,23 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str }) newRepo.hidden = false - // newRepo.status.SetMainWorkingName(master) - // newRepo.status.SetDevelWorkingName(devel) - // newRepo.status.SetUserWorkingName(user) + // newRepo.Status.SetMainWorkingName(master) + // newRepo.Status.SetDevelWorkingName(devel) + // newRepo.Status.SetUserWorkingName(user) var showBuildB bool = false - switch newRepo.status.RepoType() { + switch newRepo.Status.RepoType() { case "binary": // log.Info("compile here. Show()") showBuildB = true case "library": // log.Info("library here. Hide()") default: - // log.Info("unknown RepoType", newRepo.status.RepoType()) + // log.Info("unknown RepoType", newRepo.Status.RepoType()) } if showBuildB { newRepo.endBox.NewButton("build", func() { - newRepo.status.Build() + newRepo.Status.Build() }) } grid.NextRow() |
