From 96c60afa6e0355ed1172c55e770b511618cb3fd2 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Fri, 5 Aug 2016 17:00:44 +0200 Subject: [PATCH] Improved dialog --- .../net/sf/jabref/gui/openoffice/OpenOfficePanel.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java b/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java index 9b4aeab180c2..01049bfa9d9a 100644 --- a/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java +++ b/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java @@ -697,11 +697,13 @@ private boolean checkThatEntriesHaveKeys(List entries) { } // Ask if keys should be generated - int answer = JOptionPane.showConfirmDialog(this.frame, + String[] options = {Localization.lang("Generate keys"), Localization.lang("Cancel")}; + int answer = JOptionPane.showOptionDialog(this.frame, Localization.lang("Cannot cite entries without BibTeX keys. Generate keys now?"), - Localization.lang("Cite"), JOptionPane.YES_NO_OPTION); + Localization.lang("Cite"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, + null); BasePanel panel = frame.getCurrentBasePanel(); - if ((answer == JOptionPane.YES_OPTION) && (panel != null)) { + if ((answer == JOptionPane.OK_OPTION) && (panel != null)) { // Generate keys LabelPatternPreferences prefs = LabelPatternPreferences.fromPreferences(Globals.prefs); NamedCompound undoCompound = new NamedCompound(Localization.lang("Cite"));