Small bug fixes

This commit is contained in:
crschnick 2023-05-20 17:35:59 +00:00
parent a2e04a24e6
commit 48d155400c
2 changed files with 4 additions and 1 deletions

View file

@ -95,11 +95,13 @@ final class BrowserFileListComp extends SimpleComp {
modeCol.setCellValueFactory(param ->
new SimpleObjectProperty<>(param.getValue().getRawFileEntry().getMode()));
modeCol.setCellFactory(col -> new FileModeCell());
modeCol.setSortable(false);
var table = new TableView<BrowserEntry>();
table.setPlaceholder(new Region());
table.getStyleClass().add(Styles.STRIPED);
table.getColumns().setAll(filenameCol, sizeCol, modeCol, mtimeCol);
table.getSortOrder().add(filenameCol);
table.setSortPolicy(param -> {
var comp = table.getComparator();
if (comp == null) {
@ -315,6 +317,7 @@ final class BrowserFileListComp extends SimpleComp {
if (!table.getItems().equals(newItems)) {
table.getItems().setAll(newItems);
table.sort();
}
var currentDirectory = fileList.getFileSystemModel().getCurrentDirectory();

View file

@ -24,7 +24,7 @@ public class TerminalHelper {
try {
type.launch(title, command, false);
} catch (Exception ex) {
throw new IOException("Unable to launch terminal " + type.toTranslatedString() + ". Maybe try to use a different one in the settings.", ex);
throw new IOException("Unable to launch terminal " + type.toTranslatedString() + ": " + ex.getMessage() + ". Maybe try to use a different one in the settings.", ex);
}
}
}