Various fixes

This commit is contained in:
crschnick
2025-10-25 14:39:20 +00:00
parent 6c5ad0f5dc
commit 014bb0479e
8 changed files with 20 additions and 10 deletions
@@ -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.<FileEntry>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.<FileEntry>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");
@@ -41,9 +41,4 @@ public class CopyMenuProvider implements BrowserMenuLeafProvider {
public ObservableValue<String> getName(BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
return AppI18n.observable("copy");
}
@Override
public boolean acceptsEmptySelection() {
return true;
}
}
@@ -51,6 +51,11 @@ public class PasteMenuProvider implements BrowserMenuLeafProvider {
@Override
public boolean isApplicable(BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
var clipboard = BrowserClipboard.retrieveCopy();
if (clipboard == null) {
return false;
}
return (entries.size() == 1
&& entries.stream()
.allMatch(entry -> entry.getRawFileEntry().getKind() == FileKind.DIRECTORY))
@@ -49,6 +49,10 @@ public class BaseUntarMenuProvider implements BrowserApplicationPathMenuProvider
@Override
public boolean isApplicable(BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
if (model.getFileSystem().getShell().isEmpty()) {
return false;
}
if (gz) {
return entries.stream()
.allMatch(entry -> entry.getRawFileEntry()
@@ -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());
@@ -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) {
@@ -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());
+1 -1
View File
@@ -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