diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index 167e916b..3ceabf96 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -7,6 +7,7 @@ import com.dlsc.preferencesfx.formsfx.view.controls.ToggleControl; import com.dlsc.preferencesfx.model.Category; import com.dlsc.preferencesfx.model.Group; import com.dlsc.preferencesfx.model.Setting; +import com.dlsc.preferencesfx.util.VisibilityProperty; import io.xpipe.app.core.AppDistributionType; import io.xpipe.app.core.AppProperties; import io.xpipe.app.core.AppStyle; @@ -104,6 +105,9 @@ public class AppPrefs { ? ExternalStartupBehaviour.TRAY : ExternalStartupBehaviour.BACKGROUND), ExternalStartupBehaviour.class); + + + private final SingleSelectionField externalStartupBehaviourControl = Field.ofSingleSelectionType(externalStartupBehaviourList, externalStartupBehaviour) .render(() -> new TranslatableComboBoxControl<>()); @@ -395,7 +399,7 @@ public class AppPrefs { Group.of( "editor", Setting.of("defaultProgram", externalEditorControl, externalEditor), - Setting.of("customEditorCommand", customEditorCommandControl, customEditorCommand), + Setting.of("customEditorCommand", customEditorCommandControl, customEditorCommand).applyVisibility( VisibilityProperty.of(externalEditor.isEqualTo(ExternalEditorType.CUSTOM))), Setting.of( "editorReloadTimeout", editorReloadTimeout, diff --git a/core/src/main/java/io/xpipe/core/util/CoreJacksonModule.java b/core/src/main/java/io/xpipe/core/util/CoreJacksonModule.java index ced43f70..3a8af994 100644 --- a/core/src/main/java/io/xpipe/core/util/CoreJacksonModule.java +++ b/core/src/main/java/io/xpipe/core/util/CoreJacksonModule.java @@ -23,6 +23,7 @@ import io.xpipe.core.dialog.BusyElement; import io.xpipe.core.dialog.ChoiceElement; import io.xpipe.core.dialog.HeaderElement; import io.xpipe.core.impl.*; +import io.xpipe.core.process.ShellType; import io.xpipe.core.process.ShellTypes; import io.xpipe.core.source.DataSource; import io.xpipe.core.source.DataSourceReference; @@ -46,15 +47,16 @@ public class CoreJacksonModule extends SimpleModule { new NamedType(TupleType.class), new NamedType(ArrayType.class), new NamedType(WildcardType.class), - new NamedType(ShellTypes.Cmd.class), - new NamedType(ShellTypes.PowerShell.class), - new NamedType(ShellTypes.PosixBase.class), new NamedType(BaseQueryElement.class), new NamedType(ChoiceElement.class), new NamedType(BusyElement.class), new NamedType(HeaderElement.class) ); + for (ShellType t : ShellTypes.getAllShellTypes()) { + context.registerSubtypes(new NamedType(t.getClass())); + } + addSerializer(Charset.class, new CharsetSerializer()); addDeserializer(Charset.class, new CharsetDeserializer()); diff --git a/dist/changelogs/0.4.24.md b/dist/changelogs/0.4.24.md new file mode 100644 index 00000000..ff28e2b9 --- /dev/null +++ b/dist/changelogs/0.4.24.md @@ -0,0 +1 @@ +- Fix UI issues \ No newline at end of file diff --git a/extension/src/main/java/io/xpipe/extension/fxcomps/impl/IconButtonComp.java b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/IconButtonComp.java index 50d98cdd..72b13518 100644 --- a/extension/src/main/java/io/xpipe/extension/fxcomps/impl/IconButtonComp.java +++ b/extension/src/main/java/io/xpipe/extension/fxcomps/impl/IconButtonComp.java @@ -44,6 +44,7 @@ public class IconButtonComp extends Comp> { fi.iconColorProperty().bind(button.textFillProperty()); button.setGraphic(fi); button.setOnAction(e -> { + e.consume(); if (listener != null) { listener.run(); } diff --git a/version b/version index d39a225b..88959905 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.4.23 \ No newline at end of file +0.4.24 \ No newline at end of file