-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allows adding files and folders via filechooser and drag and drop #51 #82
Conversation
need to switch to JFileChooser, as javafx filechooser doesnt allow files+folders selection selection folders (filechooser/dragndrop) now recursively walks the directory and adds every file.xyz it finds
Hi wolfposd, I understand that current implementation is far away from being perfect but this swing UI looks like a breath from mid-90th. And, to be honest with you, I don't like it. Just because of how it looks. And actually on Linux it's a way harder to navigate thru file hierarchy. Sorry. |
i know, but swing is the only filechooser that supports multiple selection =( maybe add a third button for "Add Folders"? what about drag&drop for recursive folders? |
Yeah.. that's why there is 'Select split NSP' button added. Not perfect.
Yeah.. like 'Select all' or 'Scan folder and add all content'..
Yes, please. Your implementation with streams and lambdas looks good! |
- old filechooser - directory chooser can choose any directory and recursively adds all *.xyz files - add button template
Great! Leave it as is.. I'd like to change idea a bit. Will review, approve, update and get back to you with news and details. Anyway, many thanks!! It's a great improvement! |
File[] files = startFolder.listFiles(); | ||
if(files != null) | ||
for (File f : files) { | ||
if (f.isDirectory()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To handle split-files should be if (f.isDirectory() && ! f.getName().toLowerCase().matches(regex))
if (isTinfoil() && isXciNszXczSupport()) | ||
return REGEX_ALLFILES_TINFOIL; | ||
else | ||
return REGEX_ONLY_NSP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To handle #33 should be:
else if (goldleafController.getNSPFileFilterForGL())) {
return REGEX_ONLY_NSP;
}
else
return ".*";
Added your code with some corrections. I'd like to have it as a selectable option in app preferences and be able to turn it off instead of adding more buttons. This way when checkbox for this is selected, we can remove 'Select split-files' button. It makes UI cleaner (IMHO). Ok, for GoldLeaf: users can select files that are not just nsp, nsz etc but literally any files. Anyway, you can build and check if you want or pick artifact from CI.. if you're interested in what has been changed. Thanks! |
Both looks good. Actually I'd like to also have 'Cancel' button to be able cancelling this flow. And I also was about to create pop-up linked to javafx's 'Task', add some cute progress bar, bind it, add counter of files like 'Bla-bla-bla, Scan in progress. 5142 files would be added..' As for progress bar that exists in application, of course we can use it too.. but the main issue for me is 'Cancel' button. |
If you want to reach me somewhere else: telegram: developer_su, Skype: developer.su Discord: IDK.. somewhere. |
recursive adding of folders ( #51 )