Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Preferences/ExternalTab to MVVM #5047

Merged
merged 10 commits into from
Jun 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1028,9 +1028,14 @@ We want to have a look that matches our icons in the tool-bar */
-fx-background-color: -jr-error;
}

.titleHeader {
-fx-font-size: 150%;
-fx-padding: 0em 0em 0.5em 0em;
}

.sectionHeader {
-fx-font-size: 1.5em;
-fx-padding: 1em 0em 1em 0em;
-fx-font-size: 130%;
-fx-padding: 1em 0em 0.2em 0em;
}

.dialog-pane {
Expand Down
150 changes: 150 additions & 0 deletions src/main/java/org/jabref/gui/preferences/ExternalTab.fxml
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>
Loading