Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix-issue-#6448
Browse files Browse the repository at this point in the history
* upstream/main:
  Bump classgraph from 4.8.152 to 4.8.153 (#9502)
  Bump slf4j-api from 2.0.5 to 2.0.6 (#9501)
  Bump org.beryx.jlink from 2.25.0 to 2.26.0 (#9500)
  Bump lucene-queries from 9.4.1 to 9.4.2 (#9499)
  Add double click on preview style to add/remove from the selected list (#9498)
  Fix no context menu with sorting on all entries group (#9497)
  • Loading branch information
Siedlerchr committed Dec 26, 2022
2 parents 6d06c01 + bfcd0fe commit 7a3a57f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
### Added

- We added a dropdown menu to let users change the library they want to import into during import.[#6177](https://github.com/JabRef/jabref/issues/6177)
- We added the possibility to add/remove a preview style from the selected list using a double click [#9490](https://github.com/JabRef/jabref/issues/9490)



Expand All @@ -29,7 +30,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve

- The tab "deprecated fields" is shown in biblatex-mode only. [#7757](https://github.com/JabRef/jabref/issues/7757)
- We fixed an issue where the last opened libraries were not remembered when a new unsaved libray was open as well [#9190](https://github.com/JabRef/jabref/issues/9190)

- We fixed an issue where no context menu for the group "All entries" was present [forum#3682](https://discourse.jabref.org/t/how-sort-groups-a-z-not-subgroups/3682)

### Removed

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {

id 'org.openjfx.javafxplugin' version '0.0.13'

id 'org.beryx.jlink' version '2.25.0'
id 'org.beryx.jlink' version '2.26.0'

// nicer test outputs during running and completion
// Homepage: https://github.com/radarsh/gradle-test-logger-plugin
Expand Down Expand Up @@ -117,7 +117,7 @@ dependencies {

implementation 'org.apache.lucene:lucene-core:9.4.1'
implementation 'org.apache.lucene:lucene-queryparser:9.4.2'
implementation 'org.apache.lucene:lucene-queries:9.4.1'
implementation 'org.apache.lucene:lucene-queries:9.4.2'
implementation 'org.apache.lucene:lucene-analysis-common:9.4.2'
implementation 'org.apache.lucene:lucene-highlighter:9.4.2'

Expand Down Expand Up @@ -178,7 +178,7 @@ dependencies {
implementation 'org.jsoup:jsoup:1.15.3'
implementation 'com.konghq:unirest-java:3.14.1'

implementation 'org.slf4j:slf4j-api:2.0.5'
implementation 'org.slf4j:slf4j-api:2.0.6'
implementation "org.tinylog:tinylog-api:2.5.0"
implementation "org.tinylog:slf4j-tinylog:2.5.0"
implementation "org.tinylog:tinylog-impl:2.5.0"
Expand All @@ -204,7 +204,7 @@ dependencies {

implementation group: 'net.harawata', name: 'appdirs', version: '1.2.1'

testImplementation 'io.github.classgraph:classgraph:4.8.152'
testImplementation 'io.github.classgraph:classgraph:4.8.153'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
testImplementation 'org.junit.platform:junit-platform-launcher:1.9.1'

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/org/jabref/gui/groups/GroupTreeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ private ContextMenu createContextMenuForGroup(GroupNodeViewModel group) {
menu.getItems().clear();
if (viewModel.isEditable(group)) {
menu.getItems().add(editGroup);
if (group.getChildren().size() > 0 && viewModel.canAddGroupsIn(group)) {
if ((group.getChildren().size() > 0) && viewModel.canAddGroupsIn(group)) {
menu.getItems().add(removeGroupWithSubgroups);
menu.getItems().add(new SeparatorMenuItem());
menu.getItems().add(addSubgroup);
Expand All @@ -461,6 +461,11 @@ private ContextMenu createContextMenuForGroup(GroupNodeViewModel group) {
}
}
}
if (group.isRoot()) {
menu.getItems().add(addSubgroup);
menu.getItems().add(removeSubgroups);
menu.getItems().add(sortSubgroups);
}

if (viewModel.canAddEntriesIn(group)) {
menu.getItems().add(new SeparatorMenuItem());
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public void initialize() {
availableListView.setOnDragDetected(this::dragDetectedInAvailable);
availableListView.setOnDragDropped(event -> dragDropped(viewModel.availableListProperty(), event));
availableListView.setOnKeyTyped(event -> jumpToSearchKey(availableListView, event));
availableListView.setOnMouseClicked(this::mouseClickedAvailable);
availableListView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
availableListView.selectionModelProperty().getValue().selectedItemProperty().addListener((observable, oldValue, newValue) ->
viewModel.setPreviewLayout(newValue));
Expand All @@ -145,6 +146,7 @@ public void initialize() {
chosenListView.setOnDragDetected(this::dragDetectedInChosen);
chosenListView.setOnDragDropped(event -> dragDropped(viewModel.chosenListProperty(), event));
chosenListView.setOnKeyTyped(event -> jumpToSearchKey(chosenListView, event));
chosenListView.setOnMouseClicked(this::mouseClickedChosen);
chosenListView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
chosenListView.selectionModelProperty().getValue().selectedItemProperty().addListener((observable, oldValue, newValue) ->
viewModel.setPreviewLayout(newValue));
Expand Down Expand Up @@ -275,4 +277,18 @@ public void sortDownButtonAction() {
public void resetDefaultButtonAction() {
viewModel.resetDefaultLayout();
}

private void mouseClickedAvailable(MouseEvent event) {
if (event.getClickCount() == 2) {
viewModel.addToChosen();
event.consume();
}
}

private void mouseClickedChosen(MouseEvent event) {
if (event.getClickCount() == 2) {
viewModel.removeFromChosen();
event.consume();
}
}
}

0 comments on commit 7a3a57f

Please sign in to comment.