Various fixes

This commit is contained in:
crschnick 2024-06-27 15:15:43 +00:00
parent 5ca15b2af6
commit aa91e263ca
19 changed files with 35 additions and 10 deletions

View file

@ -12,6 +12,8 @@ import io.xpipe.app.fxcomps.impl.*;
import io.xpipe.app.fxcomps.util.DerivedObservableList;
import io.xpipe.app.fxcomps.util.PlatformThread;
import io.xpipe.app.util.ThreadHelper;
import javafx.application.Platform;
import javafx.beans.binding.Bindings;
import javafx.collections.FXCollections;
import javafx.geometry.Insets;
@ -89,7 +91,8 @@ public class BrowserTransferComp extends SimpleComp {
var clearButton = new IconButtonComp("mdi2c-close", () -> {
model.clear();
})
.hide(Bindings.isEmpty(syncItems));
.hide(Bindings.isEmpty(syncItems))
.tooltipKey("clearTransferDescription");
var bottom =
new HorizontalComp(List.of(Comp.hspacer(), dragNotice, Comp.hspacer(), downloadButton, Comp.hspacer(4), clearButton));
@ -190,7 +193,11 @@ public class BrowserTransferComp extends SimpleComp {
return;
}
model.clear();
Platform.runLater(() -> {
ThreadHelper.runAsync(() -> {
model.clear();
});
});
event.consume();
});
}),

View file

@ -63,8 +63,10 @@ public class BrowserTransferModel {
}
public void clear() {
cleanDirectory();
items.clear();
executor.submit(() -> {
cleanDirectory();
items.clear();
});
}
public void drop(OpenFileSystemModel model, List<BrowserEntry> entries) {

View file

@ -85,11 +85,14 @@ public final class OpenFileSystemModel extends BrowserSessionTab<FileSystemStore
var fs = entry.getStore().createFileSystem();
if (fs.getShell().isPresent()) {
ProcessControlProvider.get().withDefaultScripts(fs.getShell().get());
}
fs.open();
// Listen to kill after init as the shell might get killed during init for certain reasons
if (fs.getShell().isPresent()) {
fs.getShell().get().onKill(() -> {
browserModel.closeAsync(this);
});
}
fs.open();
this.fileSystem = fs;
this.cache = new OpenFileSystemCache(this);

View file

@ -50,7 +50,6 @@ public class StoreEntryListComp extends SimpleComp {
StoreViewState.get().getAllEntries().getList(),
StoreViewState.get().getActiveCategory());
var map = new LinkedHashMap<Comp<?>, ObservableValue<Boolean>>();
map.put(new StoreIntroComp(), showIntro);
map.put(
new StoreNotFoundComp(),
Bindings.and(
@ -66,6 +65,7 @@ public class StoreEntryListComp extends SimpleComp {
.getCurrentTopLevelSection()
.getShownChildren()
.getList())));
map.put(new StoreIntroComp(), showIntro);
return new MultiContentComp(map).createRegion();
}

View file

