diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-27 20:26:49 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-27 20:26:49 +1000 |
commit | f861175f8316f38317467bb0cbaf8fdf5c1fcfa5 (patch) | |
tree | 887938027fd1988ffb1b1ab4d1e8eefd5635f811 /pkg/gui | |
parent | 25c60b185491f6690d42527a4844bc41a09266a7 (diff) |
move update quit confirmation function into updates file
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/gui.go | 8 | ||||
-rw-r--r-- | pkg/gui/updates.go | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 48b806ab6..ccc26841b 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -401,14 +401,6 @@ func (gui *Gui) RunWithSubprocesses() { } } -func (gui *Gui) createUpdateQuitConfirmation(g *gocui.Gui, v *gocui.View) error { - title := "Currently Updating" - message := "An update is in progress. Are you sure you want to quit?" - return gui.createConfirmationPanel(gui.g, v, title, message, func(g *gocui.Gui, v *gocui.View) error { - return gocui.ErrQuit - }, nil) -} - func (gui *Gui) quit(g *gocui.Gui, v *gocui.View) error { if gui.State.Updating { return gui.createUpdateQuitConfirmation(g, v) diff --git a/pkg/gui/updates.go b/pkg/gui/updates.go index 0065225fd..ff5a0afba 100644 --- a/pkg/gui/updates.go +++ b/pkg/gui/updates.go @@ -55,3 +55,11 @@ func (gui *Gui) onUpdateFinish(err error) error { } return nil } + +func (gui *Gui) createUpdateQuitConfirmation(g *gocui.Gui, v *gocui.View) error { + title := "Currently Updating" + message := "An update is in progress. Are you sure you want to quit?" + return gui.createConfirmationPanel(gui.g, v, title, message, func(g *gocui.Gui, v *gocui.View) error { + return gocui.ErrQuit + }, nil) +} |