diff --git a/lib/libreoffice.jar b/lib/libreoffice.jar index 36978d2fc5d..072f96ec432 100644 Binary files a/lib/libreoffice.jar and b/lib/libreoffice.jar differ diff --git a/src/main/java/org/jabref/gui/DialogService.java b/src/main/java/org/jabref/gui/DialogService.java index b8920fd70bb..34fb8994247 100644 --- a/src/main/java/org/jabref/gui/DialogService.java +++ b/src/main/java/org/jabref/gui/DialogService.java @@ -193,7 +193,7 @@ Optional showCustomButtonDialogAndWait(Alert.AlertType type, String * @param content message to show above the progress bar * @param task The {@link Task} which executes the work and for which to show the dialog */ - Optional showProgressDialogAndWait(String title, String content, Task task); + void showProgressDialog(String title, String content, Task task); /** * Constructs and shows a dialog showing the progress of running background tasks. diff --git a/src/main/java/org/jabref/gui/JabRefDialogService.java b/src/main/java/org/jabref/gui/JabRefDialogService.java index d1a190c4979..b431a21c70c 100644 --- a/src/main/java/org/jabref/gui/JabRefDialogService.java +++ b/src/main/java/org/jabref/gui/JabRefDialogService.java @@ -272,7 +272,7 @@ public Optional showCustomDialogAndWait(Dialog dialog) { } @Override - public Optional showProgressDialogAndWait(String title, String content, Task task) { + public void showProgressDialog(String title, String content, Task task) { ProgressDialog progressDialog = new ProgressDialog(task); progressDialog.setHeaderText(null); progressDialog.setTitle(title); @@ -288,12 +288,12 @@ public Optional showProgressDialogAndWait(String title, String content progressDialog.close(); }); themeLoader.installCss(progressDialog.getDialogPane().getScene(), preferences); - return progressDialog.showAndWait(); + progressDialog.show(); } @Override public Optional showBackgroundProgressDialogAndWait(String title, String content, StateManager stateManager) { - TaskProgressView taskProgressView = new TaskProgressView(); + TaskProgressView taskProgressView = new TaskProgressView<>(); EasyBind.listBind(taskProgressView.getTasks(), stateManager.getBackgroundTasks()); taskProgressView.setRetainTasks(false); taskProgressView.setGraphicFactory(BackgroundTask::getIcon); diff --git a/src/main/java/org/jabref/gui/WaitForSaveFinishedDialog.java b/src/main/java/org/jabref/gui/WaitForSaveFinishedDialog.java index f8758ab8e1e..954d3fe47b0 100644 --- a/src/main/java/org/jabref/gui/WaitForSaveFinishedDialog.java +++ b/src/main/java/org/jabref/gui/WaitForSaveFinishedDialog.java @@ -33,7 +33,7 @@ protected Void call() throws Exception { } }; - dialogService.showProgressDialogAndWait( + dialogService.showProgressDialog( Localization.lang("Please wait..."), Localization.lang("Waiting for save operation to finish") + "...", waitForSaveFinished diff --git a/src/main/java/org/jabref/gui/copyfiles/CopyFilesAction.java b/src/main/java/org/jabref/gui/copyfiles/CopyFilesAction.java index d3fa80e837c..943411735d4 100644 --- a/src/main/java/org/jabref/gui/copyfiles/CopyFilesAction.java +++ b/src/main/java/org/jabref/gui/copyfiles/CopyFilesAction.java @@ -51,7 +51,7 @@ public void execute() { Optional exportPath = dialogService.showDirectorySelectionDialog(dirDialogConfiguration); exportPath.ifPresent(path -> { Task> exportTask = new CopyFilesTask(database, entries, path); - dialogService.showProgressDialogAndWait( + dialogService.showProgressDialog( Localization.lang("Copy linked files to folder..."), Localization.lang("Copy linked files to folder..."), exportTask); diff --git a/src/main/java/org/jabref/gui/externalfiles/AutoLinkFilesAction.java b/src/main/java/org/jabref/gui/externalfiles/AutoLinkFilesAction.java index 11925e4550a..505137edc35 100644 --- a/src/main/java/org/jabref/gui/externalfiles/AutoLinkFilesAction.java +++ b/src/main/java/org/jabref/gui/externalfiles/AutoLinkFilesAction.java @@ -74,7 +74,7 @@ protected void succeeded() { } }; - dialogService.showProgressDialogAndWait( + dialogService.showProgressDialog( Localization.lang("Automatically setting file links"), Localization.lang("Searching for files"), linkFilesTask); diff --git a/src/main/java/org/jabref/gui/externalfiles/DownloadFullTextAction.java b/src/main/java/org/jabref/gui/externalfiles/DownloadFullTextAction.java index ba6dbaa4b2e..73bf06cce21 100644 --- a/src/main/java/org/jabref/gui/externalfiles/DownloadFullTextAction.java +++ b/src/main/java/org/jabref/gui/externalfiles/DownloadFullTextAction.java @@ -100,7 +100,7 @@ protected Map> call() { findFullTextsTask.setOnSucceeded(value -> downloadFullTexts(findFullTextsTask.getValue(), stateManager.getActiveDatabase().get())); - dialogService.showProgressDialogAndWait( + dialogService.showProgressDialog( Localization.lang("Download full text documents"), Localization.lang("Looking for full text document..."), findFullTextsTask); diff --git a/src/main/java/org/jabref/gui/integrity/IntegrityCheckAction.java b/src/main/java/org/jabref/gui/integrity/IntegrityCheckAction.java index d5956e9ed88..9d27b810daf 100644 --- a/src/main/java/org/jabref/gui/integrity/IntegrityCheckAction.java +++ b/src/main/java/org/jabref/gui/integrity/IntegrityCheckAction.java @@ -77,7 +77,7 @@ protected List call() { }); task.setOnFailed(event -> dialogService.showErrorDialogAndWait("Integrity check failed.")); - dialogService.showProgressDialogAndWait( + dialogService.showProgressDialog( Localization.lang("Checking integrity..."), Localization.lang("Checking integrity..."), task); diff --git a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java index 121581d90f5..b32482be50a 100644 --- a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java +++ b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java @@ -333,7 +333,7 @@ private void connectAutomatically() { connect(); } else { - Task taskConnectIfInstalled = new Task() { + Task taskConnectIfInstalled = new Task<>() { @Override protected Void call() throws Exception { @@ -350,7 +350,7 @@ protected Void call() throws Exception { taskConnectIfInstalled.setOnSucceeded(value -> connect()); taskConnectIfInstalled.setOnFailed(value -> dialogService.showErrorDialogAndWait(Localization.lang("Autodetection failed"), Localization.lang("Autodetection failed"), taskConnectIfInstalled.getException())); - dialogService.showProgressDialogAndWait(Localization.lang("Autodetecting paths..."), Localization.lang("Autodetecting paths..."), taskConnectIfInstalled); + dialogService.showProgressDialog(Localization.lang("Autodetecting paths..."), Localization.lang("Autodetecting paths..."), taskConnectIfInstalled); taskExecutor.execute(taskConnectIfInstalled); } } @@ -418,7 +418,7 @@ protected OOBibBase call() throws Exception { } }); - dialogService.showProgressDialogAndWait(Localization.lang("Autodetecting paths..."), Localization.lang("Autodetecting paths..."), connectTask); + dialogService.showProgressDialog(Localization.lang("Autodetecting paths..."), Localization.lang("Autodetecting paths..."), connectTask); taskExecutor.execute(connectTask); }