From 7236581748d15f6189f5d44dda6eadd4f12f5124 Mon Sep 17 00:00:00 2001 From: Kai Takac Date: Wed, 13 Nov 2019 19:43:07 +0100 Subject: [PATCH 01/13] =?UTF-8?q?Add=20switch=20to=20change=20from=20bibla?= =?UTF-8?q?tex=20to=20bibtex=20and=20vice=20versa=20(fi=E2=80=A6=20(#5565)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 + .../gui/cleanup/CleanupPresetPanel.java | 3 +- .../cleanup/FieldFormatterCleanupsPanel.java | 28 ++++++------- .../LibraryPropertiesDialog.fxml | 40 ++++++++++++------- .../LibraryPropertiesDialogView.java | 12 ++++-- .../LibraryPropertiesDialogViewModel.java | 17 ++++++++ .../org/jabref/model/metadata/MetaData.java | 4 ++ src/main/resources/l10n/JabRef_en.properties | 8 ++-- 8 files changed, 75 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17873d43bf5c..9ba3e1109e71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - The entry editor is now open by default when JabRef starts up. [#5460](https://github.com/JabRef/jabref/issues/5460) - We added a new ADS fetcher to use the new ADS API [#4949](https://github.com/JabRef/jabref/issues/4949) - We added support of the [X11 primary selection](https://unix.stackexchange.com/a/139193/18033) [#2389](https://github.com/JabRef/jabref/issues/2389) +- We added support to switch between biblatex and bibtex library types. [#5550](https://github.com/JabRef/jabref/issues/5550) +- We changed the save action buttons to be easier to understand. [#5565](https://github.com/JabRef/jabref/issues/5565) - We made the columns for groups, files and uri in the main table reorderable and merged the clickable icon columns for uri, url, doi and eprint. [#5544](https://github.com/JabRef/jabref/pull/5544) ### Fixed diff --git a/src/main/java/org/jabref/gui/cleanup/CleanupPresetPanel.java b/src/main/java/org/jabref/gui/cleanup/CleanupPresetPanel.java index 719c11bc2672..563fb7ac9e40 100644 --- a/src/main/java/org/jabref/gui/cleanup/CleanupPresetPanel.java +++ b/src/main/java/org/jabref/gui/cleanup/CleanupPresetPanel.java @@ -12,7 +12,6 @@ import javafx.scene.layout.VBox; import org.jabref.logic.cleanup.CleanupPreset; -import org.jabref.logic.cleanup.Cleanups; import org.jabref.logic.l10n.Localization; import org.jabref.model.database.BibDatabaseContext; import org.jabref.model.entry.field.StandardField; @@ -64,7 +63,7 @@ private void init(CleanupPreset cleanupPreset, FilePreferences filePreferences) cleanUpUpgradeExternalLinks.setText(Localization.lang("Upgrade external PDF/PS links to use the '%0' field.", StandardField.FILE.getDisplayName())); - cleanUpFormatters = new FieldFormatterCleanupsPanel(Localization.lang("Run field formatter:"), Cleanups.DEFAULT_SAVE_ACTIONS); + cleanUpFormatters = new FieldFormatterCleanupsPanel(Localization.lang("Run field formatter:")); formatterContainer.getChildren().setAll(cleanUpFormatters); String currentPattern = Localization.lang("Filename format pattern") diff --git a/src/main/java/org/jabref/gui/cleanup/FieldFormatterCleanupsPanel.java b/src/main/java/org/jabref/gui/cleanup/FieldFormatterCleanupsPanel.java index 23917990ebec..7ef6dfc4d566 100644 --- a/src/main/java/org/jabref/gui/cleanup/FieldFormatterCleanupsPanel.java +++ b/src/main/java/org/jabref/gui/cleanup/FieldFormatterCleanupsPanel.java @@ -42,7 +42,6 @@ public class FieldFormatterCleanupsPanel extends GridPane { private static final String DESCRIPTION = Localization.lang("Description") + ": "; private final CheckBox cleanupEnabled; - private final FieldFormatterCleanups defaultFormatters; private final List availableFormatters; private FieldFormatterCleanups fieldFormatterCleanups; private ListView actionsList; @@ -50,13 +49,12 @@ public class FieldFormatterCleanupsPanel extends GridPane { private ComboBox selectFieldCombobox; private Button addButton; private Label descriptionAreaText; - private Button removeButton; - private Button resetButton; + private Button removeSelectedButton; + private Button removeAllButton; private Button recommendButton; private ObservableList actions; - public FieldFormatterCleanupsPanel(String description, FieldFormatterCleanups defaultFormatters) { - this.defaultFormatters = Objects.requireNonNull(defaultFormatters); + public FieldFormatterCleanupsPanel(String description) { cleanupEnabled = new CheckBox(description); availableFormatters = Cleanups.getBuiltInFormatters(); availableFormatters.add(new ProtectTermsFormatter(Globals.protectedTermsLoader)); @@ -110,12 +108,12 @@ private void buildLayout() { .install(actionsList); add(actionsList, 1, 1, 3, 1); - resetButton = new Button(Localization.lang("Reset")); - resetButton.setOnAction(e -> actions.setAll(defaultFormatters.getConfiguredActions())); + removeAllButton = new Button(Localization.lang("Remove all")); + removeAllButton.setOnAction(e -> actions.clear()); BibDatabaseContext databaseContext = JabRefGUI.getMainFrame().getCurrentBasePanel().getBibDatabaseContext(); - recommendButton = new Button(Localization.lang("Recommended for %0", databaseContext.getMode().getFormattedName())); + recommendButton = new Button(Localization.lang("Reset to recommended")); boolean isBiblatex = databaseContext.isBiblatexMode(); recommendButton.setOnAction(e -> { @@ -126,14 +124,14 @@ private void buildLayout() { } }); - removeButton = new Button(Localization.lang("Remove selected")); - removeButton.setOnAction(e -> actions.remove(actionsList.getSelectionModel().getSelectedItem())); + removeSelectedButton = new Button(Localization.lang("Remove selected")); + removeSelectedButton.setOnAction(e -> actions.remove(actionsList.getSelectionModel().getSelectedItem())); descriptionAreaText = new Label(DESCRIPTION); descriptionAreaText.setWrapText(true); - add(removeButton, 3, 2, 1, 1); - add(resetButton, 1, 2, 1, 1); - add(recommendButton, 2, 2, 1, 1); + add(recommendButton, 1, 2, 1, 1); + add(removeSelectedButton, 2, 2, 1, 1); + add(removeAllButton, 3, 2, 1, 1); add(getSelectorPanel(), 1, 3, 3, 1); add(descriptionAreaText, 1, 4, 3, 1); @@ -234,8 +232,8 @@ private void setStatus(boolean status) { selectFieldCombobox.setDisable(!status); formattersCombobox.setDisable(!status); addButton.setDisable(!status); - removeButton.setDisable(!status); - resetButton.setDisable(!status); + removeSelectedButton.setDisable(!status); + removeAllButton.setDisable(!status); recommendButton.setDisable(!status); } diff --git a/src/main/java/org/jabref/gui/libraryproperties/LibraryPropertiesDialog.fxml b/src/main/java/org/jabref/gui/libraryproperties/LibraryPropertiesDialog.fxml index 76aa87d595cd..12f7febeb966 100644 --- a/src/main/java/org/jabref/gui/libraryproperties/LibraryPropertiesDialog.fxml +++ b/src/main/java/org/jabref/gui/libraryproperties/LibraryPropertiesDialog.fxml @@ -1,17 +1,9 @@ - - - - - - - - - - - - + + + + @@ -22,7 +14,7 @@ - + @@ -32,8 +24,26 @@ -