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

Set auto-update checkbox enable/disable when reading preferences #4446

Merged
merged 4 commits into from
Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where the list of XMP Exclusion fields in the preferences was not be saved [#4072](https://github.com/JabRef/jabref/issues/4072)
- We fixed an issue where the ArXiv Fetcher did not support HTTP URLs [koppor#328](https://github.com/koppor/jabref/issues/328)
- We fixed an issue where only one PDF file could be imported [#4422](https://github.com/JabRef/jabref/issues/4422)
- We fixed an issue where the preference checkbox for automatically updating the timestamp wasn't properly enabled [#4427](https://github.com/JabRef/jabref/issues/4427)



Expand Down
6 changes: 4 additions & 2 deletions src/main/java/org/jabref/gui/preferences/GeneralTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.time.format.DateTimeFormatter;

import javafx.collections.FXCollections;
import javafx.event.ActionEvent;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
Expand Down Expand Up @@ -138,6 +139,7 @@ public void setValues() {
useOwner.setSelected(prefs.getBoolean(JabRefPreferences.USE_OWNER));
overwriteOwner.setSelected(prefs.getBoolean(JabRefPreferences.OVERWRITE_OWNER));
useTimeStamp.setSelected(prefs.getBoolean(JabRefPreferences.USE_TIME_STAMP));
useTimeStamp.getOnAction().handle(new ActionEvent()); // pretend we just clicked on the checkbox so it updates the UI
sbeitzel marked this conversation as resolved.
Show resolved Hide resolved
overwriteTimeStamp.setSelected(prefs.getBoolean(JabRefPreferences.OVERWRITE_TIME_STAMP));
updateTimeStamp.setSelected(prefs.getBoolean(JabRefPreferences.UPDATE_TIMESTAMP));
updateTimeStamp.setSelected(useTimeStamp.isSelected());
sbeitzel marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -182,9 +184,9 @@ public void storeSettings() {
// Update name of the time stamp field based on preferences
InternalBibtexFields.updateTimeStampField(prefs.get(JabRefPreferences.TIME_STAMP_FIELD));
prefs.setDefaultEncoding(encodings.getValue());
prefs.putBoolean(JabRefPreferences.BIBLATEX_DEFAULT_MODE, biblatexMode.getValue().equals(BibDatabaseMode.BIBLATEX));
prefs.putBoolean(JabRefPreferences.BIBLATEX_DEFAULT_MODE, biblatexMode.getValue() == BibDatabaseMode.BIBLATEX);

if (!languageSelection.getValue().equals(prefs.getLanguage())) {
if (languageSelection.getValue() != prefs.getLanguage()) {
prefs.setLanguage(languageSelection.getValue());
Localization.setLanguage(languageSelection.getValue());

Expand Down