Skip to content

Commit

Permalink
Add file path in the Delete dialog text.
Browse files Browse the repository at this point in the history
This pull request fixes the issue JabRef#534.

My solution is that instead of absolute file path, only the file name is showed in the dialog title. The file's absolute path is added in the dialog text.
  • Loading branch information
Racheal7 committed Oct 23, 2022
1 parent 79a330e commit 0936c52
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ public boolean delete() {
ButtonType removeFromEntry = new ButtonType(Localization.lang("Remove from entry"), ButtonData.YES);
ButtonType deleteFromEntry = new ButtonType(Localization.lang("Delete from disk"));
Optional<ButtonType> buttonType = dialogService.showCustomButtonDialogAndWait(AlertType.INFORMATION,
Localization.lang("Delete '%0'", file.get().toString()),
Localization.lang("Delete the selected file permanently from disk, or just remove the file from the entry? Pressing Delete will delete the file permanently from disk."),
Localization.lang("Delete '%0'", file.get().getFileName().toString()),
Localization.lang("Delete '%0' permanently from disk, or just remove the file from the entry? Pressing Delete will delete the file permanently from disk.", file.get().toString()),
removeFromEntry, deleteFromEntry, ButtonType.CANCEL);

if (buttonType.isPresent()) {
Expand Down

0 comments on commit 0936c52

Please sign in to comment.