Show shutdown confirmation dialog only in standalone mode
This commit is contained in:
parent
7e2924d780
commit
8cfeb853a7
|
@ -254,18 +254,20 @@ public class CamrecApplication extends Application {
|
|||
|
||||
// check for active recordings
|
||||
boolean shutdownNow = false;
|
||||
if (config.getSettings().localRecording) {
|
||||
try {
|
||||
if (!recorder.getCurrentlyRecording().isEmpty()) {
|
||||
ButtonType result = Dialogs.showShutdownDialog(primaryStage.getScene());
|
||||
if(result == ButtonType.NO) {
|
||||
if (result == ButtonType.NO) {
|
||||
return;
|
||||
} else if(result == ButtonType.YES) {
|
||||
} else if (result == ButtonType.YES) {
|
||||
shutdownNow = true;
|
||||
}
|
||||
}
|
||||
} catch (InvalidKeyException | NoSuchAlgorithmException | IOException ex) {
|
||||
LOG.warn("Couldn't check, if recordings are running");
|
||||
}
|
||||
}
|
||||
|
||||
Alert shutdownInfo = new AutosizeAlert(Alert.AlertType.INFORMATION, primaryStage.getScene());
|
||||
shutdownInfo.setTitle("Shutdown");
|
||||
|
|
Loading…
Reference in New Issue