-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5047 from calixtus/prefs_mvvm_external
Convert Preferences/ExternalTab to MVVM
- Loading branch information
Showing
7 changed files
with
507 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
150 changes: 150 additions & 0 deletions
150
src/main/java/org/jabref/gui/preferences/ExternalTab.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.scene.control.Button?> | ||
<?import javafx.scene.control.CheckBox?> | ||
<?import javafx.scene.control.ComboBox?> | ||
<?import javafx.scene.control.Label?> | ||
<?import javafx.scene.control.RadioButton?> | ||
<?import javafx.scene.control.TextField?> | ||
<?import javafx.scene.control.ToggleGroup?> | ||
<?import javafx.scene.layout.ColumnConstraints?> | ||
<?import javafx.scene.layout.GridPane?> | ||
<?import javafx.scene.layout.HBox?> | ||
<?import javafx.scene.layout.RowConstraints?> | ||
<?import javafx.scene.layout.VBox?> | ||
|
||
<?import javafx.scene.control.Tooltip?> | ||
<fx:root prefWidth="650.0" spacing="10.0" type="VBox" | ||
xmlns="http://javafx.com/javafx/8.0.212" xmlns:fx="http://javafx.com/fxml/1" | ||
fx:controller="org.jabref.gui.preferences.ExternalTabView"> | ||
<fx:define> | ||
<ToggleGroup fx:id="openConsole"/> | ||
<ToggleGroup fx:id="openPDF"/> | ||
<ToggleGroup fx:id="openFileBrowser"/> | ||
</fx:define> | ||
<children> | ||
<Label styleClass="titleHeader" text="%External programs"/> | ||
<Label styleClass="sectionHeader" text="%Sending of emails"/> | ||
<HBox alignment="CENTER_LEFT" spacing="10.0"> | ||
|
||
<children> | ||
<Label text="%Subject for sending an email with references"/> | ||
<TextField fx:id="eMailReferenceSubject"/> | ||
</children> | ||
</HBox> | ||
<CheckBox fx:id="autoOpenAttachedFolders" | ||
text="%Automatically open folders of attached files"/> | ||
<Label styleClass="sectionHeader" text="%Push applications"/> | ||
<HBox> | ||
<GridPane alignment="CENTER_LEFT"> | ||
<columnConstraints> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="200.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" percentWidth="0.0" prefWidth="10.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="-Infinity" prefWidth="200.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="-Infinity" prefWidth="10.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="140.0"/> | ||
</columnConstraints> | ||
<rowConstraints> | ||
<RowConstraints prefHeight="30.0" vgrow="SOMETIMES"/> | ||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | ||
<RowConstraints minHeight="-Infinity" prefHeight="10.0" vgrow="SOMETIMES"/> | ||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | ||
</rowConstraints> | ||
<children> | ||
<Label text="%Application to push entries to"/> | ||
<ComboBox fx:id="pushToApplicationCombo" minWidth="-Infinity" prefWidth="200.0" | ||
GridPane.columnIndex="2"/> | ||
<Button onAction="#pushToApplicationSettings" prefWidth="140.0" | ||
text="%Application settings" GridPane.columnIndex="4"/> | ||
<Label text="%Cite command" GridPane.rowIndex="1"/> | ||
<TextField fx:id="citeCommand" minWidth="-Infinity" prefWidth="200.0" GridPane.columnIndex="2" | ||
GridPane.rowIndex="1"/> | ||
<Button onAction="#manageExternalFileTypes" prefWidth="200.0" | ||
text="%Manage external file types" GridPane.columnIndex="2" GridPane.rowIndex="3"/> | ||
</children> | ||
</GridPane> | ||
</HBox> | ||
<Label styleClass="sectionHeader" text="%Open console"/> | ||
<VBox spacing="8.0"> | ||
<children> | ||
<RadioButton fx:id="useTerminalDefault" text="%Use default terminal emulator" | ||
toggleGroup="$openConsole"/> | ||
<HBox alignment="CENTER_LEFT" spacing="10.0"> | ||
<children> | ||
<RadioButton fx:id="useTerminalSpecial" lineSpacing="10.0" | ||
prefWidth="200.0" text="%Execute command" toggleGroup="$openConsole"/> | ||
<TextField fx:id="useTerminalCommand" prefWidth="350.0" disable="${!useTerminalSpecial.selected}"> | ||
<tooltip> | ||
<Tooltip | ||
text="%Note: Use the placeholder %DIR% for the location of the opened library file."/> | ||
</tooltip> | ||
</TextField> | ||
<Button fx:id="" text="%Browse" onAction="#useTerminalCommandBrowse" disable="${!useTerminalSpecial.selected}"/> | ||
</children> | ||
</HBox> | ||
</children> | ||
</VBox> | ||
<Label styleClass="sectionHeader" text="%Open PDF"/> | ||
<HBox> | ||
<GridPane alignment="CENTER_LEFT"> | ||
<columnConstraints> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="200.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" percentWidth="0.0" prefWidth="10.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="-Infinity" prefWidth="350.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="-Infinity" percentWidth="0.0" prefWidth="10.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES"/> | ||
</columnConstraints> | ||
<rowConstraints> | ||
<RowConstraints prefHeight="30.0" vgrow="SOMETIMES"/> | ||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | ||
</rowConstraints> | ||
<children> | ||
<RadioButton fx:id="usePDFAcrobat" text="%Adobe Acrobat Reader" | ||
toggleGroup="$openPDF"/> | ||
<TextField fx:id="usePDFAcrobatCommand" prefWidth="350.0" GridPane.columnIndex="2" disable="${!usePDFAcrobat.selected}"/> | ||
<Button onAction="#usePDFAcrobatCommandBrowse" text="%Browse" | ||
GridPane.columnIndex="4" disable="${!usePDFAcrobat.selected}"/> | ||
<RadioButton fx:id="usePDFSumatra" text="%Sumatra Reader" toggleGroup="$openPDF" | ||
GridPane.rowIndex="1"/> | ||
<TextField fx:id="usePDFSumatraCommand" prefWidth="350.0" GridPane.columnIndex="2" | ||
GridPane.rowIndex="1" disable="${!usePDFSumatra.selected}"/> | ||
<Button onAction="#usePDFSumatraCommandBrowse" text="%Browse" | ||
GridPane.columnIndex="4" GridPane.rowIndex="1" disable="${!usePDFSumatra.selected}"/> | ||
</children> | ||
</GridPane> | ||
</HBox> | ||
<Label styleClass="sectionHeader" text="%Open File Browser"/> | ||
<HBox> | ||
<children> | ||
<GridPane alignment="CENTER_LEFT"> | ||
<columnConstraints> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="200.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" percentWidth="0.0" prefWidth="10.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="-Infinity" prefWidth="350.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES" minWidth="-Infinity" percentWidth="0.0" prefWidth="10.0"/> | ||
<ColumnConstraints hgrow="SOMETIMES"/> | ||
</columnConstraints> | ||
<rowConstraints> | ||
<RowConstraints prefHeight="30.0" vgrow="SOMETIMES"/> | ||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> | ||
</rowConstraints> | ||
<children> | ||
<RadioButton fx:id="useFileBrowserDefault" text="%Use default file browser" | ||
toggleGroup="$openFileBrowser"/> | ||
<RadioButton fx:id="useFileBrowserSpecial" text="%Execute command" | ||
toggleGroup="$openFileBrowser" GridPane.rowIndex="1"/> | ||
<TextField fx:id="useFileBrowserSpecialCommand" prefWidth="350.0" | ||
GridPane.columnIndex="2" GridPane.rowIndex="1" disable="${!useFileBrowserSpecial.selected}"> | ||
<tooltip> | ||
<Tooltip | ||
text="%Note: Use the placeholder %DIR% for the location of the opened library file."/> | ||
</tooltip> | ||
</TextField> | ||
<Button onAction="#useFileBrowserSpecialCommandBrowse" text="%Browse" | ||
GridPane.columnIndex="4" GridPane.rowIndex="1" disable="${!useFileBrowserSpecial.selected}"/> | ||
</children> | ||
</GridPane> | ||
</children> | ||
</HBox> | ||
</children> | ||
</fx:root> |
Oops, something went wrong.