From 24cf3c829676efc7d254d58151208562c99ccf18 Mon Sep 17 00:00:00 2001
From: brapana <55059816+brapana@users.noreply.github.com>
Date: Mon, 7 Jun 2021 20:46:22 -0700
Subject: [PATCH 1/2] We added a select all button for the library import
function (issue 7786).
---
CHANGELOG.md | 1 +
.../java/org/jabref/gui/importer/ImportEntriesDialog.fxml | 1 +
.../java/org/jabref/gui/importer/ImportEntriesDialog.java | 7 +++++++
src/main/resources/l10n/JabRef_en.properties | 1 +
4 files changed, 10 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5419597820b..58cb688703e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We added a feature that allows the user to choose whether to trust the target site when unable to find a valid certification path from the file download site. [#7616](https://github.com/JabRef/jabref/issues/7616)
- We added a feature that allows the user to open all linked files of multiple selected entries by "Open file" option. [#6966](https://github.com/JabRef/jabref/issues/6966)
- We added a keybinding preset for new entries. [#7705](https://github.com/JabRef/jabref/issues/7705)
+- We added a select all button for the library import function. [#7786](https://github.com/JabRef/jabref/issues/7786)
### Changed
diff --git a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.fxml b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.fxml
index a38e76f43b1..d27fdfc7f6c 100644
--- a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.fxml
+++ b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.fxml
@@ -19,6 +19,7 @@
+
diff --git a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java
index 3cd706a19c8..412da71a0db 100644
--- a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java
+++ b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java
@@ -199,4 +199,11 @@ public void selectAllNewEntries() {
}
}
}
+
+ public void selectAllEntries() {
+ unselectAll();
+ for (BibEntry entry : entriesListView.getItems()) {
+ entriesListView.getCheckModel().check(entry);
+ }
+ }
}
diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties
index 0d5281b27a2..00be759725a 100644
--- a/src/main/resources/l10n/JabRef_en.properties
+++ b/src/main/resources/l10n/JabRef_en.properties
@@ -1869,6 +1869,7 @@ Cancel\ import=Cancel import
Continue\ with\ import=Continue with import
Import\ canceled=Import canceled
Select\ all\ new\ entries=Select all new entries
+Select\ all\ entries=Select all entries
Total\ items\ found\:=Total items found:
Selected\ items\:=Selected items:
Download\ linked\ online\ files=Download linked online files
From 3957a070ba38c22f55ba5a874adb40655e48333a Mon Sep 17 00:00:00 2001
From: brapana <55059816+brapana@users.noreply.github.com>
Date: Tue, 8 Jun 2021 14:29:35 -0700
Subject: [PATCH 2/2] Update selectAllEntries() to use .checkAll()
---
.../java/org/jabref/gui/importer/ImportEntriesDialog.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java
index 412da71a0db..770d0792659 100644
--- a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java
+++ b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java
@@ -202,8 +202,6 @@ public void selectAllNewEntries() {
public void selectAllEntries() {
unselectAll();
- for (BibEntry entry : entriesListView.getItems()) {
- entriesListView.getCheckModel().check(entry);
- }
+ entriesListView.getCheckModel().checkAll();
}
}