From 1d189fbcc6b37650b6923c02ebe33868078ad73b Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 25 Dec 2022 21:01:13 +0100 Subject: [PATCH 1/6] Fix no context menu with sorting on all entries group (#9497) --- CHANGELOG.md | 2 +- src/main/java/org/jabref/gui/groups/GroupTreeView.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e976bf93ed0..862bb7770dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,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 diff --git a/src/main/java/org/jabref/gui/groups/GroupTreeView.java b/src/main/java/org/jabref/gui/groups/GroupTreeView.java index dabccd9204b..27225aa42ac 100644 --- a/src/main/java/org/jabref/gui/groups/GroupTreeView.java +++ b/src/main/java/org/jabref/gui/groups/GroupTreeView.java @@ -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); @@ -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()); From ed78e89c80ce7bfb47797fbc01777e680d05f1b0 Mon Sep 17 00:00:00 2001 From: Oldgram <54415356+Oldgram@users.noreply.github.com> Date: Sun, 25 Dec 2022 21:59:39 +0100 Subject: [PATCH 2/6] Add double click on preview style to add/remove from the selected list (#9498) --- CHANGELOG.md | 1 + .../gui/preferences/preview/PreviewTab.java | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 862bb7770dd..698e1bd20ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java b/src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java index fa7d3995d0e..10ff3bcf9aa 100644 --- a/src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java +++ b/src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java @@ -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)); @@ -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)); @@ -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(); + } + } } From 8f7f3bbf76bc66c1c0c7e66e1fbf9da7d61e89cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Dec 2022 16:33:31 +0100 Subject: [PATCH 3/6] Bump lucene-queries from 9.4.1 to 9.4.2 (#9499) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8e2e220b433..5b2583e1cda 100644 --- a/build.gradle +++ b/build.gradle @@ -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' From 251614a6a73a8c2135ec50f6888f7565a26d2ccd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Dec 2022 16:33:55 +0100 Subject: [PATCH 4/6] Bump org.beryx.jlink from 2.25.0 to 2.26.0 (#9500) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5b2583e1cda..61c4b91bf98 100644 --- a/build.gradle +++ b/build.gradle @@ -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 From 9b256338e4b0b617b0777edbd88fd8e630295acc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Dec 2022 16:34:20 +0100 Subject: [PATCH 5/6] Bump slf4j-api from 2.0.5 to 2.0.6 (#9501) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 61c4b91bf98..816c16a42e2 100644 --- a/build.gradle +++ b/build.gradle @@ -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" From bfcd0fee6c924fd272b921a68422aa5cf7658046 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Dec 2022 16:34:48 +0100 Subject: [PATCH 6/6] Bump classgraph from 4.8.152 to 4.8.153 (#9502) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 816c16a42e2..2705ddc1111 100644 --- a/build.gradle +++ b/build.gradle @@ -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'