Skip to content

Commit

Permalink
Changes string representation when detecting custom entry types. (#5741)
Browse files Browse the repository at this point in the history
* Changes string representation in ImportCustomEntryTypesDialog and removes unnecessary label on ImportCustomEntryTypesDialog.fxml

* updates CHANGELOG.MD
  • Loading branch information
José Jesús Sinohui Fernández authored and Siedlerchr committed Dec 13, 2019
1 parent 0a9d281 commit aacceb5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
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

0 comments on commit aacceb5

Please sign in to comment.