Small fixes

This commit is contained in:
crschnick 2024-11-20 08:36:09 +00:00
parent 9f08b82e7d
commit 7c14e91749
8 changed files with 67 additions and 6 deletions

View file

@ -57,7 +57,7 @@ dependencies {
}
api 'org.apache.commons:commons-lang3:3.17.0'
api 'io.sentry:sentry:7.17.0'
api 'commons-io:commons-io:2.17.0'
api 'commons-io:commons-io:2.18.0'
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.18.1"
api group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "2.18.1"
api group: 'org.kordamp.ikonli', name: 'ikonli-material2-pack', version: "12.2.0"

View file

@ -40,6 +40,10 @@ public class AskpassExchangeImpl extends AskpassExchange {
}
private void focusTerminalIfNeeded(long pid) {
if (TerminalView.get() == null) {
return;
}
var found = TerminalView.get().findSession(pid);
if (found.isEmpty()) {
return;

View file

@ -135,8 +135,8 @@ public class BrowserFullSessionModel extends BrowserAbstractSessionModel<Browser
globalPinnedTab.setValue(tab);
var previousOthers = previousTabs.stream().filter(browserSessionTab -> browserSessionTab != tab).toList();
var prev = previousOthers.getLast();
if (prev != null) {
if (previousOthers.size() > 0) {
var prev = previousOthers.getLast();
getSelectedEntry().setValue(prev);
}
}

View file

@ -55,7 +55,9 @@ public class AppDesktopIntegration {
return;
}
AppLayoutModel.get().selectSettings();
if (AppLayoutModel.get() != null) {
AppLayoutModel.get().selectSettings();
}
});
// URL open operations have to be handled in a special way on macOS!

View file

@ -0,0 +1,54 @@
package io.xpipe.app.core.check;
import io.xpipe.app.comp.base.MarkdownComp;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.core.AppProperties;
import io.xpipe.app.core.AppStyle;
import io.xpipe.app.core.mode.OperationMode;
import io.xpipe.app.core.window.AppWindowHelper;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.resources.AppResources;
import io.xpipe.app.util.PlatformState;
import io.xpipe.app.util.WindowsRegistry;
import io.xpipe.core.process.OsType;
import javafx.geometry.Insets;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
import lombok.Getter;
import java.nio.file.Files;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
public class AppHomebrewCoreutilsCheck {
public static boolean getResult() {
var fc = new ProcessBuilder("which", "stat").redirectErrorStream(true);
try {
var proc = fc.start();
var out = new String(proc.getInputStream().readAllBytes());
proc.waitFor(1, TimeUnit.SECONDS);
var first = out.lines().findFirst();
return first.map(s -> s.contains("coreutils")).orElse(false);
} catch (Exception e) {
return false;
}
}
public static void check() {
if (!OsType.getLocal().equals(OsType.MACOS)) {
return;
}
if (!getResult()) {
ErrorEvent.fromMessage("You have the homebrew coreutils package installed and added to your PATH." +
" The coreutils commands overwrite and are incompatible to the native macOS commands, which XPipe expects." +
" Please remove the coreutils commands from your PATH prior to launching XPipe.")
.noDefaultActions()
.term()
.handle();
}
}
}

View file

@ -48,6 +48,7 @@ public class BaseMode extends OperationMode {
LicenseProvider.get().init();
AppCertutilCheck.check();
AppBundledToolsCheck.check();
AppHomebrewCoreutilsCheck.check();
AppAvCheck.check();
AppJavaOptionsCheck.check();
AppSid.init();

View file

@ -1,4 +1,4 @@
name=Commons IO
version=2.15.1
version=2.18.0
license=Apache License 2.0
link=https://commons.apache.org/proper/commons-io/

View file

@ -76,7 +76,7 @@ dependencies {
exclude group: 'org.openjfx', module: 'javafx-base'
exclude group: 'org.openjfx', module: 'javafx-controls'
}
compileOnly 'commons-io:commons-io:2.17.0'
compileOnly 'commons-io:commons-io:2.18.0'
compileOnly group: 'org.kordamp.ikonli', name: 'ikonli-javafx', version: "12.2.0"
if (project != project(':base')) {