@ -5,6 +5,7 @@ import io.xpipe.app.core.*;
import io.xpipe.app.core.check.AppDebugModeCheck;
import io.xpipe.app.core.check.AppTempCheck;
import io.xpipe.app.core.check.AppUserDirectoryCheck;
import io.xpipe.app.core.window.ModifiedStage;
import io.xpipe.app.issue.*;
import io.xpipe.app.launcher.LauncherCommand;
import io.xpipe.app.prefs.AppPrefs;
@ -114,6 +115,8 @@ public abstract class OperationMode {
AppExtensionManager.init(true);
AppI18n.init();
AppPrefs.initLocal();
// Register stage theming early to make it apply for any potential early popups
ModifiedStage.init();
AppBeaconServer.setupPort();
TrackEvent.info("Finished initial setup");
} catch (Throwable ex) {

View file

@ -3,13 +3,11 @@ 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.window.ModifiedStage;
import io.xpipe.app.issue.TrackEvent;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.update.UpdateAvailableAlert;
import io.xpipe.app.util.PlatformState;
import io.xpipe.app.util.ThreadHelper;
import javafx.application.Application;
public abstract class PlatformMode extends OperationMode {
@ -35,7 +33,6 @@ public abstract class PlatformMode extends OperationMode {
AppStyle.init();
AppImages.init();
AppLayoutModel.init();
ModifiedStage.init();
TrackEvent.info("Finished essential component initialization before platform");
TrackEvent.info("Launching application ...");

View file

@ -27,6 +27,7 @@ public class ScrollComp extends Comp<CompStructure<ScrollPane>> {
sp.setFitToWidth(true);
sp.getStyleClass().add("scroll-comp");
sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);
sp.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
sp.setSkin(new ScrollPaneSkin(sp));
ScrollBar bar = (ScrollBar) sp.lookup(".scroll-bar:vertical");

View file

@ -481,3 +481,4 @@ enableGitStoragePtbDisabled=Git-synkronisering er deaktiveret for offentlige tes
copyId=Kopi ID
requireDoubleClickForConnections=Kræver dobbeltklik for forbindelser
requireDoubleClickForConnectionsDescription=Hvis den er aktiveret, skal du dobbeltklikke på forbindelser for at starte dem. Det er nyttigt, hvis man er vant til at dobbeltklikke på ting.
clearTransferDescription=Ryd valg

View file

@ -475,3 +475,4 @@ enableGitStoragePtbDisabled=Die Git-Synchronisierung ist für öffentliche Test-
copyId=ID kopieren
requireDoubleClickForConnections=Doppelklick für Verbindungen erforderlich
requireDoubleClickForConnectionsDescription=Wenn diese Funktion aktiviert ist, musst du auf die Verbindungen doppelklicken, um sie zu starten. Das ist nützlich, wenn du es gewohnt bist, auf Dinge doppelt zu klicken.
clearTransferDescription=Auswahl löschen

View file

@ -478,4 +478,5 @@ enabled=Enabled
enableGitStoragePtbDisabled=Git synchronization is disabled for public test builds to prevent usage with regular release git repositories and to discourage using a PTB build as your daily driver.
copyId=Copy ID
requireDoubleClickForConnections=Require double click for connections
requireDoubleClickForConnectionsDescription=If enabled, you have to double-click connections to launch them. This is useful if you're used to double-clicking things.
requireDoubleClickForConnectionsDescription=If enabled, you have to double-click connections to launch them. This is useful if you're used to double-clicking things.
clearTransferDescription=Clear selection

View file

@ -462,3 +462,4 @@ enableGitStoragePtbDisabled=La sincronización Git está desactivada para las co
copyId=ID de copia
requireDoubleClickForConnections=Requiere doble clic para las conexiones
requireDoubleClickForConnectionsDescription=Si está activado, tienes que hacer doble clic en las conexiones para iniciarlas. Esto es útil si estás acostumbrado a hacer doble clic en las cosas.
clearTransferDescription=Borrar selección

View file

@ -462,3 +462,4 @@ enableGitStoragePtbDisabled=La synchronisation Git est désactivée pour les ver
copyId=ID de copie
requireDoubleClickForConnections=Nécessite un double clic pour les connexions
requireDoubleClickForConnectionsDescription=Si cette option est activée, tu dois double-cliquer sur les connexions pour les lancer. C'est utile si tu as l'habitude de double-cliquer sur les choses.
clearTransferDescription=Effacer la sélection

View file

@ -462,3 +462,4 @@ enableGitStoragePtbDisabled=La sincronizzazione Git è disabilitata per le build
copyId=Copia ID
requireDoubleClickForConnections=Richiede un doppio clic per le connessioni
requireDoubleClickForConnectionsDescription=Se abilitato, devi fare doppio clic sulle connessioni per avviarle. Questo è utile se sei abituato a fare doppio clic.
clearTransferDescription=Cancella la selezione

View file

@ -462,3 +462,4 @@ enableGitStoragePtbDisabled=Gitの同期をパブリックテストビルドで
copyId=コピーID
requireDoubleClickForConnections=接続にはダブルクリックが必要
requireDoubleClickForConnectionsDescription=有効にすると、接続をダブルクリックしないと起動しなくなる。ダブルクリックに慣れている人には便利な機能だ。
clearTransferDescription=選択範囲をクリアする

View file

@ -462,3 +462,4 @@ enableGitStoragePtbDisabled=Git synchronisatie is uitgeschakeld voor publieke te
copyId=ID kopiëren
requireDoubleClickForConnections=Dubbelklikken vereist voor verbindingen
requireDoubleClickForConnectionsDescription=Als dit is ingeschakeld, moet je dubbelklikken op verbindingen om ze te starten. Dit is handig als je gewend bent om op dingen te dubbelklikken.
clearTransferDescription=Selectie wissen

View file

@ -462,3 +462,4 @@ enableGitStoragePtbDisabled=A sincronização do Git está desactivada para comp
copyId=ID de cópia
requireDoubleClickForConnections=Exige duplo clique para ligações
requireDoubleClickForConnectionsDescription=Se estiver ativado, tens de fazer duplo clique nas ligações para as iniciar. Isto é útil se estiveres habituado a fazer duplo clique em coisas.
clearTransferDescription=Limpar seleção

View file

@ -462,3 +462,4 @@ enableGitStoragePtbDisabled=Git-синхронизация отключена д
copyId=Идентификатор копии
requireDoubleClickForConnections=Требуется двойной щелчок для подключения
requireDoubleClickForConnectionsDescription=Если эта опция включена, тебе придется дважды щелкнуть по соединениям, чтобы запустить их. Это полезно, если ты привык все запускать двойным щелчком.
clearTransferDescription=Четкий выбор

View file

@ -463,3 +463,4 @@ enableGitStoragePtbDisabled=Git senkronizasyonu, normal sürüm git depoları il
copyId=Kopya Kimliği
requireDoubleClickForConnections=Bağlantılar için çift tıklama gerektir
requireDoubleClickForConnectionsDescription=Etkinleştirilirse, bağlantıları başlatmak için çift tıklamanız gerekir. Bu, bir şeyleri çift tıklamaya alışkınsanız kullanışlıdır.
clearTransferDescription=Seçimi temizle

View file

@ -462,3 +462,4 @@ enableGitStoragePtbDisabled=公共测试版已禁用 Git 同步功能,以防
copyId=复制 ID
requireDoubleClickForConnections=要求双击连接
requireDoubleClickForConnectionsDescription=如果启用,则必须双击连接才能启动。如果您习惯双击事物,这将非常有用。
clearTransferDescription=清除选择