Skip to content

Commit 0936c52

Browse files
committed
Add file path in the Delete dialog text.
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.
1 parent 79a330e commit 0936c52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ public boolean delete() {
392392
ButtonType removeFromEntry = new ButtonType(Localization.lang("Remove from entry"), ButtonData.YES);
393393
ButtonType deleteFromEntry = new ButtonType(Localization.lang("Delete from disk"));
394394
Optional<ButtonType> buttonType = dialogService.showCustomButtonDialogAndWait(AlertType.INFORMATION,
395-
Localization.lang("Delete '%0'", file.get().toString()),
396-
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."),
395+
Localization.lang("Delete '%0'", file.get().getFileName().toString()),
396+
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()),
397397
removeFromEntry, deleteFromEntry, ButtonType.CANCEL);
398398

399399
if (buttonType.isPresent()) {

0 commit comments

Comments
 (0)