Skip to content

Commit e33973a

Browse files
authored
Merge branch 'main' into chronological-navigation
2 parents 0559d11 + 4c64b0a commit e33973a

File tree

31 files changed

+121
-215
lines changed

31 files changed

+121
-215
lines changed

.github/workflows/sbom-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
Generated via Gradle task `cyclonedxBom` using the org.cyclonedx.bom plugin configured in the build.
5959
branch: chore/update-sbom
6060
delete-branch: true
61-
labels: "dev: dependencies""
61+
labels: "dev: dependencies"
6262
add-paths: |
6363
bom.json
6464
bom.xml

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,15 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
128128
- We fixed an issue where "Copy to" was enabled even if no other library was opened. [#13280](https://github.com/JabRef/jabref/pull/13280)
129129
- We fixed an issue where the groups were still displayed after closing all libraries. [#13382](https://github.com/JabRef/jabref/issues/13382)
130130
- Enhanced field selection logic in the Merge Entries dialog when fetching from DOI to prefer valid years and entry types. [#12549](https://github.com/JabRef/jabref/issues/12549)
131+
- We fixed an issue where the "Check Consistency" dialog is unresponsive. [#13700](https://github.com/JabRef/jabref/issues/13700)
131132
- We fixed an issue where opening the Three Way Merge dialog would throw an exception when year field contains an invalid year value. [#13673](https://github.com/JabRef/jabref/issues/13673)
132133
- We improved consistency in the Add Buttons. [#13791](https://github.com/JabRef/jabref/pull/13791)
133134
- We fixed an issue where theme or font size are not respected for all dialogs [#13558](https://github.com/JabRef/jabref/issues/13558)
134135
- We removed unnecessary spacing and margin in the AutomaticFieldEditor. [#13792](https://github.com/JabRef/jabref/pull/13792)
135136
- We fixed an issue where global search auto-completion only worked after switching tabs. [#11428](https://github.com/JabRef/jabref/issues/11428)
136137
- We fixed an issue where hierarchical keywords would only show the parent keyword in the entry editor. [#11390](https://github.com/JabRef/jabref/issues/11390)
138+
- We fixed an issue where some file choosers regarding LaTeX-aux files did not open in the directory of the last selected file. [#13861](https://github.com/JabRef/jabref/pull/13861)
139+
- We fixed an issue where the LaTeX file directory was not stored correctly in combination with the usage of groups from aux files. [#8344](https://github.com/JabRef/jabref/issues/8344)
137140

138141
### Removed
139142

jabgui/src/main/java/org/jabref/gui/auximport/FromAuxDialogViewModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void browse() {
8282
FileDialogConfiguration fileDialogConfiguration = new FileDialogConfiguration.Builder()
8383
.addExtensionFilter(StandardFileType.AUX)
8484
.withDefaultExtension(StandardFileType.AUX)
85-
.withInitialDirectory(preferences.getFilePreferences().getWorkingDirectory()).build();
85+
.withInitialDirectory(auxFileProperty.get() == null ? preferences.getFilePreferences().getWorkingDirectory().toString() : auxFileProperty.get()).build();
8686
dialogService.showFileOpenDialog(fileDialogConfiguration).ifPresent(file -> auxFileProperty.setValue(file.toAbsolutePath().toString()));
8787
}
8888

jabgui/src/main/java/org/jabref/gui/consistency/ConsistencyCheckAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public BibliographyConsistencyCheck.Result call() {
8282
});
8383
taskExecutor.execute(task);
8484

85-
dialogService.showProgressDialogAndWait(
85+
dialogService.showProgressDialog(
8686
Localization.lang("Check consistency"),
8787
Localization.lang("Checking consistency..."),
8888
task);

jabgui/src/main/java/org/jabref/gui/entryeditor/LatexCitationsTabViewModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public void setLatexDirectory() {
132132
.withInitialDirectory(directory.get()).build();
133133

134134
dialogService.showDirectorySelectionDialog(directoryDialogConfiguration).ifPresent(selectedDirectory ->
135-
currentDatabaseContext.getMetaData().setLatexFileDirectory(preferences.getFilePreferences().getUserAndHost(), selectedDirectory.toAbsolutePath()));
135+
currentDatabaseContext.getMetaData().setLatexFileDirectory(preferences.getFilePreferences().getUserAndHost(), selectedDirectory.toAbsolutePath().toString()));
136136

137137
checkAndUpdateDirectory();
138138
}

jabgui/src/main/java/org/jabref/gui/groups/GroupDialogViewModel.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ private void setupValidation() {
231231
return false;
232232
}
233233
return FileUtil.getFileExtension(input)
234-
.map("aux"::equalsIgnoreCase)
235-
.orElse(false);
234+
.map("aux"::equalsIgnoreCase)
235+
.orElse(false);
236236
}
237237
},
238238
ValidationMessage.error(Localization.lang("Please provide a valid aux file.")));
@@ -373,7 +373,9 @@ public AbstractGroup resultConverter(ButtonType button) {
373373
Path.of(texGroupFilePathProperty.getValue().trim()),
374374
new DefaultAuxParser(new BibDatabase()),
375375
fileUpdateMonitor,
376-
currentDatabase.getMetaData());
376+
currentDatabase.getMetaData(),
377+
preferences.getFilePreferences().getUserAndHost()
378+
);
377379
}
378380

379381
if (resultingGroup != null) {
@@ -485,9 +487,10 @@ public void texGroupBrowse() {
485487
FileDialogConfiguration fileDialogConfiguration = new FileDialogConfiguration.Builder()
486488
.addExtensionFilter(StandardFileType.AUX)
487489
.withDefaultExtension(StandardFileType.AUX)
488-
.withInitialDirectory(currentDatabase.getMetaData()
489-
.getLatexFileDirectory(preferences.getFilePreferences().getUserAndHost())
490-
.orElse(FileUtil.getInitialDirectory(currentDatabase, preferences.getFilePreferences().getWorkingDirectory()))).build();
490+
.withInitialDirectory(texGroupFilePathProperty.getValue().isBlank() ?
491+
currentDatabase.getMetaData()
492+
.getLatexFileDirectory(preferences.getFilePreferences().getUserAndHost())
493+
.orElse(FileUtil.getInitialDirectory(currentDatabase, preferences.getFilePreferences().getWorkingDirectory())).toString() : texGroupFilePathProperty.get()).build();
491494
dialogService.showFileOpenDialog(fileDialogConfiguration)
492495
.ifPresent(file -> texGroupFilePathProperty.setValue(
493496
FileUtil.relativize(file.toAbsolutePath(), getFileDirectoriesAsPaths()).toString()

jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void storeSettings() {
113113
if (latexFileDirectory.isEmpty()) {
114114
newMetaData.clearLatexFileDirectory(preferences.getFilePreferences().getUserAndHost());
115115
} else if (laTexFileDirectoryStatus().isValid()) {
116-
newMetaData.setLatexFileDirectory(preferences.getFilePreferences().getUserAndHost(), Path.of(latexFileDirectory));
116+
newMetaData.setLatexFileDirectory(preferences.getFilePreferences().getUserAndHost(), latexFileDirectory);
117117
}
118118

119119
databaseContext.setMetaData(newMetaData);
@@ -271,7 +271,8 @@ public void togglePath(StringProperty fileDirectory) {
271271
if (!currPath.isAbsolute()) {
272272
newPath = parentPath.resolve(fileDirectory.get()).toAbsolutePath().toString();
273273
} else if (currPath.isAbsolute()) {
274-
newPath = parentPath.relativize(currPath).toString();
274+
Path rel = parentPath.relativize(currPath);
275+
newPath = rel.toString().isEmpty() ? "." : rel.toString();
275276
} else {
276277
// case: convert to relative path and currPath is relative
277278
return;

jabgui/src/main/java/org/jabref/gui/shared/SharedDatabaseUIManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ private BibDatabaseContext getBibDatabaseContextForSharedDatabase() {
221221
preferences.getBibEntryPreferences().getKeywordSeparator(),
222222
preferences.getFieldPreferences(),
223223
preferences.getCitationKeyPatternPreferences().getKeyPatterns(),
224-
fileUpdateMonitor);
224+
fileUpdateMonitor,
225+
preferences.getFilePreferences().getUserAndHost());
225226
bibDatabaseContext.convertToSharedDatabase(synchronizer);
226227
return bibDatabaseContext;
227228
}

jablib/src/main/java/org/jabref/logic/exporter/MetaDataSerializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static Map<String, String> getSerializedStringMap(MetaData metaData,
5757
metaData.getUserFileDirectories().forEach((user, path) -> stringyMetaData
5858
.put(MetaData.FILE_DIRECTORY + '-' + user, List.of(path.trim())));
5959
metaData.getLatexFileDirectories().forEach((user, path) -> stringyMetaData
60-
.put(MetaData.FILE_DIRECTORY_LATEX + '-' + user, List.of(path.toString().trim())));
60+
.put(MetaData.FILE_DIRECTORY_LATEX + '-' + user, List.of(path.trim())));
6161
metaData.getVersionDBStructure().ifPresent(
6262
versionDBStructure -> stringyMetaData.put(MetaData.VERSION_DB_STRUCT, List.of(versionDBStructure.trim())));
6363
metaData.getBlgFilePaths().forEach((user, path) -> stringyMetaData.put(MetaData.BLG_FILE_PATH + "-" + user, List.of(path.toString().trim())));

jablib/src/main/java/org/jabref/logic/importer/ImportFormatPreferences.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.jabref.logic.importer;
22

3+
import org.jabref.logic.FilePreferences;
34
import org.jabref.logic.bibtex.FieldPreferences;
45
import org.jabref.logic.citationkeypattern.CitationKeyPatternPreferences;
56
import org.jabref.logic.importer.util.GrobidPreferences;
@@ -13,5 +14,6 @@ public record ImportFormatPreferences(
1314
FieldPreferences fieldPreferences,
1415
XmpPreferences xmpPreferences,
1516
DOIPreferences doiPreferences,
16-
GrobidPreferences grobidPreferences) {
17+
GrobidPreferences grobidPreferences,
18+
FilePreferences filePreferences) {
1719
}

0 commit comments

Comments
 (0)