Skip to content

Commit

Permalink
Merge branch 'main' into addPmid
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus authored Jul 18, 2024
2 parents 99449a0 + 714abd1 commit 6c285f8
Show file tree
Hide file tree
Showing 17 changed files with 9 additions and 31 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
### Changed

- The Pubmed/Medline Plain importer now imports the PMID field as well [#11488](https://github.com/JabRef/jabref/issues/11488)
- The 'Check for updates' menu bar button is now always enabled. [#11485](https://github.com/JabRef/jabref/pull/11485)
- JabRef respects the [configuration for storing files relative to the .bib file](https://docs.jabref.org/finding-sorting-and-cleaning-entries/filelinks#directories-for-files) in more cases. [#11492](https://github.com/JabRef/jabref/pull/11492)

### Fixed

- We fixed an issue where the 'Check for updates' preference was not saved. [#11485](https://github.com/JabRef/jabref/pull/11485)
- We fixed an issue where an exception was thrown after changing "show preview as a tab" in the preferences. [#11509](https://github.com/JabRef/jabref/pull/11509)

### Removed
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/jabref/gui/help/SearchForUpdateAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public SearchForUpdateAction(PreferencesService preferencesService,
this.preferencesService = preferencesService;
this.dialogService = dialogService;
this.taskExecutor = taskExecutor;

this.executable.bind(preferencesService.getInternalPreferences().versionCheckEnabledProperty());
}

@Override
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/org/jabref/gui/help/VersionWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,13 @@ private Optional<Version> getNewVersion() throws IOException {
}

public void checkForNewVersionAsync() {
if (!internalPreferences.isVersionCheckEnabled()) {
return;
}

BackgroundTask.wrap(this::getNewVersion)
.onSuccess(version -> showUpdateInfo(version, true))
.onFailure(exception -> showConnectionError(exception, true))
.executeWith(taskExecutor);
}

public void checkForNewVersionDelayed() {
if (!internalPreferences.isVersionCheckEnabled()) {
return;
}

BackgroundTask.wrap(this::getNewVersion)
.onSuccess(version -> showUpdateInfo(version, false))
.onFailure(exception -> showConnectionError(exception, false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@
import org.jabref.model.strings.StringUtil;
import org.jabref.model.util.FileUpdateMonitor;
import org.jabref.preferences.FilePreferences;
import org.jabref.preferences.InternalPreferences;
import org.jabref.preferences.LibraryPreferences;
import org.jabref.preferences.MergeDialogPreferences;
import org.jabref.preferences.PreferencesService;
import org.jabref.preferences.WorkspacePreferences;

Expand Down Expand Up @@ -93,7 +91,6 @@ public class GeneralTabViewModel implements PreferenceTabViewModel {
private final LibraryPreferences libraryPreferences;
private final FilePreferences filePreferences;
private final RemotePreferences remotePreferences;
private final MergeDialogPreferences mergeDialogPreferences;

private final Validator fontSizeValidator;
private final Validator customPathToThemeValidator;
Expand All @@ -102,8 +99,6 @@ public class GeneralTabViewModel implements PreferenceTabViewModel {
private final BooleanProperty remoteServerProperty = new SimpleBooleanProperty();
private final StringProperty remotePortProperty = new SimpleStringProperty("");
private final Validator remotePortValidator;
private final InternalPreferences internalPreferences;
private final BooleanProperty versionCheckProperty = new SimpleBooleanProperty();
private final FileUpdateMonitor fileUpdateMonitor;
private final BibEntryTypesManager entryTypesManager;
private final TrustStoreManager trustStoreManager;
Expand All @@ -115,8 +110,6 @@ public GeneralTabViewModel(DialogService dialogService, PreferencesService prefe
this.libraryPreferences = preferences.getLibraryPreferences();
this.filePreferences = preferences.getFilePreferences();
this.remotePreferences = preferences.getRemotePreferences();
this.internalPreferences = preferences.getInternalPreferences();
this.mergeDialogPreferences = preferences.getMergeDialogPreferences();
this.fileUpdateMonitor = fileUpdateMonitor;
this.entryTypesManager = entryTypesManager;

Expand Down Expand Up @@ -246,8 +239,6 @@ public void storeSettings() {
}
});

internalPreferences.setVersionCheckEnabled(versionCheckProperty.getValue());

getPortAsInt(remotePortProperty.getValue()).ifPresent(newPort -> {
if (remotePreferences.isDifferentPort(newPort)) {
remotePreferences.setPort(newPort);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<?import org.controlsfx.control.textfield.CustomPasswordField?>
<fx:root spacing="10.0" type="VBox" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.jabref.gui.preferences.network.NetworkTab">
<Label styleClass="titleHeader" text="%Network" />
<CheckBox fx:id="versionCheck" text="%Check for latest version online"/>
<CheckBox fx:id="versionCheck" text="%Check for updates on startup"/>
<Label text="%If you encounter an issue or a bug, please check the latest version, whether the issue is still present." wrapText="true"/>

<Label styleClass="sectionHeader" text="%Proxy configuration" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ private void setSSLValues() {

@Override
public void storeSettings() {
internalPreferences.setVersionCheckEnabled(versionCheckProperty.getValue());
proxyPreferences.setUseProxy(proxyUseProperty.getValue());
proxyPreferences.setHostname(proxyHostnameProperty.getValue().trim());
proxyPreferences.setPort(proxyPortProperty.getValue().trim());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/logic/util/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public Optional<Version> shouldBeUpdatedTo(List<Version> availableVersions) {
Optional<Version> newerVersion = Optional.empty();
for (Version version : availableVersions) {
if (this.shouldBeUpdatedTo(version)
&& (!newerVersion.isPresent() || version.isNewerThan(newerVersion.get()))) {
&& (newerVersion.isEmpty() || version.isNewerThan(newerVersion.get()))) {
newerVersion = Optional.of(version);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/l10n/JabRef_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ Docs\ (This\ Year)=Dokumente (Dieses Jahr)
Incorrect\ ISSN\ format=Ungültiges ISSN-Format
Error\ accessing\ catalog=Fehler beim Katalogzugriff
Check\ for\ latest\ version\ online=Prüfe online auf die neueste Version
If\ you\ encounter\ an\ issue\ or\ a\ bug,\ please\ check\ the\ latest\ version,\ whether\ the\ issue\ is\ still\ present.=Wenn Sie auf ein Problem oder einen Fehler stoßen, testen Sie bitte die neueste Version und prüfen, ob das Problem noch vorhanden ist.
Keep\ both=Beide behalten
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ Docs\ (This\ Year)=Docs (This Year)
Incorrect\ ISSN\ format=Incorrect ISSN format
Error\ accessing\ catalog=Error accessing catalog

Check\ for\ latest\ version\ online=Check for latest version online
Check\ for\ updates\ on\ startup=Check for updates on startup
If\ you\ encounter\ an\ issue\ or\ a\ bug,\ please\ check\ the\ latest\ version,\ whether\ the\ issue\ is\ still\ present.=If you encounter an issue or a bug, please check the latest version, whether the issue is still present.

Keep\ both=Keep both
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/l10n/JabRef_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ Docs\ (This\ Year)=Documentos (Este Año)
Incorrect\ ISSN\ format=Formato ISSN incorrecto
Error\ accessing\ catalog=Error al acceder al catálogo
Check\ for\ latest\ version\ online=Busque la última versión en línea
Keep\ both=Mantener ambos
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/JabRef_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ Docs\ (This\ Year)=Documents (cette année)
Incorrect\ ISSN\ format=Format ISSN incorrect
Error\ accessing\ catalog=Erreur d'accès au catalogue

Check\ for\ latest\ version\ online=Vérifier en ligne la dernière version
Check\ for\ updates\ on\ startup=Vérifier les mises à jour au démarrage
If\ you\ encounter\ an\ issue\ or\ a\ bug,\ please\ check\ the\ latest\ version,\ whether\ the\ issue\ is\ still\ present.=Si vous rencontrez un problème ou un bug, veuillez vérifier que le problème est toujours présent avec la dernière version.

Keep\ both=Conserver les deux
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/JabRef_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ Docs\ (This\ Year)=Documenti (questo anno)
Incorrect\ ISSN\ format=Formato ISSN non corretto
Error\ accessing\ catalog=Errore nell'accedere al catalogo
Check\ for\ latest\ version\ online=Controlla l'ultima versione online
Check\ for\ updates\ on\ startup=Controlla gli aggiornamenti all'avvio
If\ you\ encounter\ an\ issue\ or\ a\ bug,\ please\ check\ the\ latest\ version,\ whether\ the\ issue\ is\ still\ present.=Se si verifica un problema o un bug, si prega di controllare l'ultima versione, se il problema è ancora presente.
Keep\ both=Mantieni entrambi
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/l10n/JabRef_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ Docs\ (This\ Year)=Documentatie (Dit Jaar)
Incorrect\ ISSN\ format=Onjuist ISSN-formaat
Error\ accessing\ catalog=Fout bij toegang tot catalogus
Check\ for\ latest\ version\ online=Controleer op de nieuwste online versie
Keep\ both=Beide behouden
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/JabRef_pl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ Docs\ (This\ Year)=Dokumenty (bieżący rok)
Incorrect\ ISSN\ format=Nieprawidłowy format ISSN
Error\ accessing\ catalog=Błąd dostępu do katalogu
Check\ for\ latest\ version\ online=Sprawdź najnowszą wersję online
Check\ for\ updates\ on\ startup=Sprawdź aktualizacje przy starcie
If\ you\ encounter\ an\ issue\ or\ a\ bug,\ please\ check\ the\ latest\ version,\ whether\ the\ issue\ is\ still\ present.=Jeśli napotkasz problem lub błąd, sprawdź w najnowszej wersję, czy problem nadal występuje.
Keep\ both=Zachowaj oba
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/l10n/JabRef_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ Docs\ (This\ Year)=Documentos (Neste Ano)
Incorrect\ ISSN\ format=Formato de ISSN incorreto
Error\ accessing\ catalog=Erro ao acessar catálogo
Check\ for\ latest\ version\ online=Verificar a versão mais recente on-line
If\ you\ encounter\ an\ issue\ or\ a\ bug,\ please\ check\ the\ latest\ version,\ whether\ the\ issue\ is\ still\ present.=Se você encontrar um problema ou um bug, verifique a versão mais recente, se o problema ainda está presente.
Keep\ both=Manter ambos
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/l10n/JabRef_tr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ Docs\ (This\ Year)=Belgeler (Bu Yıl)
Incorrect\ ISSN\ format=Yanlış ISSN biçemi
Error\ accessing\ catalog=Kataloğa erişimde hata
Check\ for\ latest\ version\ online=En son çevrimiçi sürümü kontrol et
If\ you\ encounter\ an\ issue\ or\ a\ bug,\ please\ check\ the\ latest\ version,\ whether\ the\ issue\ is\ still\ present.=Eğer bir sorun ya da yazılım hatasıyla karşılaşırsanız, hala var olup olmadığını en son sürümle kontrol ediniz.
Keep\ both=İkisini de tut
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/l10n/JabRef_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ h-index=h-index
Error\ while\ fetching\ journal\ information\:\ %0=获取期刊信息时出错: %0
Incorrect\ ISSN\ format=不正确的 ISSN 格式
Check\ for\ latest\ version\ online=在线检查最新版本
Keep\ both=保留全部
Expand Down

0 comments on commit 6c285f8

Please sign in to comment.