示例#1
0
文件: cui.go 项目: cgravill/antha
//abortQuit goes back to the ActionListView if the quit message is rejected
func (c *CUI) abortQuit(g *gocui.Gui, v *gocui.View) error {
	if err := g.DeleteView("QuitWarnView"); err != nil {
		return err
	}
	if err := g.SetCurrentView("ActionListView"); err != nil {
		return err
	}
	return nil
}
示例#2
0
文件: cui.go 项目: cgravill/antha
//deleteView deletes ActionView + ActionViewTittle and gives focus to ActionListView
func (c *CUI) deleteView(g *gocui.Gui, v *gocui.View) error {
	if err := g.DeleteView("ActionView"); err != nil {
		return err
	}
	if err := g.DeleteView("ActionViewTitle"); err != nil {
		return err
	}
	if err := g.SetCurrentView("ActionListView"); err != nil {
		return err
	}
	if err := c.printGeneralHelp(g); err != nil {
		return err
	}
	return nil
}