Skip to content

Commit

Permalink
Improved dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
oscargus committed Aug 5, 2016
1 parent d699420 commit 96c60af
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -697,11 +697,13 @@ private boolean checkThatEntriesHaveKeys(List<BibEntry> 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"));
Expand Down

0 comments on commit 96c60af

Please sign in to comment.