-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Improve preferences #4280
Conversation
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()); |
There was a problem hiding this comment.
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())) { |
There was a problem hiding this comment.
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())) { |
There was a problem hiding this comment.
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(); | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No setter needed?
There was a problem hiding this 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
Follow-up from #4253. Some code cleanup (mainly of the PreferencesDialog class) and stylistic facelifting:
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.