mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Various fixes [stage]
This commit is contained in:
parent
c9a07dd061
commit
ae2a2d10eb
7 changed files with 42 additions and 14 deletions
|
@ -52,7 +52,7 @@ dependencies {
|
|||
api files("$rootDir/gradle/gradle_scripts/vernacular-1.16.jar")
|
||||
api 'org.bouncycastle:bcprov-jdk18on:1.78.1'
|
||||
api 'info.picocli:picocli:4.7.6'
|
||||
api ('org.kohsuke:github-api:1.323') {
|
||||
api ('org.kohsuke:github-api:1.324') {
|
||||
exclude group: 'org.apache.commons', module: 'commons-lang3'
|
||||
}
|
||||
api 'org.apache.commons:commons-lang3:3.16.0'
|
||||
|
|
|
@ -79,7 +79,7 @@ public class BrowserQuickAccessContextMenu extends ContextMenu {
|
|||
getItems().addAll(r.getItems());
|
||||
|
||||
// Prevent NPE in show()
|
||||
if (getScene() == null || anchor == null) {
|
||||
if (getScene() == null || anchor == null || anchor.getScene() == null) {
|
||||
return;
|
||||
}
|
||||
show(anchor, Side.RIGHT, 0, 0);
|
||||
|
|
|
@ -3,8 +3,11 @@ package io.xpipe.app.comp.base;
|
|||
import io.xpipe.app.fxcomps.Comp;
|
||||
import io.xpipe.app.fxcomps.SimpleComp;
|
||||
import io.xpipe.app.fxcomps.util.PlatformThread;
|
||||
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.MapChangeListener;
|
||||
import javafx.collections.ObservableMap;
|
||||
import javafx.scene.layout.Region;
|
||||
import javafx.scene.layout.StackPane;
|
||||
|
||||
|
@ -20,22 +23,49 @@ public class MultiContentComp extends SimpleComp {
|
|||
|
||||
@Override
|
||||
protected Region createSimple() {
|
||||
ObservableMap<Comp<?>, Region> m = FXCollections.observableHashMap();
|
||||
var stack = new StackPane();
|
||||
m.addListener((MapChangeListener<? super Comp<?>, Region>) change -> {
|
||||
if (change.wasAdded()) {
|
||||
stack.getChildren().add(change.getValueAdded());
|
||||
} else {
|
||||
stack.getChildren().remove(change.getValueRemoved());
|
||||
}
|
||||
});
|
||||
|
||||
for (Map.Entry<Comp<?>, ObservableValue<Boolean>> e : content.entrySet()) {
|
||||
var r = e.getKey().createRegion();
|
||||
e.getValue().subscribe(val -> {
|
||||
PlatformThread.runLaterIfNeeded(() -> {
|
||||
r.setManaged(val);
|
||||
r.setVisible(val);
|
||||
if (val && !stack.getChildren().contains(r)) {
|
||||
stack.getChildren().add(r);
|
||||
} else {
|
||||
stack.getChildren().remove(r);
|
||||
}
|
||||
});
|
||||
});
|
||||
m.put(e.getKey(), r);
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
// Lazy impl
|
||||
// @Override
|
||||
// protected Region createSimple() {
|
||||
// var stack = new StackPane();
|
||||
// for (Map.Entry<Comp<?>, ObservableValue<Boolean>> e : content.entrySet()) {
|
||||
// var r = e.getKey().createRegion();
|
||||
// e.getValue().subscribe(val -> {
|
||||
// PlatformThread.runLaterIfNeeded(() -> {
|
||||
// r.setManaged(val);
|
||||
// r.setVisible(val);
|
||||
// if (val && !stack.getChildren().contains(r)) {
|
||||
// stack.getChildren().add(r);
|
||||
// } else {
|
||||
// stack.getChildren().remove(r);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// return stack;
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class NativeMacOsWindowControl {
|
|||
try {
|
||||
lib.get().setAppearance(new NativeLong(nsWindow), seamlessFrame, darkMode);
|
||||
if (seamlessFrame) {
|
||||
ThreadHelper.sleep(100);
|
||||
ThreadHelper.sleep(250);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
|
|
|
@ -6,10 +6,7 @@ import io.xpipe.app.core.AppProperties;
|
|||
import io.xpipe.app.core.mode.OperationMode;
|
||||
import io.xpipe.app.core.window.AppWindowHelper;
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
import io.xpipe.app.util.DesktopHelper;
|
||||
import io.xpipe.app.util.DesktopShortcuts;
|
||||
import io.xpipe.app.util.OptionsBuilder;
|
||||
import io.xpipe.app.util.ThreadHelper;
|
||||
import io.xpipe.app.util.*;
|
||||
import io.xpipe.core.process.OsType;
|
||||
import io.xpipe.core.util.XPipeInstallation;
|
||||
|
||||
|
@ -24,6 +21,7 @@ import java.nio.file.Files;
|
|||
public class WorkspaceCreationAlert {
|
||||
|
||||
public static void showAsync() {
|
||||
LicenseProvider.get().getFeature("workspaces").throwIfUnsupported();
|
||||
ThreadHelper.runFailableAsync(() -> {
|
||||
show();
|
||||
});
|
||||
|
|
2
dist/licenses/github-api.properties
vendored
2
dist/licenses/github-api.properties
vendored
|
@ -1,4 +1,4 @@
|
|||
name=Java API for GitHub
|
||||
version=1.321
|
||||
version=1.324
|
||||
license=MIT License
|
||||
link=https://github.com/hub4j/github-api
|
2
version
2
version
|
@ -1 +1 @@
|
|||
11.0-14
|
||||
11.0-15
|
||||
|
|
Loading…
Reference in a new issue