forked from j62/ctbrec
1
0
Fork 0

Add confirmation dialog for pause all and resume all

This commit is contained in:
0xb00bface 2020-08-19 11:42:50 +02:00
parent 67cbc0cadf
commit 17f1c3aec6
6 changed files with 15 additions and 6 deletions

View File

@ -1,5 +1,8 @@
3.8.7
========================
* Added support for Manyvids Live
* no login / favorites
* media player isn't working because of their authetication mechanism
* Fixed bug in recorder servlet. Actions for unpin and notes were mixed up
* Recordings now start immediately for newly added models

View File

@ -23,7 +23,7 @@ public class FollowAction extends ModelMassEditAction {
} catch(Exception e) {
LOG.error("Couldn't follow model {}", m, e);
Platform.runLater(() ->
Dialogs.showError("Couldn't follow model", "Following " + m.getName() + " failed: " + e.getMessage(), e));
Dialogs.showError(source.getScene(), "Couldn't follow model", "Following " + m.getName() + " failed: " + e.getMessage(), e));
}
};
}

View File

@ -17,7 +17,7 @@ public class PauseAction extends ModelMassEditAction {
recorder.suspendRecording(m);
} catch(Exception e) {
Platform.runLater(() ->
Dialogs.showError("Couldn't suspend recording of model", "Suspending recording of " + m.getName() + " failed", e));
Dialogs.showError(source.getScene(), "Couldn't suspend recording of model", "Suspending recording of " + m.getName() + " failed", e));
}
};
}

View File

@ -17,7 +17,7 @@ public class ResumeAction extends ModelMassEditAction {
recorder.resumeRecording(m);
} catch(Exception e) {
Platform.runLater(() ->
Dialogs.showError("Couldn't resume recording of model", "Resuming recording of " + m.getName() + " failed", e));
Dialogs.showError(source.getScene(), "Couldn't resume recording of model", "Resuming recording of " + m.getName() + " failed", e));
}
};
}

View File

@ -17,7 +17,7 @@ public class StartRecordingAction extends ModelMassEditAction {
recorder.startRecording(m);
} catch(Exception e) {
Platform.runLater(() ->
Dialogs.showError("Couldn't start recording", "Starting recording of " + m.getName() + " failed", e));
Dialogs.showError(source.getScene(), "Couldn't start recording", "Starting recording of " + m.getName() + " failed", e));
}
};
}

View File

@ -423,12 +423,18 @@ public class RecordedModelsTab extends Tab implements TabSelectionListener {
}
private void pauseAll(ActionEvent evt) {
boolean yes = Dialogs.showConfirmDialog("Pause all models", "", "Pause the recording of all models?", getTabPane().getScene());
if (yes) {
new PauseAction(getTabPane(), recorder.getModels(), recorder).execute();
}
}
private void resumeAll(ActionEvent evt) {
boolean yes = Dialogs.showConfirmDialog("Resume all models", "", "Resume the recording of all models?", getTabPane().getScene());
if (yes) {
new ResumeAction(getTabPane(), recorder.getModels(), recorder).execute();
}
}
void initializeUpdateService() {
updateService = createUpdateService();