Skip to content

Commit 3b9d6c4

Browse files
committed
Merge remote-tracking branch 'upstream/master' into ooPanel
* upstream/master: Add docbook 5 support (#4319) Bump java-diff-utils from 2.2.0 to 4.0 (#4507) 3189 fix group renaming (#4470) Create test (#4505) Bump archunit-junit5-engine from 0.9.2 to 0.9.3 (#4503) Bump archunit-junit5-api from 0.9.2 to 0.9.3 (#4504) Bump mockito-core from 2.23.0 to 2.23.4 (#4502) Bump guava from 27.0-jre to 27.0.1-jre (#4499) Improve page checker (#4498) Add color picker to groups dialog (#4492) Fix kbd XML closing tag
2 parents 0c8a959 + 9213e3c commit 3b9d6c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+991
-307
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
4343
- We removed the redundant new lines of markings and wrapped the summary in the File annotation tab. [#3823](https://github.com/JabRef/jabref/issues/3823)
4444
- We add auto url formatting when user paste link to URL field in entry editor. [koppor#254](https://github.com/koppor/jabref/issues/254)
4545
- We added a minimal height for the entry editor so that it can no longer be hidden by accident. [#4279](https://github.com/JabRef/jabref/issues/4279)
46-
- We added a new keyboard shortcut so that the entry editor could be closed by <kbd>Ctrl<kbd> + <kbd>E<kbd>. [#4222] (https://github.com/JabRef/jabref/issues/4222)
46+
- We added a new keyboard shortcut so that the entry editor could be closed by <kbd>Ctrl</kbd> + <kbd>E</kbd>. [#4222] (https://github.com/JabRef/jabref/issues/4222)
4747
- We added an option in the preference dialog box, that allows user to pick the dark or light theme option. [#4130] (https://github.com/JabRef/jabref/issues/4130)
4848
- We updated updated the Related Articles tab to accept JSON from the new version of the Mr. DLib service
4949
- We added an option in the preference dialog box that allows user to choose behavior after dragging and dropping files in Entry Editor. [#4356](https://github.com/JabRef/jabref/issues/4356)
@@ -68,6 +68,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
6868
- We fixed an issue where the custom file column were sorted incorrectly. https://github.com/JabRef/jabref/issues/3119
6969
- We fixed an issues where the entry losses focus when a field is edited and at the same time used for sorting. https://github.com/JabRef/jabref/issues/3373
7070
- We fixed an issue where the menu on Mac OS was not displayed in the usual Mac-specific way. https://github.com/JabRef/jabref/issues/3146
71+
- We improved the integrity check for page numbers. [#4113](https://github.com/JabRef/jabref/issues/4113) and [feature request in the forum](http://discourse.jabref.org/t/pages-field-allow-use-of-en-dash/1199)
7172
- We fixed an issue where the order of fields in customized entry types was not saved correctly. [#4033](http://github.com/JabRef/jabref/issues/4033)
7273
- We fixed an issue where the groups tree of the last database was still shown even after the database was already closed.
7374
- We fixed an issue where the "Open file dialog" may disappear behind other windows. https://github.com/JabRef/jabref/issues/3410

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ dependencies {
110110
compile "org.libreoffice:ridl:5.4.2"
111111
compile "org.libreoffice:unoil:5.4.2"
112112

113-
compile 'io.github.java-diff-utils:java-diff-utils:2.2.0'
113+
compile 'io.github.java-diff-utils:java-diff-utils:4.0'
114114
compile 'info.debatty:java-string-similarity:1.1.0'
115115

116116
antlr3 'org.antlr:antlr:3.5.2'
@@ -125,7 +125,7 @@ dependencies {
125125

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

128-
compile 'com.google.guava:guava:27.0-jre'
128+
compile 'com.google.guava:guava:27.0.1-jre'
129129

130130
// JavaFX stuff
131131
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
@@ -168,14 +168,14 @@ dependencies {
168168
testCompile 'org.junit-pioneer:junit-pioneer:0.3.0'
169169
testRuntime 'org.apache.logging.log4j:log4j-core:2.11.1'
170170
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.1'
171-
testCompile 'org.mockito:mockito-core:2.23.0'
171+
testCompile 'org.mockito:mockito-core:2.23.4'
172172
testCompile 'com.github.tomakehurst:wiremock:2.19.0'
173173
testCompile 'org.assertj:assertj-swing-junit:3.8.0'
174174
testCompile 'org.reflections:reflections:0.9.11'
175175
testCompile 'org.xmlunit:xmlunit-core:2.6.2'
176176
testCompile 'org.xmlunit:xmlunit-matchers:2.6.2'
177-
testCompile 'com.tngtech.archunit:archunit-junit5-api:0.9.2'
178-
testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.9.2'
177+
testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.9.3'
178+
testCompile 'com.tngtech.archunit:archunit-junit5-api:0.9.3'
179179
testCompile "org.testfx:testfx-core:4.0.+"
180180
testCompile "org.testfx:testfx-junit5:4.0.+"
181181

src/main/java/org/jabref/gui/Base.css

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@
291291
.check-box > .box,
292292
.menu-button,
293293
.choice-box,
294-
.color-picker.split-button > .color-picker-label,
295294
.combo-box-base,
296295
.combo-box-base:editable > .arrow-button {
297296
-fx-background-color: transparent;
@@ -956,3 +955,23 @@ We want to have a look that matches our icons in the tool-bar */
956955
.progress-bar > .track {
957956
-fx-background-color: -jr-accent;
958957
}
958+
959+
.jfx-color-picker:armed,
960+
.jfx-color-picker:hover,
961+
.jfx-color-picker:focused,
962+
.jfx-color-picker {
963+
-fx-background-color: transparent, transparent, transparent, transparent;
964+
-fx-background-radius: 0px;
965+
-fx-background-insets: 0px;
966+
-fx-effect: null;
967+
}
968+
969+
.color-palette {
970+
-fx-background-color: -fx-background;
971+
-fx-background-radius: 0px;
972+
-fx-background-insets: 0px;
973+
}
974+
975+
.color-palette-region .button {
976+
-fx-border-width: 0px;
977+
}

src/main/java/org/jabref/gui/BasePanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public void output(String s) {
272272
}
273273

274274
private void setupActions() {
275-
SaveDatabaseAction saveAction = new SaveDatabaseAction(this);
275+
SaveDatabaseAction saveAction = new SaveDatabaseAction(this, Globals.prefs);
276276
CleanupAction cleanUpAction = new CleanupAction(this, Globals.prefs);
277277

278278
actions.put(Actions.UNDO, undoAction);

src/main/java/org/jabref/gui/JabRefFrame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ private boolean confirmClose(BasePanel panel) {
13351335
if (response.isPresent() && response.get().equals(saveChanges)) {
13361336
// The user wants to save.
13371337
try {
1338-
SaveDatabaseAction saveAction = new SaveDatabaseAction(panel);
1338+
SaveDatabaseAction saveAction = new SaveDatabaseAction(panel, Globals.prefs);
13391339
if (!saveAction.save()) {
13401340
// The action was either canceled or unsuccessful.
13411341
output(Localization.lang("Unable to save library"));

src/main/java/org/jabref/gui/dialogs/AutosaveUIManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.jabref.gui.dialogs;
22

3+
import org.jabref.Globals;
34
import org.jabref.gui.BasePanel;
45
import org.jabref.gui.exporter.SaveDatabaseAction;
56
import org.jabref.model.database.event.AutosaveEvent;
@@ -25,7 +26,7 @@ public AutosaveUIManager(BasePanel panel) {
2526
@Subscribe
2627
public void listen(@SuppressWarnings("unused") AutosaveEvent event) {
2728
try {
28-
new SaveDatabaseAction(panel).save();
29+
new SaveDatabaseAction(panel, Globals.prefs).save();
2930
} catch (Throwable e) {
3031
LOGGER.error("Problem occured while saving.", e);
3132
}

src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import javafx.scene.layout.VBox;
1515
import javafx.scene.text.Text;
1616

17-
import org.jabref.Globals;
1817
import org.jabref.gui.BasePanel;
1918
import org.jabref.gui.DialogService;
2019
import org.jabref.gui.JabRefFrame;
@@ -53,16 +52,18 @@ public class SaveDatabaseAction {
5352
private final BasePanel panel;
5453
private final JabRefFrame frame;
5554
private final DialogService dialogService;
55+
private final JabRefPreferences prefs;
5656

57-
public SaveDatabaseAction(BasePanel panel) {
57+
public SaveDatabaseAction(BasePanel panel, JabRefPreferences prefs) {
5858
this.panel = panel;
5959
this.frame = panel.frame();
6060
this.dialogService = frame.getDialogService();
61+
this.prefs = prefs;
6162
}
6263

6364
private boolean saveDatabase(Path file, boolean selectedOnly, Charset encoding, SavePreferences.DatabaseSaveType saveType) throws SaveException {
6465
try {
65-
SavePreferences preferences = Globals.prefs.loadForSaveFromPreferences()
66+
SavePreferences preferences = prefs.loadForSaveFromPreferences()
6667
.withEncoding(encoding)
6768
.withSaveType(saveType);
6869

@@ -124,7 +125,7 @@ private boolean doSave() {
124125
panel.getBibDatabaseContext()
125126
.getMetaData()
126127
.getEncoding()
127-
.orElse(Globals.prefs.getDefaultEncoding()),
128+
.orElse(prefs.getDefaultEncoding()),
128129
SavePreferences.DatabaseSaveType.ALL);
129130

130131
if (success) {
@@ -182,10 +183,10 @@ private Optional<Path> getSavePath() {
182183
FileDialogConfiguration fileDialogConfiguration = new FileDialogConfiguration.Builder()
183184
.addExtensionFilter(StandardFileType.BIBTEX_DB)
184185
.withDefaultExtension(StandardFileType.BIBTEX_DB)
185-
.withInitialDirectory(Globals.prefs.get(JabRefPreferences.WORKING_DIRECTORY))
186+
.withInitialDirectory(prefs.get(JabRefPreferences.WORKING_DIRECTORY))
186187
.build();
187188
Optional<Path> selectedPath = dialogService.showFileSaveDialog(fileDialogConfiguration);
188-
selectedPath.ifPresent(path -> Globals.prefs.setWorkingDir(path.getParent()));
189+
selectedPath.ifPresent(path -> prefs.setWorkingDir(path.getParent()));
189190
return selectedPath;
190191
}
191192

@@ -228,7 +229,7 @@ public void saveAs(Path file) {
228229
private boolean readyForAutosave(BibDatabaseContext context) {
229230
return ((context.getLocation() == DatabaseLocation.SHARED) ||
230231
((context.getLocation() == DatabaseLocation.LOCAL)
231-
&& Globals.prefs.getBoolean(JabRefPreferences.LOCAL_AUTO_SAVE)))
232+
&& prefs.getBoolean(JabRefPreferences.LOCAL_AUTO_SAVE)))
232233
&&
233234
context.getDatabasePath().isPresent();
234235
}
@@ -240,7 +241,7 @@ private boolean readyForBackup(BibDatabaseContext context) {
240241
public void saveSelectedAsPlain() {
241242
getSavePath().ifPresent(path -> {
242243
try {
243-
saveDatabase(path, true, Globals.prefs.getDefaultEncoding(), SavePreferences.DatabaseSaveType.PLAIN_BIBTEX);
244+
saveDatabase(path, true, prefs.getDefaultEncoding(), SavePreferences.DatabaseSaveType.PLAIN_BIBTEX);
244245
frame.getFileHistory().newFile(path);
245246
frame.output(Localization.lang("Saved selected to '%0'.", path.toString()));
246247
} catch (SaveException ex) {

0 commit comments

Comments
 (0)