More safely delete files#2569
Conversation
ca095c0 to
a6518db
Compare
# Conflicts: # src/main/java/net/sf/jabref/gui/fieldeditors/FileListEditor.java
| } | ||
|
|
||
| int userConfirm = JOptionPane.showConfirmDialog(null, Localization.lang("Are you sure you want to delete this file?"), Localization.lang("Warning"), JOptionPane.YES_NO_OPTION); | ||
| if (userConfirm == JOptionPane.YES_OPTION) { |
There was a problem hiding this comment.
Please don't use simple YES/NO Buttons:
http://www.uxdesignedge.com/2010/06/are-you-sure-how-to-write-effective-confirmations/
Better add explicit named Buttons Delete file permanently and Cancel:
As I just did this yesterday for another case, here is a sample code:
String[] options = {Localization.lang("Move file"), Localization.lang("Cancel")};
int dialogResult = JOptionPane.showOptionDialog(frame, "Move file to file directory" + fileDir.get(),
"Move",
JOptionPane.INFORMATION_MESSAGE, JOptionPane.YES_NO_CANCEL_OPTION, null, options, options[0]);
if (dialogResult == JOptionPane.YES_OPTION) {
There was a problem hiding this comment.
Hm, one can argue if this really adds so much value. I think the functionality is clear with the question Do you really want to delete this file?. It just adds more Strings that need to be translated. However, I'm OK with implementing this.
In general, what do @JabRef/developers think about this?
There was a problem hiding this comment.
There are just a few more Strings, but it really helps to improve usability a lot! Here is a more detailed explanation . http://ux.stackexchange.com/questions/756/what-are-some-alternatives-to-the-phrase-are-you-sure-you-want-to-xyz-in-confi
There was a problem hiding this comment.
I understand it, tho not sure if I really agree 😄
1ae2814 to
d8086bd
Compare
See JabRef#245