diff --git a/CHANGELOG.md b/CHANGELOG.md index aa487a1574a..178ffb528f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,6 +93,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where recently opened files were not displayed in the main menu properly. [#9042](https://github.com/JabRef/jabref/issues/9042) - We fixed an issue where the DOI lookup would show an error when a DOI was found for an entry. [#11850](https://github.com/JabRef/jabref/issues/11850) - We fixed an issue where Tab cannot be used to jump to next field in some single-line fields. [#11785](https://github.com/JabRef/jabref/issues/11785) +- We fixed an issue where the "Do not ask again" checkbox was not working, when asking for permission to use Grobid. ### Removed diff --git a/src/main/java/org/jabref/gui/importer/GrobidPreferenceDialogHelper.java b/src/main/java/org/jabref/gui/importer/GrobidPreferenceDialogHelper.java index 8d391f895f0..298bbc0ea26 100644 --- a/src/main/java/org/jabref/gui/importer/GrobidPreferenceDialogHelper.java +++ b/src/main/java/org/jabref/gui/importer/GrobidPreferenceDialogHelper.java @@ -7,27 +7,27 @@ /** * Metadata extraction from PDFs and plaintext works very well using Grobid, but we do not want to enable it by default * due to data privacy concerns. - * To make users aware of the feature, we ask each time before querying Grobid, giving the option to opt-out. + * To make users aware of the feature, we ask before querying Grobid, saving the users' preference for the future. */ public class GrobidPreferenceDialogHelper { /** - * If Grobid is not enabled but the user has not explicitly opted-out of Grobid, we ask for permission to send data - * to Grobid by using a dialog and giving an explicit 'save preference' option. + * If the user has not explicitly opted-in/out of Grobid, we ask for permission to send data to Grobid by using + * a dialog. The users' preference is saved. * * @param dialogService the DialogService to use - * @return if the user enabled Grobid, either in the past or after being asked by the dialog, save preference - * if specified. + * @return if the user enabled Grobid, either in the past or after being asked by the dialog. */ public static boolean showAndWaitIfUserIsUndecided(DialogService dialogService, GrobidPreferences preferences) { if (preferences.isGrobidPreference()) { return preferences.isGrobidEnabled(); } - boolean grobidEnabled = dialogService.showConfirmationDialogWithOptOutAndWait( + boolean grobidEnabled = dialogService.showConfirmationDialogAndWait( Localization.lang("Remote services"), Localization.lang("Allow sending PDF files and raw citation strings to a JabRef online service (Grobid) to determine Metadata. This produces better results."), - Localization.lang("Save Preference"), - preferences::setGrobidPreference); + Localization.lang("Yes"), + Localization.lang("No")); + preferences.setGrobidPreference(true); preferences.setGrobidEnabled(grobidEnabled); return grobidEnabled; }