mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Various small fixes
This commit is contained in:
parent
d940e99068
commit
f5e63fdf52
6 changed files with 31 additions and 3 deletions
|
@ -178,7 +178,7 @@ public class BrowserTransferModel {
|
|||
if (Files.isDirectory(file)) {
|
||||
FileUtils.moveDirectory(file.toFile(), target.toFile());
|
||||
} else {
|
||||
FileUtils.moveFile(file.toFile(), target.toFile(), StandardCopyOption.REPLACE_EXISTING);
|
||||
Files.move(file, target, StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
DesktopHelper.browseFileInDirectory(downloads.resolve(files.getFirst().getFileName()));
|
||||
|
|
|
@ -72,6 +72,11 @@ public class StoreIconChoiceDialogComp extends SimpleComp {
|
|||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Comp<?> pane(Comp<?> content) {
|
||||
return content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Comp<?> bottom() {
|
||||
var clear = new ButtonComp(AppI18n.observable("clear"), () -> {
|
||||
|
|
21
app/src/main/java/io/xpipe/app/core/check/AppGpuCheck.java
Normal file
21
app/src/main/java/io/xpipe/app/core/check/AppGpuCheck.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
package io.xpipe.app.core.check;
|
||||
|
||||
import io.xpipe.app.prefs.AppPrefs;
|
||||
import io.xpipe.app.util.PlatformState;
|
||||
import javafx.application.ConditionalFeature;
|
||||
import javafx.application.Platform;
|
||||
|
||||
public class AppGpuCheck {
|
||||
|
||||
public static void check() {
|
||||
if (PlatformState.getCurrent() != PlatformState.RUNNING) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Platform.isSupported(ConditionalFeature.SCENE3D)) {
|
||||
return;
|
||||
}
|
||||
|
||||
AppPrefs.get().performanceMode.setValue(true);
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package io.xpipe.app.core.mode;
|
|||
import io.xpipe.app.comp.store.StoreViewState;
|
||||
import io.xpipe.app.core.*;
|
||||
import io.xpipe.app.core.check.AppFontLoadingCheck;
|
||||
import io.xpipe.app.core.check.AppGpuCheck;
|
||||
import io.xpipe.app.issue.TrackEvent;
|
||||
import io.xpipe.app.prefs.AppPrefs;
|
||||
import io.xpipe.app.resources.AppImages;
|
||||
|
@ -33,6 +34,7 @@ public abstract class PlatformMode extends OperationMode {
|
|||
var imageThread = ThreadHelper.runFailableAsync(() -> {
|
||||
AppImages.init();
|
||||
});
|
||||
AppGpuCheck.check();
|
||||
AppFont.init();
|
||||
AppTheme.init();
|
||||
AppStyle.init();
|
||||
|
|
|
@ -42,7 +42,7 @@ public class AppPrefs {
|
|||
mapVaultSpecific(new SimpleBooleanProperty(false), "dontAutomaticallyStartVmSshServer", Boolean.class);
|
||||
final BooleanProperty dontAcceptNewHostKeys =
|
||||
mapVaultSpecific(new SimpleBooleanProperty(false), "dontAcceptNewHostKeys", Boolean.class);
|
||||
final BooleanProperty performanceMode = map(
|
||||
public final BooleanProperty performanceMode = map(
|
||||
new SimpleBooleanProperty(),
|
||||
"performanceMode",
|
||||
Boolean.class);
|
||||
|
|
|
@ -88,7 +88,7 @@ public interface ExternalPasswordManager extends PrefsChoiceValue {
|
|||
Marshal.Copy(credMem.credentialBlob, passwordBytes, 0, credMem.credentialBlobSize);
|
||||
return Encoding.Unicode.GetString(passwordBytes);
|
||||
} else {
|
||||
throw new Exception("Failed to retrieve credentials for target: " + target);
|
||||
throw new Exception("No credentials found for target: " + target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue