mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-25 01:08:52 -05:00
* allow Folder selection
This commit is contained in:
parent
e6ce4b63f4
commit
2ffd53a60a
@ -131,13 +131,13 @@ abstract class SubtitleDropTarget extends JButton {
|
|||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
JFileChooser chooser = new JFileChooser();
|
JFileChooser chooser = new JFileChooser();
|
||||||
|
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
|
||||||
chooser.setMultiSelectionEnabled(true);
|
chooser.setMultiSelectionEnabled(true);
|
||||||
|
|
||||||
// collect media file extensions (video and subtitle files)
|
// collect media file extensions (video and subtitle files)
|
||||||
List<String> extensions = new ArrayList<String>();
|
List<String> extensions = new ArrayList<String>();
|
||||||
Collections.addAll(extensions, VIDEO_FILES.extensions());
|
Collections.addAll(extensions, VIDEO_FILES.extensions());
|
||||||
Collections.addAll(extensions, SUBTITLE_FILES.extensions());
|
Collections.addAll(extensions, SUBTITLE_FILES.extensions());
|
||||||
|
|
||||||
chooser.setFileFilter(new FileNameExtensionFilter("Media files", extensions.toArray(new String[0])));
|
chooser.setFileFilter(new FileNameExtensionFilter("Media files", extensions.toArray(new String[0])));
|
||||||
|
|
||||||
if (chooser.showOpenDialog(getWindow(evt.getSource())) == JFileChooser.APPROVE_OPTION) {
|
if (chooser.showOpenDialog(getWindow(evt.getSource())) == JFileChooser.APPROVE_OPTION) {
|
||||||
|
Loading…
Reference in New Issue
Block a user