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