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

Merging from head master #1

Merged
merged 65 commits into from
Jun 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
427f74a
Refactor PreferenceDialog to MVVM with a split-pane
calixtus Jun 5, 2019
8462cc7
Fixed wrong logging class
calixtus Jun 5, 2019
106aea4
Fixed unused import
calixtus Jun 5, 2019
dbfb3d6
Added visual improvements
calixtus Jun 6, 2019
e8ce43a
Convertet GeneralTab to MVVM
calixtus Jun 6, 2019
4e64bde
Removed old GeneralTab
calixtus Jun 6, 2019
0aad34f
Removed old GeneralTab
calixtus Jun 6, 2019
e51571e
Added tooltip, fixed travis
calixtus Jun 6, 2019
86de348
Added initial FileTab-MVVM
calixtus Jun 7, 2019
7f0c7a6
Minor corrections
calixtus Jun 7, 2019
968f028
Added FileTab, Reworked with VBox, comments and minor changes
calixtus Jun 8, 2019
083fb55
Removed unused imports
calixtus Jun 8, 2019
a225444
Added FileTab and some minor corrections
calixtus Jun 8, 2019
64d6712
Removed old FileTab
calixtus Jun 8, 2019
c91af3a
Fixed checkstyle
calixtus Jun 8, 2019
414f00f
Added Validators and some clean-ups
calixtus Jun 9, 2019
a12a7c7
Refactor minor corrections
calixtus Jun 9, 2019
a1db40a
Merge remote-tracking branch 'upstream/master' into preferences_mvvm
calixtus Jun 9, 2019
ee1387d
Refactor final
calixtus Jun 9, 2019
6bbbb53
Converted Tab
calixtus Jun 11, 2019
f838492
Bump guava from 27.1-jre to 28.0-jre (#5049)
dependabot-preview[bot] Jun 12, 2019
f252c30
Fix travis
calixtus Jun 12, 2019
3d8c9a2
Fix travis again
calixtus Jun 12, 2019
3570c9e
Refactor
calixtus Jun 12, 2019
c336c0c
Fixed travis
calixtus Jun 12, 2019
5642a39
Bump slf4j-api from 1.8.0-beta4 to 2.0.0-alpha0 (#5051)
dependabot-preview[bot] Jun 13, 2019
47e3cc5
Shutdown Unirest workers (#5054)
stefan-kolb Jun 14, 2019
d6cb156
Added Injectors
calixtus Jun 14, 2019
1220b8d
Reversed Injection of PreferencesService
calixtus Jun 14, 2019
4fd959d
Added Injection of dialogService
calixtus Jun 14, 2019
6e2e445
Fixed two glitches
calixtus Jun 14, 2019
771e011
Removed unused import
calixtus Jun 14, 2019
9776df2
Removed unused import
calixtus Jun 14, 2019
d811c17
Merge pull request #5033 from calixtus/preferences_mvvm
Siedlerchr Jun 14, 2019
55bdf9d
Merge remote-tracking branch 'upstream/master' into prefs_mvvm_external
calixtus Jun 14, 2019
a228cd1
Fixed merge-mistake
calixtus Jun 14, 2019
b01ed52
Fixed merge-mistake
calixtus Jun 14, 2019
0e704ba
bugfix/5028 :Initial commit.
CyraxSector Jun 15, 2019
9248932
Merge pull request #5047 from calixtus/prefs_mvvm_external
Siedlerchr Jun 15, 2019
e0fb482
Fix automaticalls set file links task not runinng (#5058)
Siedlerchr Jun 15, 2019
6bc75a1
Fix Russian translation
burrbull Jun 16, 2019
e74a954
Merge pull request #5056 from CyraxSector/bugfix/5028
Siedlerchr Jun 16, 2019
f300a83
Merge pull request #5059 from burrbull/patch-1
Siedlerchr Jun 16, 2019
5b9d598
mark one test as fetcher test, cause it depends on arxiv.org
Siedlerchr Jun 16, 2019
73062fe
New translations JabRef_en.properties (Chinese Simplified)
Siedlerchr Jun 16, 2019
ddef76c
New translations JabRef_en.properties (Persian)
Siedlerchr Jun 16, 2019
19984bf
New translations JabRef_en.properties (Turkish)
Siedlerchr Jun 16, 2019
7aee45c
New translations JabRef_en.properties (Tagalog)
Siedlerchr Jun 16, 2019
ac3d6ab
New translations JabRef_en.properties (Swedish)
Siedlerchr Jun 16, 2019
3febf7c
New translations JabRef_en.properties (Spanish)
Siedlerchr Jun 16, 2019
3a55d11
New translations JabRef_en.properties (Russian)
Siedlerchr Jun 16, 2019
289adf1
New translations JabRef_en.properties (Portuguese, Brazilian)
Siedlerchr Jun 16, 2019
39d463d
New translations JabRef_en.properties (Norwegian)
Siedlerchr Jun 16, 2019
ec38122
New translations JabRef_en.properties (Danish)
Siedlerchr Jun 16, 2019
24896da
New translations JabRef_en.properties (Japanese)
Siedlerchr Jun 16, 2019
c9e10e3
New translations JabRef_en.properties (Italian)
Siedlerchr Jun 16, 2019
fb82ce8
New translations JabRef_en.properties (Indonesian)
Siedlerchr Jun 16, 2019
bb2b855
New translations JabRef_en.properties (Greek)
Siedlerchr Jun 16, 2019
6128d62
New translations JabRef_en.properties (German)
Siedlerchr Jun 16, 2019
2e150c2
New translations JabRef_en.properties (French)
Siedlerchr Jun 16, 2019
824e4b5
New translations JabRef_en.properties (Dutch)
Siedlerchr Jun 16, 2019
63000d2
New translations JabRef_en.properties (Vietnamese)
Siedlerchr Jun 16, 2019
d88e26d
Merge pull request #5060 from JabRef/l10n_master
Siedlerchr Jun 16, 2019
b397538
New translations JabRef_en.properties (Italian)
Siedlerchr Jun 16, 2019
8d99db1
Merge pull request #5061 from JabRef/l10n_master
Siedlerchr Jun 16, 2019
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
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ dependencies {

compile 'net.java.dev.glazedlists:glazedlists_java15:1.9.1'

compile 'com.google.guava:guava:27.1-jre'
compile 'com.google.guava:guava:28.0-jre'

// JavaFX stuff
compile 'de.jensd:fontawesomefx-commons:8.15'
Expand All @@ -142,7 +142,7 @@ dependencies {
compile 'com.mashape.unirest:unirest-java:1.4.9'

// >1.8.0-beta is required for java 9 compatibility
compile 'org.slf4j:slf4j-api:1.8.0-beta4'
compile 'org.slf4j:slf4j-api:2.0.0-alpha0'
compile 'org.apache.logging.log4j:log4j-slf4j18-impl:2.11.2'
compile 'org.apache.logging.log4j:log4j-jcl:2.11.2'
compile 'org.apache.logging.log4j:log4j-api:2.11.2'
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/jabref/Globals.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jabref;

import java.awt.GraphicsEnvironment;
import java.io.IOException;
import java.util.Optional;
import java.util.UUID;

Expand All @@ -24,6 +25,7 @@
import org.jabref.preferences.JabRefPreferences;

import com.google.common.base.StandardSystemProperty;
import com.mashape.unirest.http.Unirest;
import com.microsoft.applicationinsights.TelemetryClient;
import com.microsoft.applicationinsights.TelemetryConfiguration;
import com.microsoft.applicationinsights.internal.shutdown.SDKShutdownActivity;
Expand Down Expand Up @@ -125,6 +127,9 @@ public static void shutdownThreadPools() {

public static void stopBackgroundTasks() {
stopTelemetryClient();
try {
Unirest.shutdown();
} catch (IOException ignore) { }
}

public static Optional<TelemetryClient> getTelemetryClient() {
Expand Down
13 changes: 11 additions & 2 deletions src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1028,11 +1028,20 @@ 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 {
-fx-background-color: -fx-control-inner-background;
}

.preference-sidepane {
-fx-background-color: -jr-sidepane-background;
}
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ private MenuBar createMenu() {

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.SET_FILE_LINKS, new AutoLinkFilesAction(this, prefs, stateManager, undoManager))
factory.createMenuItem(StandardActions.SET_FILE_LINKS, new AutoLinkFilesAction(this, prefs, stateManager, undoManager, Globals.TASK_EXECUTOR))
);

// PushToApplication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ protected Collection<String> determineFieldsToShow(BibEntry entry, EntryType ent
.filter(field -> !allKnownFields.contains(field)).collect(Collectors.toList());

otherFields.removeAll(entryType.getDeprecatedFields());
otherFields.removeAll(entryType.getOptionalFields());
otherFields.remove(BibEntry.KEY_FIELD);
otherFields.removeAll(customTabFieldNames);
return otherFields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.jabref.gui.externalfiletype.ExternalFileTypes;
import org.jabref.gui.undo.NamedCompound;
import org.jabref.gui.util.BindingsHelper;
import org.jabref.gui.util.TaskExecutor;
import org.jabref.logic.l10n.Localization;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
Expand All @@ -31,12 +32,14 @@ public class AutoLinkFilesAction extends SimpleCommand {
private final JabRefPreferences preferences;
private final StateManager stateManager;
private UndoManager undoManager;
private TaskExecutor taskExecutor;

public AutoLinkFilesAction(JabRefFrame frame, JabRefPreferences preferences, StateManager stateManager, UndoManager undoManager) {
public AutoLinkFilesAction(JabRefFrame frame, JabRefPreferences preferences, StateManager stateManager, UndoManager undoManager, TaskExecutor taskExecutor) {
this.dialogService = frame.getDialogService();
this.preferences = preferences;
this.stateManager = stateManager;
this.undoManager = undoManager;
this.taskExecutor = taskExecutor;

this.executable.bind(needsDatabase(this.stateManager).and(needsEntriesSelected(stateManager)));
this.statusMessage.bind(BindingsHelper.ifThenElse(executable, "", Localization.lang("This operation requires one or more entries to be selected.")));
Expand All @@ -51,6 +54,7 @@ public void execute() {
final NamedCompound nc = new NamedCompound(Localization.lang("Automatically set file links"));
AutoSetFileLinksUtil util = new AutoSetFileLinksUtil(database, preferences.getFilePreferences(), preferences.getAutoLinkPreferences(), ExternalFileTypes.getInstance());
Task<List<BibEntry>> linkFilesTask = new Task<List<BibEntry>>() {

@Override
protected List<BibEntry> call() {
return util.linkAssociatedFiles(entries, nc);
Expand All @@ -71,9 +75,9 @@ protected void succeeded() {
};

dialogService.showProgressDialogAndWait(
Localization.lang("Automatically setting file links"),
Localization.lang("Searching for files"),
linkFilesTask
);
Localization.lang("Automatically setting file links"),
Localization.lang("Searching for files"),
linkFilesTask);
taskExecutor.execute(linkFilesTask);
}
}
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