Process buffering improvements [release]

This commit is contained in:
crschnick 2023-11-18 01:27:44 +00:00
parent 85f45fc526
commit 6b646dff02
5 changed files with 26 additions and 18 deletions

View file

@ -16,10 +16,6 @@ import java.util.List;
public class AboutComp extends Comp<CompStructure<?>> {
private Region createDepsList() {
return new ThirdPartyDependencyListComp().createRegion();
}
private Comp<?> createLinks() {
return new OptionsBuilder()
.addComp(

View file

@ -1,13 +1,12 @@
package io.xpipe.app.prefs;
import atlantafx.base.controls.Tile;
import io.xpipe.app.core.*;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.core.AppProperties;
import io.xpipe.app.fxcomps.Comp;
import io.xpipe.app.fxcomps.SimpleComp;
import io.xpipe.app.fxcomps.impl.LabelComp;
import io.xpipe.app.util.JfxHelper;
import io.xpipe.app.util.OptionsBuilder;
import javafx.scene.control.Label;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Region;
public class PropertiesComp extends SimpleComp {
@ -15,19 +14,13 @@ public class PropertiesComp extends SimpleComp {
@Override
protected Region createSimple() {
var title = Comp.of(() -> {
var image = new ImageView(AppImages.image("logo/logo_48x48.png"));
image.setPreserveRatio(true);
image.setSmooth(true);
image.setFitHeight(40);
var label = new Label(AppI18n.get("xPipeClient"), image);
label.getStyleClass().add("header");
AppFont.setSize(label, 5);
return new Tile(AppI18n.get("xPipeClient"), "Version " + AppProperties.get().getVersion() + " ("
+ AppProperties.get().getArch() + ")", image);
return JfxHelper.createNamedEntry(AppI18n.get("xPipeClient"), "Version " + AppProperties.get().getVersion() + " ("
+ AppProperties.get().getArch() + ")", "logo/logo_48x48.png");
});
var section = new OptionsBuilder()
.addComp(title, null)
.addComp(Comp.vspacer(10))
.name("build")
.addComp(
new LabelComp(AppProperties.get().getBuild()),

View file

@ -231,7 +231,7 @@
}
.browser .table-view:drag-into-current .table-row-cell {
-fx-opacity: 0.8;
-fx-opacity: 0.65;
}
.browser .table-row-cell:file:hover,.table-row-cell:folder:hover {

View file

@ -0,0 +1,15 @@
package io.xpipe.core.process;
import java.io.BufferedInputStream;
import java.io.InputStream;
public class BufferedProcessInputStream extends BufferedInputStream {
public BufferedProcessInputStream(InputStream in, int size) {
super(in, size);
}
public int bufferedAvailable() {
return count - pos;
}
}

View file

@ -21,6 +21,10 @@ public interface ShellControl extends ProcessControl {
ShellDialect getTargetTerminalShellDialect();
BufferedProcessInputStream getStdout();
BufferedProcessInputStream getStderr();
default boolean hasLocalSystemAccess() {
return getSystemId().equals(XPipeSystemId.getLocal());
}