Skip to content

Commit

Permalink
Fixed accordion and l10n
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus committed Jan 3, 2021
1 parent 380f4d1 commit fe59fb9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
22 changes: 12 additions & 10 deletions src/main/java/org/jabref/gui/externalfiles/UnlinkedFilesDialog.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import org.jabref.gui.icon.JabRefIconView?>
<DialogPane xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.jabref.gui.externalfiles.UnlinkedFilesDialogView">
<content>
<VBox prefWidth="600.0" spacing="5.0">
<Label text="%Select a directory where the search shall start."/>
<HBox alignment="BASELINE_CENTER" spacing="10.0">
<TextField fx:id="directoryPathField" HBox.hgrow="ALWAYS"/>
<Button alignment="TOP_CENTER" mnemonicParsing="false" onAction="#browseFileDirectory"
text="%Browse">
<Button onAction="#browseFileDirectory" styleClass="icon-button,narrow"
prefHeight="20.0" prefWidth="20.0">
<graphic>
<JabRefIconView glyph="OPEN"/>
</graphic>
<tooltip>
<Tooltip text="%Opens the file browser."/>
<Tooltip text="%Browse"/>
</tooltip>
</Button>
</HBox>
Expand All @@ -45,16 +49,14 @@
</Button>
</HBox>
<StackPane VBox.vgrow="ALWAYS">
<Accordion fx:id="accordion">
<Accordion fx:id="accordion" minHeight="300.0" prefHeight="300.0" maxHeight="300.0">
<panes>
<TitledPane fx:id="filePane" text="%These files are not linked in the active library.">
<ScrollPane fitToWidth="true" minHeight="222.0" prefHeight="222.0"
prefWidth="579.0">
<TreeView fx:id="tree" minHeight="222.0" prefHeight="222.0"
prefWidth="576.0"/>
<TitledPane fx:id="filePane" text="%Currently unlinked files">
<ScrollPane fitToWidth="true">
<TreeView fx:id="tree" />
</ScrollPane>
</TitledPane>
<TitledPane fx:id="resultPane" expanded="false" text="Result">
<TitledPane fx:id="resultPane" text="%Import result">
<TableView fx:id="tvResult" editable="true" visible="false">
<columns>
<TableColumn fx:id="colStatus" prefWidth="100.0" text="%Status"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Control;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.TableColumn;
Expand Down Expand Up @@ -134,6 +135,7 @@ private void initialize() {
progressPane.managedProperty().bind(viewModel.searchProgressVisible());
progressPane.visibleProperty().bind(viewModel.searchProgressVisible());
accordion.disableProperty().bind(viewModel.searchProgressVisible());
tree.maxHeightProperty().bind(((Control) filePane.contentProperty().get()).heightProperty());

viewModel.filePaneExpanded().bindBidirectional(filePane.expandedProperty());
viewModel.resultPaneExpanded().bindBidirectional(resultPane.expandedProperty());
Expand All @@ -144,7 +146,6 @@ private void initialize() {
fileTypeSelection.getSelectionModel().selectFirst();

setupResultTable();

}

private void setupResultTable() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1117,13 +1117,13 @@ Unable\ to\ clear\ preferences.=Unable to clear preferences.
Unselect\ all=Unselect all
Expand\ all=Expand all
Collapse\ all=Collapse all
Opens\ the\ file\ browser.=Opens the file browser.
Scan\ directory=Scan directory
Searches\ the\ selected\ directory\ for\ unlinked\ files.=Searches the selected directory for unlinked files.
Starts\ the\ import\ of\ BibTeX\ entries.=Starts the import of BibTeX entries.
Select\ a\ directory\ where\ the\ search\ shall\ start.=Select a directory where the search shall start.
Select\ file\ type\:=Select file type:
These\ files\ are\ not\ linked\ in\ the\ active\ library.=These files are not linked in the active library.
Currently\ unlinked\ files=Currently unlinked files
Import\ result=Import result
Searching\ file\ system...=Searching file system...
Citation\ key\ patterns=Citation key patterns
Clear\ priority=Clear priority
Expand Down

0 comments on commit fe59fb9

Please sign in to comment.