mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-24 17:35:39 +00:00
Update 11.4_incremental.md
This commit is contained in:
@@ -22,6 +22,7 @@ import org.apache.commons.io.FileUtils;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -169,7 +170,7 @@ public class BrowserTransferModel {
|
||||
if (Files.isDirectory(file)) {
|
||||
FileUtils.moveDirectory(file.toFile(), target.toFile());
|
||||
} else {
|
||||
FileUtils.moveFile(file.toFile(), target.toFile());
|
||||
FileUtils.moveFile(file.toFile(), target.toFile(), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
DesktopHelper.browseFileInDirectory(downloads.resolve(files.getFirst().getFileName()));
|
||||
|
||||
@@ -502,7 +502,8 @@ public final class BrowserFileListComp extends SimpleComp {
|
||||
|
||||
updateHandler.run();
|
||||
fileList.getShown().addListener((observable, oldValue, newValue) -> {
|
||||
updateHandler.run();
|
||||
// Delay to prevent internal tableview exceptions when sorting
|
||||
Platform.runLater(updateHandler);
|
||||
});
|
||||
fileList.getFileSystemModel().getCurrentPath().addListener((observable, oldValue, newValue) -> {
|
||||
if (oldValue == null) {
|
||||
|
||||
@@ -254,6 +254,17 @@ public abstract class OperationMode {
|
||||
Runtime.getRuntime().halt(code);
|
||||
}
|
||||
|
||||
public static void onWindowClose() {
|
||||
if (AppPrefs.get() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
var action = AppPrefs.get().closeBehaviour().getValue();
|
||||
ThreadHelper.runAsync(() -> {
|
||||
action.run();
|
||||
});
|
||||
}
|
||||
|
||||
public static void shutdown(boolean inShutdownHook, boolean hasError) {
|
||||
// We can receive shutdown events while we are still starting up
|
||||
// In that case ignore them until we are finished
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.xpipe.app.core.AppCache;
|
||||
import io.xpipe.app.resources.AppImages;
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import io.xpipe.app.core.AppTheme;
|
||||
import io.xpipe.app.core.mode.OperationMode;
|
||||
import io.xpipe.app.fxcomps.Comp;
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
import io.xpipe.app.issue.TrackEvent;
|
||||
@@ -11,7 +12,6 @@ import io.xpipe.app.prefs.AppPrefs;
|
||||
import io.xpipe.app.prefs.CloseBehaviourAlert;
|
||||
import io.xpipe.app.util.ThreadHelper;
|
||||
import io.xpipe.core.process.OsType;
|
||||
|
||||
import javafx.beans.property.BooleanProperty;
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
import javafx.geometry.Rectangle2D;
|
||||
@@ -24,18 +24,17 @@ import javafx.scene.layout.Region;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Screen;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Value;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
public class AppMainWindow {
|
||||
|
||||
@@ -167,14 +166,14 @@ public class AppMainWindow {
|
||||
// Close other windows
|
||||
Stage.getWindows().stream().filter(w -> !w.equals(stage)).toList().forEach(w -> w.fireEvent(e));
|
||||
stage.close();
|
||||
AppPrefs.get().closeBehaviour().getValue().run();
|
||||
OperationMode.onWindowClose();
|
||||
e.consume();
|
||||
});
|
||||
|
||||
stage.addEventHandler(KeyEvent.KEY_PRESSED, event -> {
|
||||
if (new KeyCodeCombination(KeyCode.Q, KeyCombination.SHORTCUT_DOWN).match(event)) {
|
||||
stage.close();
|
||||
AppPrefs.get().closeBehaviour().getValue().run();
|
||||
OperationMode.onWindowClose();
|
||||
event.consume();
|
||||
}
|
||||
});
|
||||
@@ -277,7 +276,7 @@ public class AppMainWindow {
|
||||
if (OsType.getLocal().equals(OsType.LINUX) || OsType.getLocal().equals(OsType.MACOS)) {
|
||||
stage.getScene().addEventHandler(KeyEvent.KEY_PRESSED, event -> {
|
||||
if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(event)) {
|
||||
AppPrefs.get().closeBehaviour().getValue().run();
|
||||
OperationMode.onWindowClose();
|
||||
event.consume();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
package io.xpipe.app.core.window;
|
||||
|
||||
import com.sun.jna.NativeLong;
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
import io.xpipe.app.util.NativeBridge;
|
||||
import io.xpipe.app.util.ThreadHelper;
|
||||
import io.xpipe.core.util.ModuleHelper;
|
||||
|
||||
import javafx.stage.Window;
|
||||
|
||||
import com.sun.jna.NativeLong;
|
||||
import lombok.Getter;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
@@ -45,9 +42,6 @@ public class NativeMacOsWindowControl {
|
||||
|
||||
try {
|
||||
lib.get().setAppearance(new NativeLong(nsWindow), seamlessFrame, darkMode);
|
||||
if (seamlessFrame) {
|
||||
ThreadHelper.sleep(200);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
}
|
||||
|
||||
@@ -76,7 +76,13 @@ public interface ExternalEditorType extends PrefsChoiceValue {
|
||||
}
|
||||
};
|
||||
|
||||
LinuxPathType VSCODE_LINUX = new LinuxPathType("app.vscode", "code");
|
||||
LinuxPathType VSCODE_LINUX = new LinuxPathType("app.vscode", "code") {
|
||||
@Override
|
||||
public void launch(Path file) throws Exception {
|
||||
var builder = CommandBuilder.of().fixedEnvrironment("DONT_PROMPT_WSL_INSTALL", "No_Prompt_please").addFile(executable).addFile(file.toString());
|
||||
ExternalApplicationHelper.startAsync(builder);
|
||||
}
|
||||
};
|
||||
|
||||
LinuxPathType ZED_LINUX = new LinuxPathType("app.zed", "zed");
|
||||
|
||||
|
||||
@@ -1019,13 +1019,13 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
||||
AlacrittyTerminalType.ALACRITTY_LINUX,
|
||||
WezTerminalType.WEZTERM_LINUX,
|
||||
KittyTerminalType.KITTY_LINUX,
|
||||
KONSOLE,
|
||||
XFCE,
|
||||
ELEMENTARY,
|
||||
GNOME_TERMINAL,
|
||||
TILIX,
|
||||
TERMINATOR,
|
||||
TERMINOLOGY,
|
||||
XFCE,
|
||||
ELEMENTARY,
|
||||
KONSOLE,
|
||||
GNOME_TERMINAL,
|
||||
TILIX,
|
||||
GUAKE,
|
||||
TILDA,
|
||||
XTERM,
|
||||
|
||||
@@ -61,6 +61,10 @@ public class DataStoreFormatter {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (name.isEmpty()) {
|
||||
return name;
|
||||
}
|
||||
|
||||
return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.xpipe.app.util;
|
||||
|
||||
import io.xpipe.app.ext.ProcessControlProvider;
|
||||
import io.xpipe.core.process.ProcessOutputException;
|
||||
import io.xpipe.core.process.ShellControl;
|
||||
import io.xpipe.core.process.ShellDialects;
|
||||
|
||||
@@ -38,11 +39,15 @@ public class LocalShell {
|
||||
}
|
||||
|
||||
if (localPowershell == null) {
|
||||
localPowershell = ProcessControlProvider.get()
|
||||
.createLocalProcessControl(false)
|
||||
.subShell(ShellDialects.POWERSHELL)
|
||||
.withoutLicenseCheck()
|
||||
.start();
|
||||
try {
|
||||
localPowershell = ProcessControlProvider.get()
|
||||
.createLocalProcessControl(false)
|
||||
.subShell(ShellDialects.POWERSHELL)
|
||||
.withoutLicenseCheck()
|
||||
.start();
|
||||
} catch (ProcessOutputException ex) {
|
||||
throw ProcessOutputException.withPrefix("Failed to start local powershell process", ex);
|
||||
}
|
||||
}
|
||||
return localPowershell.start();
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -10,6 +10,7 @@
|
||||
- Fix application not starting up when PATH was corrupted on Windows
|
||||
- Fix shell environments running init script twice
|
||||
- Fix cmd shell environments not displaying a version
|
||||
- Fix window close freezing for a short time
|
||||
- Fix proxmox pvesh issue
|
||||
|
||||
## News
|
||||
|
||||
@@ -67,3 +67,4 @@ mobaXterm=MobaXterm
|
||||
termius=Termius
|
||||
devolutions=Devolutions
|
||||
tryPtb=XPipe Public Test Build
|
||||
zed=Zed
|
||||
|
||||
Reference in New Issue
Block a user