From 014bb0479ea5e6c6496cf34086f1d57e99cad21d Mon Sep 17 00:00:00 2001 From: crschnick Date: Sat, 25 Oct 2025 14:39:20 +0000 Subject: [PATCH] Various fixes --- .../java/io/xpipe/app/browser/file/BrowserOverviewComp.java | 4 ++++ .../io/xpipe/app/browser/menu/impl/CopyMenuProvider.java | 5 ----- .../io/xpipe/app/browser/menu/impl/PasteMenuProvider.java | 5 +++++ .../browser/menu/impl/compress/BaseUntarMenuProvider.java | 4 ++++ app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java | 4 ++-- app/src/main/java/io/xpipe/app/process/ShellTemp.java | 3 ++- app/src/main/java/io/xpipe/app/update/AppDownloads.java | 3 ++- dist/changelog/19.0.md | 2 +- 8 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserOverviewComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserOverviewComp.java index df0bdc671..558a87b84 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserOverviewComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserOverviewComp.java @@ -11,6 +11,7 @@ import io.xpipe.app.platform.DerivedObservableList; import io.xpipe.app.util.ThreadHelper; import javafx.application.Platform; +import javafx.beans.binding.Bindings; import javafx.collections.FXCollections; import javafx.scene.layout.Priority; import javafx.scene.layout.Region; @@ -40,6 +41,7 @@ public class BrowserOverviewComp extends SimpleComp { .getList(); var recentOverview = new BrowserFileOverviewComp(model, recent, true); var recentPane = new SimpleTitledPaneComp(AppI18n.observable("recent"), recentOverview, false); + recentPane.hide(Bindings.isEmpty(recent)); list.add(recentPane); var commonPlatform = FXCollections.synchronizedObservableList(FXCollections.observableArrayList()); @@ -64,6 +66,7 @@ public class BrowserOverviewComp extends SimpleComp { var commonOverview = new BrowserFileOverviewComp(model, commonPlatform, false); var commonPane = new SimpleTitledPaneComp(AppI18n.observable("common"), commonOverview, false) .apply(struc -> VBox.setVgrow(struc.get(), Priority.NEVER)); + commonPane.hide(Bindings.isEmpty(commonPlatform)); list.add(commonPane); var rootPlatform = FXCollections.synchronizedObservableList(FXCollections.observableArrayList()); @@ -77,6 +80,7 @@ public class BrowserOverviewComp extends SimpleComp { }); var rootsOverview = new BrowserFileOverviewComp(model, rootPlatform, false); var rootsPane = new SimpleTitledPaneComp(AppI18n.observable("roots"), rootsOverview, false); + rootsPane.hide(Bindings.isEmpty(rootPlatform)); list.add(rootsPane); var vbox = new VerticalComp(list).styleClass("overview"); diff --git a/app/src/main/java/io/xpipe/app/browser/menu/impl/CopyMenuProvider.java b/app/src/main/java/io/xpipe/app/browser/menu/impl/CopyMenuProvider.java index b5ce1ffa9..c356f63a9 100644 --- a/app/src/main/java/io/xpipe/app/browser/menu/impl/CopyMenuProvider.java +++ b/app/src/main/java/io/xpipe/app/browser/menu/impl/CopyMenuProvider.java @@ -41,9 +41,4 @@ public class CopyMenuProvider implements BrowserMenuLeafProvider { public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { return AppI18n.observable("copy"); } - - @Override - public boolean acceptsEmptySelection() { - return true; - } } diff --git a/app/src/main/java/io/xpipe/app/browser/menu/impl/PasteMenuProvider.java b/app/src/main/java/io/xpipe/app/browser/menu/impl/PasteMenuProvider.java index 05a0cbd04..b8ad48c64 100644 --- a/app/src/main/java/io/xpipe/app/browser/menu/impl/PasteMenuProvider.java +++ b/app/src/main/java/io/xpipe/app/browser/menu/impl/PasteMenuProvider.java @@ -51,6 +51,11 @@ public class PasteMenuProvider implements BrowserMenuLeafProvider { @Override public boolean isApplicable(BrowserFileSystemTabModel model, List entries) { + var clipboard = BrowserClipboard.retrieveCopy(); + if (clipboard == null) { + return false; + } + return (entries.size() == 1 && entries.stream() .allMatch(entry -> entry.getRawFileEntry().getKind() == FileKind.DIRECTORY)) diff --git a/app/src/main/java/io/xpipe/app/browser/menu/impl/compress/BaseUntarMenuProvider.java b/app/src/main/java/io/xpipe/app/browser/menu/impl/compress/BaseUntarMenuProvider.java index a5a7ab36f..4fe616439 100644 --- a/app/src/main/java/io/xpipe/app/browser/menu/impl/compress/BaseUntarMenuProvider.java +++ b/app/src/main/java/io/xpipe/app/browser/menu/impl/compress/BaseUntarMenuProvider.java @@ -49,6 +49,10 @@ public class BaseUntarMenuProvider implements BrowserApplicationPathMenuProvider @Override public boolean isApplicable(BrowserFileSystemTabModel model, List entries) { + if (model.getFileSystem().getShell().isEmpty()) { + return false; + } + if (gz) { return entries.stream() .allMatch(entry -> entry.getRawFileEntry() diff --git a/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java b/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java index d7e34d8ff..71e3c31ff 100644 --- a/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java +++ b/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java @@ -2,6 +2,7 @@ package io.xpipe.app.issue; import io.xpipe.app.core.AppLogs; import io.xpipe.app.core.AppProperties; +import io.xpipe.app.core.AppSystemInfo; import io.xpipe.app.core.mode.AppOperationMode; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.update.AppDistributionType; @@ -158,8 +159,7 @@ public class SentryErrorHandler implements ErrorHandler { if (Files.isDirectory(d)) { toUse = AttachmentHelper.compressZipfile( d, - FileUtils.getTempDirectory() - .toPath() + AppSystemInfo.ofCurrent().getTemp() .resolve(d.getFileName().toString() + ".zip")); } return new Attachment(toUse.toString()); diff --git a/app/src/main/java/io/xpipe/app/process/ShellTemp.java b/app/src/main/java/io/xpipe/app/process/ShellTemp.java index 14341fdd9..37b1efe89 100644 --- a/app/src/main/java/io/xpipe/app/process/ShellTemp.java +++ b/app/src/main/java/io/xpipe/app/process/ShellTemp.java @@ -1,6 +1,7 @@ package io.xpipe.app.process; import io.xpipe.app.core.AppProperties; +import io.xpipe.app.core.AppSystemInfo; import io.xpipe.app.issue.ErrorEventFactory; import io.xpipe.core.FilePath; import io.xpipe.core.OsType; @@ -15,7 +16,7 @@ import java.nio.file.attribute.PosixFilePermissions; public class ShellTemp { public static Path getLocalTempDataDirectory(String sub) { - var temp = FileUtils.getTempDirectory().toPath().resolve("xpipe"); + var temp = AppSystemInfo.ofCurrent().getTemp().resolve("xpipe"); // On Windows and macOS, we already have user specific temp directories // Even on macOS as root we will have a unique directory (in contrast to shell controls) if (OsType.ofLocal() == OsType.LINUX) { diff --git a/app/src/main/java/io/xpipe/app/update/AppDownloads.java b/app/src/main/java/io/xpipe/app/update/AppDownloads.java index 9ee2a7cfd..494cc837d 100644 --- a/app/src/main/java/io/xpipe/app/update/AppDownloads.java +++ b/app/src/main/java/io/xpipe/app/update/AppDownloads.java @@ -2,6 +2,7 @@ package io.xpipe.app.update; import io.xpipe.app.core.AppLayoutModel; import io.xpipe.app.core.AppProperties; +import io.xpipe.app.core.AppSystemInfo; import io.xpipe.app.issue.ErrorEventFactory; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; @@ -34,7 +35,7 @@ public class AppDownloads { throw new IOException(new String(response.body(), StandardCharsets.UTF_8)); } - var downloadFile = FileUtils.getTempDirectory().toPath().resolve(release.getFile()); + var downloadFile = AppSystemInfo.ofCurrent().getTemp().resolve(release.getFile()); // Fix file name to not be included in temp dir clean var fixedFile = Path.of(downloadFile.toString().replaceAll("-", "_")); Files.write(fixedFile, response.body()); diff --git a/dist/changelog/19.0.md b/dist/changelog/19.0.md index f4ca36a17..ab344a495 100644 --- a/dist/changelog/19.0.md +++ b/dist/changelog/19.0.md @@ -67,7 +67,6 @@ Lastly, it is now possible to easily give away free licenses. That way, bug repo - Fix misleading error messages when a file transfer was interrupted or permissions were missing - Fix bitwarden sync not refreshing xpipe cache for bitwarden passwords - Fix sudo auth failing on legacy systems where openssl did not support certain options -- Fix VNC scan adding localhost as a connection on macOS - Fix Remmina RDP integration not supporting user domain prefix - Fix Linux FreeRDP not using FreeRDP v3 by default - Fix identities being moved to initial category when being editing @@ -83,3 +82,4 @@ Lastly, it is now possible to easily give away free licenses. That way, bug repo - Fix super key not being handled in VNC client - Fix Proxmox VNC action not setting empty password - Fix opened as root browser tab not launching correct shell in terminal for fish +- Fix VNC scan adding localhost as a connection on macOS