Skip to content

Commit f2a31d0

Browse files
committed
replaced old swing dialog
1 parent 0444b6a commit f2a31d0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/main/java/org/jabref/gui/desktop/JabRefDesktop.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,9 @@ public static void openConsole(File file) throws IOException {
247247
} catch (IOException exception) {
248248
LOGGER.error("Open console", exception);
249249

250-
JOptionPane.showMessageDialog(null,
251-
Localization.lang("Error occured while executing the command \"%0\".", commandLoggingText),
252-
Localization.lang("Open console") + " - " + Localization.lang("Error"),
253-
JOptionPane.ERROR_MESSAGE);
250+
JabRefGUI.getMainFrame().getDialogService().showErrorDialogAndWait(
251+
Localization.lang("Open console") + " - " + Localization.lang("Error",
252+
Localization.lang("Error occured while executing the command \"%0\".", commandLoggingText)));
254253
}
255254
}
256255
}

src/main/java/org/jabref/gui/importer/actions/AppendDatabaseAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public void action() {
166166
for (Path file : filesToOpen) {
167167
// Run the actual open in a thread to prevent the program locking until the file is loaded.
168168
BackgroundTask.wrap(() -> openIt(file, dialog.importEntries(), dialog.importStrings(), dialog.importGroups(), dialog.importSelectorWords()))
169-
.onSuccess(fileName -> { dialogService.notify(Localization.lang("Imported from library") + " '" + fileName + "'");})
169+
.onSuccess(fileName -> dialogService.notify(Localization.lang("Imported from library") + " '" + fileName + "'"))
170170
.onFailure(exception -> {
171171
LOGGER.warn("Could not open database", exception);
172172
dialogService.showErrorDialogAndWait(Localization.lang("Open library"), exception);})

0 commit comments

Comments
 (0)