Skip to content

Commit

Permalink
Added <any file type> to the Import File Filter Dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
gerzmasn committed Feb 22, 2018
1 parent 01d3d4b commit 71fcea5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
## [Unreleased]

### Changed
- Added "*.*" (any file type) to the Import File Filter Dialog. [#3757] (https://github.com/JabRef/jabref/issues/3757)
- Abbreviate journal names functionality is now running parallel, increasing performance significantly. [#2831] (https://github.com/JabRef/jabref/issues/2831)
- Changed order of items in context menu [#298] (https://github.com/koppor/jabref/issues/298)
- Changed ID-based entry generator to store the last used fetcher. [#2796] (https://github.com/JabRef/jabref/issues/2796)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/importer/ImportFormats.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ public void actionPerformed(ActionEvent e) {
List<FileType> extensions = importers.stream().map(Importer::getFileType)
.collect(Collectors.toList());
FileChooser.ExtensionFilter allImports = FileFilterConverter.forAllImporters(importers);

FileDialogConfiguration fileDialogConfiguration = new FileDialogConfiguration.Builder()
.addExtensionFilter(allImports)
.addExtensionFilters(extensions)
.withInitialDirectory(Globals.prefs.get(JabRefPreferences.IMPORT_WORKING_DIRECTORY))
.build();
fileDialogConfiguration.getExtensionFilters().add(new FileChooser.ExtensionFilter("Any file", "*.*"));
DialogService dialogService = new FXDialogService();
DefaultTaskExecutor.runInJavaFXThread(() -> {
dialogService.showFileOpenDialog(fileDialogConfiguration)
Expand Down

0 comments on commit 71fcea5

Please sign in to comment.