From 466772beb0182b5af5d764dbdca0e8563a650903 Mon Sep 17 00:00:00 2001 From: Grzegorz Date: Sun, 26 Apr 2020 21:12:32 +0200 Subject: [PATCH 1/2] Fix wrong button order (Apply and Cancel) in ManageProtectedTermsDialog. --- CHANGELOG.md | 1 + .../gui/protectedterms/ManageProtectedTermsDialog.fxml | 2 +- .../gui/protectedterms/ManageProtectedTermsDialog.java | 9 +++------ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66e4e2f17e1..41928651314 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve ### Fixed +- We fixed wrong button order (Apply and Cancel) in ManageProtectedTermsDialog. - We greatly improved the performance of the overall application and many operations. [#5071](https://github.com/JabRef/jabref/issues/5071) - We fixed an issue where sort by priority was broken. [#6222](https://github.com/JabRef/jabref/issues/6222) - We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939) diff --git a/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.fxml b/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.fxml index 0b23bc0ccaf..86ddafad7c5 100644 --- a/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.fxml +++ b/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.fxml @@ -31,6 +31,6 @@ + - diff --git a/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.java b/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.java index 474304d2383..7309f75a6f1 100644 --- a/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.java +++ b/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.java @@ -3,12 +3,9 @@ import javax.inject.Inject; import javafx.fxml.FXML; -import javafx.scene.control.ButtonType; -import javafx.scene.control.ContextMenu; -import javafx.scene.control.MenuItem; -import javafx.scene.control.TableColumn; -import javafx.scene.control.TableView; +import javafx.scene.control.*; import javafx.scene.control.cell.CheckBoxTableCell; +import javafx.scene.control.ButtonBar.ButtonData; import org.jabref.gui.DialogService; import org.jabref.gui.icon.IconTheme; @@ -48,7 +45,7 @@ public ManageProtectedTermsDialog() { .setAsDialogPane(this); setResultConverter(button -> { - if (button == ButtonType.APPLY) { + if (button.getButtonData() == ButtonData.OK_DONE) { viewModel.save(); } return null; From 51e2bdacaf20bc7406a8d7b967527c1b50483a5f Mon Sep 17 00:00:00 2001 From: Grzegorz Date: Mon, 27 Apr 2020 00:10:59 +0200 Subject: [PATCH 2/2] Fix code style. Change button text 'Apply' to 'Save'. --- .../gui/protectedterms/ManageProtectedTermsDialog.fxml | 2 +- .../gui/protectedterms/ManageProtectedTermsDialog.java | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.fxml b/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.fxml index 86ddafad7c5..8afa8a733c1 100644 --- a/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.fxml +++ b/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.fxml @@ -31,6 +31,6 @@ - + diff --git a/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.java b/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.java index 7309f75a6f1..74cff7197ae 100644 --- a/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.java +++ b/src/main/java/org/jabref/gui/protectedterms/ManageProtectedTermsDialog.java @@ -3,9 +3,12 @@ import javax.inject.Inject; import javafx.fxml.FXML; -import javafx.scene.control.*; +import javafx.scene.control.ButtonBar; +import javafx.scene.control.ContextMenu; +import javafx.scene.control.MenuItem; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; import javafx.scene.control.cell.CheckBoxTableCell; -import javafx.scene.control.ButtonBar.ButtonData; import org.jabref.gui.DialogService; import org.jabref.gui.icon.IconTheme; @@ -45,7 +48,7 @@ public ManageProtectedTermsDialog() { .setAsDialogPane(this); setResultConverter(button -> { - if (button.getButtonData() == ButtonData.OK_DONE) { + if (button.getButtonData() == ButtonBar.ButtonData.OK_DONE) { viewModel.save(); } return null;