Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added <any file type> to the Import File Filter Dialog. #3764

Merged
merged 2 commits into from
Feb 23, 2018

Conversation

gerzmasn
Copy link
Contributor

@gerzmasn gerzmasn commented Feb 22, 2018

Added . (any file) to the File Filter Dialog. Now you can choose any file to import to try to import to your library. Fixes #3757.


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

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", "*.*"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could just wrap that "Any file" in Localization.lang, I would be happy.
Otherwise LGTM! 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Siedlerchr With this addition, is

public static FileChooser.ExtensionFilter forAllImporters(SortedSet<Importer> importers) {
return convertImporter(Localization.lang("Available import formats"), importers);
}

now obsolete?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a little difference, but you are in general right.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what exactly is the difference? Should we just remove the old one?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All available import formats = All supported file extension
Any file = Any extension not registered as default

@koppor koppor added the PE1718 label Feb 22, 2018
@Siedlerchr Siedlerchr merged commit fc5d250 into JabRef:master Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants