mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 21:54:59 +00:00
optimize<Preference>: show a dialog to confirm restart request
This commit is contained in:
parent
60584669f6
commit
0eae6f90af
3 changed files with 18 additions and 1 deletions
|
@ -121,7 +121,18 @@ namespace SourceGit.Views {
|
|||
useDarkTheme != general.UseDarkTheme ||
|
||||
checkUpdate != general.CheckForUpdate ||
|
||||
autoFetch != general.AutoFetchRemotes) {
|
||||
App.Restart();
|
||||
var result = MessageBox.Show(
|
||||
this,
|
||||
App.Text("Restart.Content"),
|
||||
App.Text("Restart.Title"),
|
||||
MessageBoxButton.OKCancel,
|
||||
MessageBoxImage.Question,
|
||||
MessageBoxResult.Cancel);
|
||||
if (result == MessageBoxResult.OK) {
|
||||
App.Restart();
|
||||
} else {
|
||||
Close();
|
||||
}
|
||||
} else {
|
||||
Close();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue