diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserFilterComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserFilterComp.java index 7706c210b..ed4725719 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserFilterComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserFilterComp.java @@ -106,8 +106,10 @@ public class BrowserFilterComp extends Comp { button.getStyleClass().add(Styles.FLAT); } }); - button.prefHeightProperty().bind(text.heightProperty()); - button.prefWidthProperty().bind(text.heightProperty()); + button.minHeightProperty().bind(text.heightProperty()); + button.minWidthProperty().bind(text.heightProperty()); + button.maxHeightProperty().bind(text.heightProperty()); + button.maxWidthProperty().bind(text.heightProperty()); return new Structure(box, (TextField) text, button); } diff --git a/app/src/main/java/io/xpipe/app/core/AppIntegration.java b/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java similarity index 93% rename from app/src/main/java/io/xpipe/app/core/AppIntegration.java rename to app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java index b39fa9668..c6900b53e 100644 --- a/app/src/main/java/io/xpipe/app/core/AppIntegration.java +++ b/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java @@ -13,7 +13,7 @@ import java.awt.*; import java.awt.desktop.*; import java.util.List; -public class AppIntegration { +public class AppDesktopIntegration { public static void setupDesktopIntegrations() { try { @@ -42,7 +42,7 @@ public class AppIntegration { // This will initialize the toolkit on macos and create the dock icon // macOS does not like applications that run fully in the background, so always do it - if (OsType.getLocal().equals(OsType.MACOS)) { + if (OsType.getLocal().equals(OsType.MACOS) && Desktop.isDesktopSupported()) { Desktop.getDesktop().setPreferencesHandler(e -> { AppLayoutModel.get().selectSettings(); }); @@ -65,7 +65,7 @@ public class AppIntegration { // Set dock icon explicitly on mac // This is necessary in case XPipe was started through a script as it will have no icon otherwise - if (AppProperties.get().isDeveloperMode() && AppLogs.get().isWriteToSysout()) { + if (AppProperties.get().isDeveloperMode() && AppLogs.get().isWriteToSysout() && Taskbar.isTaskbarSupported()) { try { var iconUrl = Main.class.getResourceAsStream("resources/img/logo/padded/logo_128x128.png"); if (iconUrl != null) { @@ -78,7 +78,7 @@ public class AppIntegration { } } - if (OsType.getLocal().equals(OsType.LINUX)) { + if (OsType.getLocal().equals(OsType.LINUX) && !GraphicsEnvironment.isHeadless()) { try { Toolkit xToolkit = Toolkit.getDefaultToolkit(); java.lang.reflect.Field awtAppClassNameField = diff --git a/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java b/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java index 5a81b2a7d..7614c0f4b 100644 --- a/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java +++ b/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java @@ -121,7 +121,7 @@ public abstract class OperationMode { setup(args); LauncherCommand.runLauncher(usedArgs); inStartup = false; - AppIntegration.setupDesktopIntegrations(); + AppDesktopIntegration.setupDesktopIntegrations(); } public static void switchToAsync(OperationMode newMode) { diff --git a/app/src/main/java/io/xpipe/app/util/PlatformState.java b/app/src/main/java/io/xpipe/app/util/PlatformState.java index bcb82e869..ba8a00bdd 100644 --- a/app/src/main/java/io/xpipe/app/util/PlatformState.java +++ b/app/src/main/java/io/xpipe/app/util/PlatformState.java @@ -76,14 +76,13 @@ public enum PlatformState { // Catch more than just the headless exception in case the graphics environment initialization completely // fails } catch (HeadlessException h) { - var msg = OsType.getLocal().equals(OsType.LINUX) - ? "No X11 DISPLAY variable was set or no headful library support was found." + "\n\n" + var msg = (OsType.getLocal().equals(OsType.LINUX) + ? "No X11 DISPLAY variable was set or no headful library support was found." : + "The application does not have desktop access, but this program performed an operation which requires it.")+ "\n\n" + "Please note that XPipe is a desktop application that should be run on your local workstation." + " It is able to provide the full functionality for all integrations via remote server connections, e.g. via SSH." + " You don't have to install XPipe on any system like a server, a WSL distribution, a hypervisor, etc.," - + " to have full access to that system, a shell connection to it is enough for XPipe to work from your local machine." - : h.getMessage(); - TrackEvent.warn(msg); + + " to have full access to that system, a shell connection to it is enough for XPipe to work from your local machine."; PlatformState.setCurrent(PlatformState.EXITED); return Optional.of(ErrorEvent.expected(new UnsupportedOperationException(msg))); } catch (Throwable t) { diff --git a/app/src/main/resources/io/xpipe/app/resources/style/browser.css b/app/src/main/resources/io/xpipe/app/resources/style/browser.css index 747e8c382..7ca615457 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/browser.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/browser.css @@ -69,7 +69,7 @@ -fx-padding: 9px 6px; } -.browser .top-bar > .button, .browser .browser-filter > .button { +.browser .top-bar > .button { -fx-background-insets: 0; -fx-background-color: transparent; } diff --git a/dist/changelogs/9.2_incremental.md b/dist/changelogs/9.2_incremental.md index c855118ef..b02abc3a0 100644 --- a/dist/changelogs/9.2_incremental.md +++ b/dist/changelogs/9.2_incremental.md @@ -14,10 +14,11 @@ - Fix file browser failing to connect if target system did not have id command available - Fix git share file button not jumping to correct settings menu -## Shortcut handling +## File browser improvements -The file browser has been reworked to support many new keyboard shortcuts and the general using experience has been improved when using a keyboard: +The file browser has been reworked to support many new keyboard shortcuts, plus the general user experience has been improved: +- There is now a duration estimate when transferring large files - Files that are right-clicked are now also included in the selection - The quick access menu will now shift focus properly - The file list can be navigated with the arrow keys. CTRL and SHIFT can be used to multiple select files