Beispiel #1
0
//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
}
Beispiel #2
0
//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
}