import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SpringLayout;
+ import javax.swing.SwingUtilities;
+ import javax.swing.border.TitledBorder;
+import javax.swing.filechooser.FileFilter;
import javax.swing.plaf.basic.BasicFileChooserUI;
/**
}
}
- // TODO: ENSURE THAT FILES SAVED WITH A ':' IN THE NAME ARE REFUSED AND THE
- // USER PROMPTED FOR A NEW FILENAME.
- // DO NOT need to confirm file overwrite if using backup files (the files
- // aren't being overwritten!)
- if ((ret == JalviewFileChooser.APPROVE_OPTION)
- && ourselectedFile.exists() && (!BackupFiles.getEnabled()))
+ if (ourselectedFile.exists())
- {
- int confirm = JvOptionPane.showConfirmDialog(this,
- MessageManager.getString("label.overwrite_existing_file"),
- MessageManager.getString("label.file_already_exists"),
- JvOptionPane.YES_NO_OPTION);
+ {
- int confirm = JvOptionPane.showConfirmDialog(parent,
++ int confirm = JvOptionPane.showConfirmDialog(this,
+ MessageManager.getString("label.overwrite_existing_file"),
+ MessageManager.getString("label.file_already_exists"),
+ JvOptionPane.YES_NO_OPTION);
- if (confirm != JvOptionPane.YES_OPTION)
- {
- return;
- }
+ if (confirm != JvOptionPane.YES_OPTION)
+ {
- ret = JalviewFileChooser.CANCEL_OPTION;
++ return;
}
-
+ }
- return ret;
+ super.approveSelection();
}
void recentListSelectionChanged(Object selection)