Skip to content

Commit

Permalink
New release [release]
Browse files Browse the repository at this point in the history
  • Loading branch information
crschnick committed Feb 22, 2023
1 parent 6629f21 commit 491d3c2
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/io/xpipe/app/browser/BookmarkList.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

final class BookmarkList extends SimpleComp {

private final BrowserModel model;
private final FileBrowserModel model;

BookmarkList(BrowserModel model) {
BookmarkList(FileBrowserModel model) {
this.model = model;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.nio.file.Files;
import java.util.*;

public class BrowserClipboard {
public class FileBrowserClipboard {

@Value
public static class Instance {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
import static atlantafx.base.theme.Styles.toggleStyleClass;
import static javafx.scene.control.TabPane.TabClosingPolicy.ALL_TABS;

public class BrowserComp extends SimpleComp {
public class FileBrowserComp extends SimpleComp {

private static final double TAB_MIN_HEIGHT = 60;

private final BrowserModel model;
private final FileBrowserModel model;

public BrowserComp(BrowserModel model) {
public FileBrowserComp(FileBrowserModel model) {
this.model = model;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import lombok.Getter;

@Getter
public class BrowserModel {
public class FileBrowserModel {

public static final BrowserModel DEFAULT = new BrowserModel();
public static final FileBrowserModel DEFAULT = new FileBrowserModel();

private final ObservableList<OpenFileSystemModel> openFileSystems = FXCollections.observableArrayList();
private final Property<OpenFileSystemModel> selected = new SimpleObjectProperty<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.Objects;
import java.util.Optional;

final class NavigationHistory {
final class FileBrowserNavigationHistory {

private final IntegerProperty cursor = new SimpleIntegerProperty(0);
private final List<String> history = new ArrayList<>();
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/io/xpipe/app/browser/FileListComp.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ private TableView<FileSystem.FileEntry> createTable() {
if (event.isControlDown()
&& event.getCode().equals(KeyCode.C)
&& table.getSelectionModel().getSelectedItems().size() > 0) {
BrowserClipboard.startCopy(table.getSelectionModel().getSelectedItems());
FileBrowserClipboard.startCopy(table.getSelectionModel().getSelectedItems());
event.consume();
}

if (event.isControlDown() && event.getCode().equals(KeyCode.V)) {
var clipboard = BrowserClipboard.retrieveCopy();
var clipboard = FileBrowserClipboard.retrieveCopy();
if (clipboard != null) {
var files = clipboard.getEntries();
var target = fileList.getModel().getCurrentDirectory();
Expand Down Expand Up @@ -155,7 +155,7 @@ private TableView<FileSystem.FileEntry> createTable() {

var selected = table.getSelectionModel().getSelectedItems();
Dragboard db = row.startDragAndDrop(TransferMode.COPY);
db.setContent(BrowserClipboard.startDrag(selected));
db.setContent(FileBrowserClipboard.startDrag(selected));
db.setDragView(image, 30, 60);
event.setDragDetect(true);
event.consume();
Expand Down Expand Up @@ -221,7 +221,7 @@ private TableView<FileSystem.FileEntry> createTable() {
// Accept drops from inside the app window
if (event.getGestureSource() != null) {
event.setDropCompleted(true);
var files = BrowserClipboard.retrieveDrag(event.getDragboard()).getEntries();
var files = FileBrowserClipboard.retrieveDrag(event.getDragboard()).getEntries();
var target = row.getItem() != null
? row.getItem()
: fileList.getModel().getCurrentDirectory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class OpenFileSystemModel {
private FileSystem fileSystem;
private final FileListModel fileList;
private final ReadOnlyObjectWrapper<String> currentPath = new ReadOnlyObjectWrapper<>();
private final NavigationHistory history = new NavigationHistory();
private final FileBrowserNavigationHistory history = new FileBrowserNavigationHistory();
private final BooleanProperty busy = new SimpleBooleanProperty();

public OpenFileSystemModel() {
Expand Down Expand Up @@ -208,7 +208,7 @@ public ReadOnlyObjectProperty<String> currentPathProperty() {
return currentPath.getReadOnlyProperty();
}

public NavigationHistory getHistory() {
public FileBrowserNavigationHistory getHistory() {
return history;
}

Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/io/xpipe/app/comp/AppLayoutComp.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.xpipe.app.comp;

import io.xpipe.app.browser.BrowserComp;
import io.xpipe.app.browser.BrowserModel;
import io.xpipe.app.browser.FileBrowserComp;
import io.xpipe.app.browser.FileBrowserModel;
import io.xpipe.app.comp.about.AboutTabComp;
import io.xpipe.app.comp.base.SideMenuBarComp;
import io.xpipe.app.comp.storage.collection.SourceCollectionLayoutComp;
Expand Down Expand Up @@ -43,7 +43,7 @@ public AppLayoutComp() {
private List<SideMenuBarComp.Entry> createEntryList() {
var l = new ArrayList<>(List.of(
new SideMenuBarComp.Entry(AppI18n.observable("connections"), "mdi2c-connection", new StoreLayoutComp()),
new SideMenuBarComp.Entry(AppI18n.observable("browser"), "mdi2f-file-cabinet", new BrowserComp(BrowserModel.DEFAULT)),
new SideMenuBarComp.Entry(AppI18n.observable("browser"), "mdi2f-file-cabinet", new FileBrowserComp(FileBrowserModel.DEFAULT)),
new SideMenuBarComp.Entry(AppI18n.observable("data"), "mdsal-dvr", new SourceCollectionLayoutComp()),
new SideMenuBarComp.Entry(
AppI18n.observable("settings"), "mdsmz-miscellaneous_services", new PrefsComp(this)),
Expand Down
1 change: 1 addition & 0 deletions dist/changelogs/0.5.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Improvements and fixes for the file explorer
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.1
0.5.2

0 comments on commit 491d3c2

Please sign in to comment.