Add renamer

This commit is contained in:
0xb00bface 2020-08-23 13:38:43 +02:00
parent 89fa681a59
commit 000ea174c2
2 changed files with 8 additions and 3 deletions

View File

@ -8,16 +8,19 @@ import java.util.Map;
import ctbrec.Config;
import ctbrec.recorder.postprocessing.PostProcessor;
import ctbrec.recorder.postprocessing.Remuxer;
import ctbrec.recorder.postprocessing.Renamer;
import ctbrec.ui.controls.Dialogs;
import ctbrec.ui.settings.api.Preferences;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.layout.Region;
public class PostProcessingDialogFactory {
static Map<Class<?>, Class<?>> ppToDialogMap = new HashMap<>();
static {
ppToDialogMap.put(Remuxer.class, RemuxerPaneFactory.class);
ppToDialogMap.put(Renamer.class, RenamerPaneFactory.class);
}
private PostProcessingDialogFactory() {
@ -35,7 +38,9 @@ public class PostProcessingDialogFactory {
boolean ok;
try {
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) {
preferences.save();
if (newEntry) {

View File

@ -7,7 +7,7 @@ import java.util.Optional;
import ctbrec.Config;
import ctbrec.recorder.postprocessing.PostProcessor;
import ctbrec.recorder.postprocessing.RecordingRenamer;
import ctbrec.recorder.postprocessing.Renamer;
import ctbrec.recorder.postprocessing.Remuxer;
import ctbrec.ui.controls.Dialogs;
import javafx.collections.FXCollections;
@ -27,7 +27,7 @@ public class PostProcessingStepPanel extends GridPane {
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;
ObservableList<PostProcessor> stepList;