mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-22 07:29:05 -04:00
Reformat
This commit is contained in:
@@ -29,7 +29,6 @@ import javafx.beans.property.*;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.scene.control.SelectionMode;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
|
||||
@@ -36,9 +36,13 @@ public class AppConfigurationDialog {
|
||||
scroll.prefWidth(650);
|
||||
|
||||
var modal = ModalOverlay.of("initialSetup", scroll);
|
||||
modal.addButton(new ModalButton("docs", () -> {
|
||||
DocumentationLink.INTRO.open();
|
||||
}, false, false));
|
||||
modal.addButton(new ModalButton(
|
||||
"docs",
|
||||
() -> {
|
||||
DocumentationLink.INTRO.open();
|
||||
},
|
||||
false,
|
||||
false));
|
||||
modal.addButton(ModalButton.ok());
|
||||
AppDialog.show(modal);
|
||||
}
|
||||
|
||||
@@ -3,12 +3,11 @@ package io.xpipe.app.core.check;
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import io.xpipe.app.issue.ErrorEventFactory;
|
||||
import io.xpipe.app.util.DocumentationLink;
|
||||
import io.xpipe.app.util.LocalShell;
|
||||
import io.xpipe.core.OsType;
|
||||
|
||||
public class AppWindowsArmCheck {
|
||||
|
||||
public static void check() throws Exception {
|
||||
public static void check() {
|
||||
if (OsType.getLocal() != OsType.WINDOWS) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package io.xpipe.app.ext;
|
||||
import io.xpipe.app.comp.Comp;
|
||||
import io.xpipe.app.hub.action.impl.ToggleActionProvider;
|
||||
import io.xpipe.app.hub.comp.*;
|
||||
import io.xpipe.app.storage.DataStoreEntry;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
|
||||
import javafx.beans.binding.Bindings;
|
||||
|
||||
@@ -71,13 +71,14 @@ public class TerminalCategory extends AppPrefsCategory {
|
||||
});
|
||||
|
||||
var visit = new ButtonComp(AppI18n.observable("website"), new FontIcon("mdi2w-web"), () -> {
|
||||
var t = prefs.terminalType().getValue();
|
||||
if (t == null || t.getWebsite() == null) {
|
||||
return;
|
||||
}
|
||||
var t = prefs.terminalType().getValue();
|
||||
if (t == null || t.getWebsite() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Hyperlinks.open(t.getWebsite());
|
||||
}).minWidth(Region.USE_PREF_SIZE);
|
||||
Hyperlinks.open(t.getWebsite());
|
||||
})
|
||||
.minWidth(Region.USE_PREF_SIZE);
|
||||
|
||||
var visitVisible = Bindings.createBooleanBinding(
|
||||
() -> {
|
||||
|
||||
@@ -3,9 +3,7 @@ package io.xpipe.app.terminal;
|
||||
import io.xpipe.app.core.AppCache;
|
||||
import io.xpipe.app.core.AppSystemInfo;
|
||||
import io.xpipe.app.issue.ErrorEventFactory;
|
||||
import io.xpipe.app.prefs.AppPrefs;
|
||||
import io.xpipe.app.process.CommandBuilder;
|
||||
import io.xpipe.app.update.AppDistributionType;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
||||
@@ -198,7 +198,8 @@ public class TerminalLauncher {
|
||||
.add("terminal-register", "--request", request.toString())
|
||||
.buildFull(LocalShell.getShell());
|
||||
var bellLine = "printf \"\\a\"";
|
||||
var printBell = OsType.getLocal() != OsType.WINDOWS && AppPrefs.get().enableTerminalStartupBell().get();
|
||||
var printBell = OsType.getLocal() != OsType.WINDOWS
|
||||
&& AppPrefs.get().enableTerminalStartupBell().get();
|
||||
var lines = ShellScript.lines(registerLine, printBell ? bellLine : null);
|
||||
return lines.toString();
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package io.xpipe.app.util;
|
||||
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.platform.win32.Advapi32;
|
||||
import com.sun.jna.win32.W32APIOptions;
|
||||
import io.xpipe.app.issue.ErrorEventFactory;
|
||||
import io.xpipe.app.process.CommandBuilder;
|
||||
import io.xpipe.app.process.ShellControl;
|
||||
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.platform.win32.Advapi32;
|
||||
import com.sun.jna.platform.win32.Advapi32Util;
|
||||
import com.sun.jna.platform.win32.WinReg;
|
||||
import com.sun.jna.win32.W32APIOptions;
|
||||
import lombok.Value;
|
||||
|
||||
import java.util.*;
|
||||
@@ -60,7 +60,7 @@ public abstract class WindowsRegistry {
|
||||
private static Boolean libraryLoaded;
|
||||
|
||||
private static boolean isLibrarySupported() {
|
||||
if (libraryLoaded != null) {
|
||||
if (libraryLoaded != null) {
|
||||
return libraryLoaded;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,10 @@ public abstract class WindowsRegistry {
|
||||
Native.load("Advapi32", Advapi32.class, W32APIOptions.DEFAULT_OPTIONS);
|
||||
return (libraryLoaded = true);
|
||||
} catch (Throwable t) {
|
||||
ErrorEventFactory.fromThrowable(t).description("Unable to load native library Advapi32.dll for registry queries." +
|
||||
" Registry queries will fail and some functionality will be unavailable").handle();
|
||||
ErrorEventFactory.fromThrowable(t)
|
||||
.description("Unable to load native library Advapi32.dll for registry queries."
|
||||
+ " Registry queries will fail and some functionality will be unavailable")
|
||||
.handle();
|
||||
return (libraryLoaded = false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user