Skip to content

Commit

Permalink
replaced old swing dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
r0light committed Apr 2, 2019
1 parent 0444b6a commit f2a31d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/main/java/org/jabref/gui/desktop/JabRefDesktop.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,9 @@ public static void openConsole(File file) throws IOException {
} catch (IOException exception) {
LOGGER.error("Open console", exception);

JOptionPane.showMessageDialog(null,
Localization.lang("Error occured while executing the command \"%0\".", commandLoggingText),
Localization.lang("Open console") + " - " + Localization.lang("Error"),
JOptionPane.ERROR_MESSAGE);
JabRefGUI.getMainFrame().getDialogService().showErrorDialogAndWait(
Localization.lang("Open console") + " - " + Localization.lang("Error",
Localization.lang("Error occured while executing the command \"%0\".", commandLoggingText)));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void action() {
for (Path file : filesToOpen) {
// Run the actual open in a thread to prevent the program locking until the file is loaded.
BackgroundTask.wrap(() -> openIt(file, dialog.importEntries(), dialog.importStrings(), dialog.importGroups(), dialog.importSelectorWords()))
.onSuccess(fileName -> { dialogService.notify(Localization.lang("Imported from library") + " '" + fileName + "'");})
.onSuccess(fileName -> dialogService.notify(Localization.lang("Imported from library") + " '" + fileName + "'"))
.onFailure(exception -> {
LOGGER.warn("Could not open database", exception);
dialogService.showErrorDialogAndWait(Localization.lang("Open library"), exception);})
Expand Down

0 comments on commit f2a31d0

Please sign in to comment.