mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-24 00:20:24 +00:00
Small fixes
This commit is contained in:
parent
9f08b82e7d
commit
7c14e91749
8 changed files with 67 additions and 6 deletions
|
@ -57,7 +57,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
api 'org.apache.commons:commons-lang3:3.17.0'
|
api 'org.apache.commons:commons-lang3:3.17.0'
|
||||||
api 'io.sentry:sentry:7.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.core', name: 'jackson-databind', version: "2.18.1"
|
||||||
api group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', 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"
|
api group: 'org.kordamp.ikonli', name: 'ikonli-material2-pack', version: "12.2.0"
|
||||||
|
|
|
@ -40,6 +40,10 @@ public class AskpassExchangeImpl extends AskpassExchange {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void focusTerminalIfNeeded(long pid) {
|
private void focusTerminalIfNeeded(long pid) {
|
||||||
|
if (TerminalView.get() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var found = TerminalView.get().findSession(pid);
|
var found = TerminalView.get().findSession(pid);
|
||||||
if (found.isEmpty()) {
|
if (found.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -135,8 +135,8 @@ public class BrowserFullSessionModel extends BrowserAbstractSessionModel<Browser
|
||||||
globalPinnedTab.setValue(tab);
|
globalPinnedTab.setValue(tab);
|
||||||
|
|
||||||
var previousOthers = previousTabs.stream().filter(browserSessionTab -> browserSessionTab != tab).toList();
|
var previousOthers = previousTabs.stream().filter(browserSessionTab -> browserSessionTab != tab).toList();
|
||||||
var prev = previousOthers.getLast();
|
if (previousOthers.size() > 0) {
|
||||||
if (prev != null) {
|
var prev = previousOthers.getLast();
|
||||||
getSelectedEntry().setValue(prev);
|
getSelectedEntry().setValue(prev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,9 @@ public class AppDesktopIntegration {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AppLayoutModel.get().selectSettings();
|
if (AppLayoutModel.get() != null) {
|
||||||
|
AppLayoutModel.get().selectSettings();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// URL open operations have to be handled in a special way on macOS!
|
// URL open operations have to be handled in a special way on macOS!
|
||||||
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -48,6 +48,7 @@ public class BaseMode extends OperationMode {
|
||||||
LicenseProvider.get().init();
|
LicenseProvider.get().init();
|
||||||
AppCertutilCheck.check();
|
AppCertutilCheck.check();
|
||||||
AppBundledToolsCheck.check();
|
AppBundledToolsCheck.check();
|
||||||
|
AppHomebrewCoreutilsCheck.check();
|
||||||
AppAvCheck.check();
|
AppAvCheck.check();
|
||||||
AppJavaOptionsCheck.check();
|
AppJavaOptionsCheck.check();
|
||||||
AppSid.init();
|
AppSid.init();
|
||||||
|
|
2
dist/licenses/commons-io.properties
vendored
2
dist/licenses/commons-io.properties
vendored
|
@ -1,4 +1,4 @@
|
||||||
name=Commons IO
|
name=Commons IO
|
||||||
version=2.15.1
|
version=2.18.0
|
||||||
license=Apache License 2.0
|
license=Apache License 2.0
|
||||||
link=https://commons.apache.org/proper/commons-io/
|
link=https://commons.apache.org/proper/commons-io/
|
|
@ -76,7 +76,7 @@ dependencies {
|
||||||
exclude group: 'org.openjfx', module: 'javafx-base'
|
exclude group: 'org.openjfx', module: 'javafx-base'
|
||||||
exclude group: 'org.openjfx', module: 'javafx-controls'
|
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"
|
compileOnly group: 'org.kordamp.ikonli', name: 'ikonli-javafx', version: "12.2.0"
|
||||||
|
|
||||||
if (project != project(':base')) {
|
if (project != project(':base')) {
|
||||||
|
|
Loading…
Reference in a new issue