diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/config/app_config.go | 1 | ||||
-rw-r--r-- | pkg/gui/gui.go | 5 | ||||
-rw-r--r-- | pkg/i18n/dutch.go | 3 | ||||
-rw-r--r-- | pkg/i18n/english.go | 3 | ||||
-rw-r--r-- | pkg/i18n/polish.go | 3 |
5 files changed, 15 insertions, 0 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go index ae713a212..7cde63de1 100644 --- a/pkg/config/app_config.go +++ b/pkg/config/app_config.go @@ -228,6 +228,7 @@ update: method: prompt # can be: prompt | background | never days: 14 # how often a update is checked for reporting: 'undetermined' # one of: 'on' | 'off' | 'undetermined' +confirmOnQuit: false `) } diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index bb395f9d2..413e48202 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -411,5 +411,10 @@ func (gui *Gui) quit(g *gocui.Gui, v *gocui.View) error { if gui.State.Updating { return gui.createUpdateQuitConfirmation(g, v) } + if gui.Config.GetUserConfig().GetBool("confirmOnQuit") { + return gui.createConfirmationPanel(g, v, "", gui.Tr.SLocalize("ConfirmQuit"), func(g *gocui.Gui, v *gocui.View) error { + return gocui.ErrQuit + }, nil) + } return gocui.ErrQuit } diff --git a/pkg/i18n/dutch.go b/pkg/i18n/dutch.go index ff588b264..0ce156cd5 100644 --- a/pkg/i18n/dutch.go +++ b/pkg/i18n/dutch.go @@ -295,6 +295,9 @@ func addDutch(i18nObject *i18n.Bundle) error { }, &i18n.Message{ ID: "MergeAborted", Other: "Merge afgebroken", + }, &i18n.Message{ + ID: "ConfirmQuit", + Other: `Are you sure you want to quit?`, }, ) } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 1d9e8b41e..f9707ced6 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -342,6 +342,9 @@ func addEnglish(i18nObject *i18n.Bundle) error { }, &i18n.Message{ ID: "GitconfigParseErr", Other: `Gogit failed to parse your gitconfig file due to the presence of unquoted '\' characters. Removing these should fix the issue.`, + }, &i18n.Message{ + ID: "ConfirmQuit", + Other: `Are you sure you want to quit?`, }, ) } diff --git a/pkg/i18n/polish.go b/pkg/i18n/polish.go index 5364d3d8f..1de545274 100644 --- a/pkg/i18n/polish.go +++ b/pkg/i18n/polish.go @@ -287,6 +287,9 @@ func addPolish(i18nObject *i18n.Bundle) error { }, &i18n.Message{ ID: "MergeAborted", Other: "Scalanie anulowane", + }, &i18n.Message{ + ID: "ConfirmQuit", + Other: `Na pewno chcesz wyjść z programu?`, }, ) } |