Skip to content

Commit aacceb5

Browse files
jjsfernandezSiedlerchr
authored andcommitted
Changes string representation when detecting custom entry types. (#5741)
* Changes string representation in ImportCustomEntryTypesDialog and removes unnecessary label on ImportCustomEntryTypesDialog.fxml * updates CHANGELOG.MD
1 parent 0a9d281 commit aacceb5

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
7474
- 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)
7575
- 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)
7676
- We fixed a bug where the selection of groups was lost after drag and drop. [#2868](https://github.com/JabRef/jabref/issues/2868)
77+
- We fixed an issue where the custom entry types didn't show the correct display name [#5651](https://github.com/JabRef/jabref/issues/5651)
7778

7879
### Removed
7980

src/main/java/org/jabref/gui/importer/ImportCustomEntryTypesDialog.fxml

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<children>
1414
<Label text="%Custom entry types found in file" />
1515
<Label text="%Select all customized types to be stored in local preferences:" />
16-
<Label text="%Currently unknown:" />
1716
<CheckListView fx:id="unknownEntryTypesCheckList" />
1817
<VBox fx:id="boxDifferentCustomization">
1918
<children>

src/main/java/org/jabref/gui/importer/ImportCustomEntryTypesDialog.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import javafx.beans.binding.Bindings;
88
import javafx.fxml.FXML;
99
import javafx.scene.control.ButtonType;
10+
import javafx.scene.control.cell.CheckBoxListCell;
1011
import javafx.scene.layout.VBox;
1112

1213
import org.jabref.gui.util.BaseDialog;
@@ -50,10 +51,16 @@ public ImportCustomEntryTypesDialog(BibDatabaseMode mode, List<BibEntryType> cus
5051
@FXML
5152
public void initialize() {
5253
viewModel = new ImportCustomEntryTypesDialogViewModel(mode, customEntryTypes, preferencesService);
53-
5454
boxDifferentCustomization.visibleProperty().bind(Bindings.isNotEmpty(viewModel.differentCustomizations()));
5555
boxDifferentCustomization.managedProperty().bind(Bindings.isNotEmpty(viewModel.differentCustomizations()));
5656
unknownEntryTypesCheckList.setItems(viewModel.newTypes());
57+
unknownEntryTypesCheckList.setCellFactory(listView -> new CheckBoxListCell<>(unknownEntryTypesCheckList::getItemBooleanProperty) {
58+
@Override
59+
public void updateItem(BibEntryType bibEntryType, boolean empty) {
60+
super.updateItem(bibEntryType, empty);
61+
setText(bibEntryType == null ? "" : bibEntryType.getType().getDisplayName());
62+
}
63+
});
5764
differentCustomizationCheckList.setItems(viewModel.differentCustomizations());
5865
}
5966

0 commit comments

Comments
 (0)