mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-03 11:20:34 +00:00
Fix concurrent modification possibility for validators
This commit is contained in:
@@ -11,6 +11,7 @@ import io.xpipe.app.prefs.PersonalizationCategory;
|
||||
import io.xpipe.app.prefs.TerminalCategory;
|
||||
import io.xpipe.app.util.DocumentationLink;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.scene.layout.Region;
|
||||
|
||||
public class AppConfigurationDialog {
|
||||
@@ -20,32 +21,35 @@ public class AppConfigurationDialog {
|
||||
return;
|
||||
}
|
||||
|
||||
var options = new OptionsBuilder()
|
||||
.sub(PersonalizationCategory.languageChoice())
|
||||
.sub(PersonalizationCategory.themeChoice())
|
||||
.sub(TerminalCategory.terminalChoice(false))
|
||||
.sub(EditorCategory.editorChoice())
|
||||
.sub(PasswordManagerCategory.passwordManagerChoice())
|
||||
.buildComp();
|
||||
options.style("initial-setup");
|
||||
options.style("prefs-container");
|
||||
// Enforce that everything is created on the platform thread to align with prefs comp
|
||||
Platform.runLater(() -> {
|
||||
var options = new OptionsBuilder()
|
||||
.sub(PersonalizationCategory.languageChoice())
|
||||
.sub(PersonalizationCategory.themeChoice())
|
||||
.sub(TerminalCategory.terminalChoice(false))
|
||||
.sub(EditorCategory.editorChoice())
|
||||
.sub(PasswordManagerCategory.passwordManagerChoice())
|
||||
.buildComp();
|
||||
options.style("initial-setup");
|
||||
options.style("prefs-container");
|
||||
|
||||
var scroll = new ScrollComp(options);
|
||||
scroll.apply(struc -> {
|
||||
struc.prefHeightProperty().bind(((Region) struc.getContent()).heightProperty());
|
||||
var scroll = new ScrollComp(options);
|
||||
scroll.apply(struc -> {
|
||||
struc.prefHeightProperty().bind(((Region) struc.getContent()).heightProperty());
|
||||
});
|
||||
scroll.minWidth(650);
|
||||
scroll.prefWidth(650);
|
||||
|
||||
var modal = ModalOverlay.of("initialSetup", scroll);
|
||||
modal.addButton(new ModalButton(
|
||||
"docs",
|
||||
() -> {
|
||||
DocumentationLink.INTRO.open();
|
||||
},
|
||||
false,
|
||||
false));
|
||||
modal.addButton(ModalButton.ok());
|
||||
AppDialog.show(modal);
|
||||
});
|
||||
scroll.minWidth(650);
|
||||
scroll.prefWidth(650);
|
||||
|
||||
var modal = ModalOverlay.of("initialSetup", scroll);
|
||||
modal.addButton(new ModalButton(
|
||||
"docs",
|
||||
() -> {
|
||||
DocumentationLink.INTRO.open();
|
||||
},
|
||||
false,
|
||||
false));
|
||||
modal.addButton(ModalButton.ok());
|
||||
AppDialog.show(modal);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user