Add renamer
This commit is contained in:
parent
89fa681a59
commit
000ea174c2
|
@ -8,16 +8,19 @@ import java.util.Map;
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.recorder.postprocessing.PostProcessor;
|
import ctbrec.recorder.postprocessing.PostProcessor;
|
||||||
import ctbrec.recorder.postprocessing.Remuxer;
|
import ctbrec.recorder.postprocessing.Remuxer;
|
||||||
|
import ctbrec.recorder.postprocessing.Renamer;
|
||||||
import ctbrec.ui.controls.Dialogs;
|
import ctbrec.ui.controls.Dialogs;
|
||||||
import ctbrec.ui.settings.api.Preferences;
|
import ctbrec.ui.settings.api.Preferences;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.layout.Region;
|
||||||
|
|
||||||
public class PostProcessingDialogFactory {
|
public class PostProcessingDialogFactory {
|
||||||
|
|
||||||
static Map<Class<?>, Class<?>> ppToDialogMap = new HashMap<>();
|
static Map<Class<?>, Class<?>> ppToDialogMap = new HashMap<>();
|
||||||
static {
|
static {
|
||||||
ppToDialogMap.put(Remuxer.class, RemuxerPaneFactory.class);
|
ppToDialogMap.put(Remuxer.class, RemuxerPaneFactory.class);
|
||||||
|
ppToDialogMap.put(Renamer.class, RenamerPaneFactory.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
private PostProcessingDialogFactory() {
|
private PostProcessingDialogFactory() {
|
||||||
|
@ -35,7 +38,9 @@ public class PostProcessingDialogFactory {
|
||||||
boolean ok;
|
boolean ok;
|
||||||
try {
|
try {
|
||||||
Preferences preferences = createPreferences(pp);
|
Preferences preferences = createPreferences(pp);
|
||||||
ok = Dialogs.showCustomInput(scene, "Configure " + pp.getName(), preferences.getView(false));
|
Region view = preferences.getView(false);
|
||||||
|
view.setMinWidth(600);
|
||||||
|
ok = Dialogs.showCustomInput(scene, "Configure " + pp.getName(), view);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
preferences.save();
|
preferences.save();
|
||||||
if (newEntry) {
|
if (newEntry) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Optional;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.recorder.postprocessing.PostProcessor;
|
import ctbrec.recorder.postprocessing.PostProcessor;
|
||||||
import ctbrec.recorder.postprocessing.RecordingRenamer;
|
import ctbrec.recorder.postprocessing.Renamer;
|
||||||
import ctbrec.recorder.postprocessing.Remuxer;
|
import ctbrec.recorder.postprocessing.Remuxer;
|
||||||
import ctbrec.ui.controls.Dialogs;
|
import ctbrec.ui.controls.Dialogs;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
|
@ -27,7 +27,7 @@ public class PostProcessingStepPanel extends GridPane {
|
||||||
|
|
||||||
private Config config;
|
private Config config;
|
||||||
|
|
||||||
private static final Class<?>[] POST_PROCESSOR_CLASSES = new Class<?>[] { Remuxer.class, RecordingRenamer.class };
|
private static final Class<?>[] POST_PROCESSOR_CLASSES = new Class<?>[] { Remuxer.class, Renamer.class };
|
||||||
|
|
||||||
ListView<PostProcessor> stepListView;
|
ListView<PostProcessor> stepListView;
|
||||||
ObservableList<PostProcessor> stepList;
|
ObservableList<PostProcessor> stepList;
|
||||||
|
|
Loading…
Reference in New Issue