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

Improve preferences #4280

Merged
merged 10 commits into from
Aug 22, 2018
Merged

Improve preferences #4280

merged 10 commits into from
Aug 22, 2018

Conversation

tobiasdiez
Copy link
Member

Follow-up from #4253. Some code cleanup (mainly of the PreferencesDialog class) and stylistic facelifting:
image
It's still not perfect (especially some of the tabs are still looking horrible), but should be a step in the right direction.

Please merge and not squash.

  • 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?)

@tobiasdiez tobiasdiez added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 21, 2018
for (EntryType type : EntryTypes.getAllValues(mode)) {
textFields.put(type.getName().toLowerCase(Locale.ROOT), textFieldArray[y]);
y++;
}

Button help1 = new Button("?");
help1.setOnAction(e->new HelpAction(Localization.lang("Help on key patterns"), HelpFile.BIBTEX_KEY_PATTERN).getHelpButton().doClick());
Copy link
Member

Choose a reason for hiding this comment

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

You need to move this help and the reset all button beneath the loop, with rowindex+3 otherwise it will be somewhere in the middle because it still uses hardcoded value. That's what I discovered while fixing it in the other PR.

}

public void exportPreferences(Path file) throws JabRefException {
try (OutputStream os = new FileOutputStream(file.toFile())) {
Copy link
Member

Choose a reason for hiding this comment

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

Files.newOutputStream(path);

}

public void importPreferences(Path file) throws JabRefException {
try (InputStream is = new FileInputStream(file.toFile())) {
Copy link
Member

Choose a reason for hiding this comment

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

Files.newInputStream

@@ -1912,4 +1920,8 @@ public String getPreviewStyle() {
return Optional.empty();
}
}

Copy link
Member

Choose a reason for hiding this comment

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

No setter needed?

Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

Just some minor things

@tobiasdiez tobiasdiez merged commit 7714f73 into master Aug 22, 2018
@tobiasdiez tobiasdiez deleted the improvePrefs branch August 22, 2018 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants