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

Changes string representation when detecting custom entry types. #5741

Merged
merged 2 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -74,6 +74,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where renaming referenced files for bib entries with long titles was not possible. [#5603](https://github.com/JabRef/jabref/issues/5603)
- We fixed an issue where a window which is on an external screen gets unreachable when external screen is removed. [#5037](https://github.com/JabRef/jabref/issues/5037)
- We fixed a bug where the selection of groups was lost after drag and drop. [#2868](https://github.com/JabRef/jabref/issues/2868)
- We fixed an issue where the custom entry types didn't show the correct display name [#5651](https://github.com/JabRef/jabref/issues/5651)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<children>
<Label text="%Custom entry types found in file" />
<Label text="%Select all customized types to be stored in local preferences:" />
<Label text="%Currently unknown:" />
<CheckListView fx:id="unknownEntryTypesCheckList" />
<VBox fx:id="boxDifferentCustomization">
<children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import javafx.beans.binding.Bindings;
import javafx.fxml.FXML;
import javafx.scene.control.ButtonType;
import javafx.scene.control.cell.CheckBoxListCell;
import javafx.scene.layout.VBox;

import org.jabref.gui.util.BaseDialog;
Expand Down Expand Up @@ -50,10 +51,16 @@ public ImportCustomEntryTypesDialog(BibDatabaseMode mode, List<BibEntryType> cus
@FXML
public void initialize() {
viewModel = new ImportCustomEntryTypesDialogViewModel(mode, customEntryTypes, preferencesService);

boxDifferentCustomization.visibleProperty().bind(Bindings.isNotEmpty(viewModel.differentCustomizations()));
boxDifferentCustomization.managedProperty().bind(Bindings.isNotEmpty(viewModel.differentCustomizations()));
unknownEntryTypesCheckList.setItems(viewModel.newTypes());
unknownEntryTypesCheckList.setCellFactory(listView -> new CheckBoxListCell<>(unknownEntryTypesCheckList::getItemBooleanProperty) {
@Override
public void updateItem(BibEntryType bibEntryType, boolean empty) {
super.updateItem(bibEntryType, empty);
setText(bibEntryType == null ? "" : bibEntryType.getType().getDisplayName());
}
});
differentCustomizationCheckList.setItems(viewModel.differentCustomizations());
}

Expand Down