From c7473e73b7c3ead034031128105fd72decd15544 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 22 Jan 2019 08:24:58 +0100 Subject: [PATCH 01/20] Bump mysql-connector-java from 8.0.13 to 8.0.14 (#4599) Bumps [mysql-connector-java](https://github.com/mysql/mysql-connector-j) from 8.0.13 to 8.0.14. - [Release notes](https://github.com/mysql/mysql-connector-j/releases) - [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.0/CHANGES) - [Commits](https://github.com/mysql/mysql-connector-j/compare/8.0.13...8.0.14) Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5f902290771..94a5e380cab 100644 --- a/build.gradle +++ b/build.gradle @@ -120,7 +120,7 @@ dependencies { antlr4 'org.antlr:antlr4:4.7.2' compile 'org.antlr:antlr4-runtime:4.7.2' - compile 'mysql:mysql-connector-java:8.0.13' + compile 'mysql:mysql-connector-java:8.0.14' compile 'org.postgresql:postgresql:42.2.5' From 701e73d545e9879163438a95ba9ceb6a33eddb48 Mon Sep 17 00:00:00 2001 From: Aleksandrs Gusevs Date: Tue, 22 Jan 2019 13:28:24 +0200 Subject: [PATCH 02/20] Solution for submitting dialog with Ctrl + Enter (#4496) (#4592) * Issue#4496 Added default action invocation in dialog when pressing ctrl+enter * Issue#4496 Added changelog regarding changes made --- CHANGELOG.md | 1 + .../org/jabref/gui/keyboard/KeyBinding.java | 1 + .../java/org/jabref/gui/util/BaseDialog.java | 17 +++++++++++++++++ src/main/resources/l10n/JabRef_en.properties | 2 ++ 4 files changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce2410787c6..9c29a663c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - We added the ability to have an export preference where previously "File"-->"Export"/"Export selected entries" would not save the user's preference[#4495](https://github.com/JabRef/jabref/issues/4495) - We added the ability to add field names from the Preferences Dialog [#4546](https://github.com/JabRef/jabref/issues/4546) - We added the ability change the column widths directly in the main table. [#4546](https://github.com/JabRef/jabref/issues/4546) +- We added the ability to execute default action in dialog by using with Ctrl + Enter combination [#4496](https://github.com/JabRef/jabref/issues/4496) diff --git a/src/main/java/org/jabref/gui/keyboard/KeyBinding.java b/src/main/java/org/jabref/gui/keyboard/KeyBinding.java index cd6f1c67613..b73fbc6b0c3 100644 --- a/src/main/java/org/jabref/gui/keyboard/KeyBinding.java +++ b/src/main/java/org/jabref/gui/keyboard/KeyBinding.java @@ -25,6 +25,7 @@ public enum KeyBinding { ENTRY_EDITOR_PREVIOUS_PANEL_2("Entry editor, previous panel 2", Localization.lang("Entry editor, previous panel 2"), "ctrl+MINUS", KeyBindingCategory.VIEW), DECREASE_TABLE_FONT_SIZE("Decrease table font size", Localization.lang("Decrease table font size"), "ctrl+MINUS", KeyBindingCategory.VIEW), DELETE_ENTRY("Delete entry", Localization.lang("Delete entry"), "DELETE", KeyBindingCategory.BIBTEX), + DEFAULT_DIALOG_ACTION("Execute default action in dialog", Localization.lang("Execute default action in dialog"), "ctrl+ENTER", KeyBindingCategory.VIEW), DOWNLOAD_FULL_TEXT("Look up full text documents", Localization.lang("Look up full text documents"), "alt+F7", KeyBindingCategory.QUALITY), EDIT_ENTRY("Edit entry", Localization.lang("Edit entry"), "ctrl+E", KeyBindingCategory.BIBTEX), EDIT_STRINGS("Edit strings", Localization.lang("Edit strings"), "ctrl+T", KeyBindingCategory.BIBTEX), diff --git a/src/main/java/org/jabref/gui/util/BaseDialog.java b/src/main/java/org/jabref/gui/util/BaseDialog.java index 59f6e034e3b..a05eb2862ce 100644 --- a/src/main/java/org/jabref/gui/util/BaseDialog.java +++ b/src/main/java/org/jabref/gui/util/BaseDialog.java @@ -1,5 +1,9 @@ package org.jabref.gui.util; +import java.util.Optional; + +import javafx.scene.control.Button; +import javafx.scene.control.ButtonType; import javafx.scene.control.Dialog; import javafx.scene.image.Image; import javafx.stage.Stage; @@ -16,6 +20,8 @@ protected BaseDialog() { KeyBindingRepository keyBindingRepository = Globals.getKeyPrefs(); if (keyBindingRepository.checkKeyCombinationEquality(KeyBinding.CLOSE, event)) { close(); + } else if (keyBindingRepository.checkKeyCombinationEquality(KeyBinding.DEFAULT_DIALOG_ACTION, event)) { + getDefaultButton().ifPresent(Button::fire); } }); @@ -24,6 +30,17 @@ protected BaseDialog() { Globals.getThemeLoader().installCss(getDialogPane().getScene(), Globals.prefs); } + private Optional