WIP: attempt to modernize muCommander #496
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there!
NOTE: I do not expect this PR to be merged, it is more of a discussion starter and a bit of a work log 馃槂
muCommander seems to be bundled with all the fantastic functionality, but one of the reason why it is not really competitive for me personally is because of how it looks and behaves.
I recently had to switch from macOS to Windows, and muCommander seems to be a no-brainer choice of file manager 馃槂 especially considering that I am perfectly able to change/contribute myself.
First thing I noticed is that Windows LookAndFeel does not really follow switching to dark theme that is now available in Windows 10. So this is my first experiment, add a wide selection of LookAndFeels to the application. I've seen that it is possible to download some and import them via special dialog, still that is something I would expect to see in 2004, I believe that modern application should have it available out of the box.
Code below is not nearly as well documented as main muCommander code at the moment, but it is also not really stable yet.
OSGI loading failures were a bit hard to figure out, but I found a way to make it work.
I failed to extract current version of Darcula from IntelliJ, but FlatLaf provides wide selection of LookAndFeels, so at the moment that is the only one bundled with application.
I've added separate OSGI module to provide factories for more configuration panels, and added catalogue of those to existing preferences panel. I feel like this is something that would be more convenient to do with ServiceLoader instead of OSGI, as it would allow discovery on demand, not only on startup.
I've created a small components demo with NetBeans GUI builder, and used it to render a bunch of PNG files to preview all the LookAndFeels available on my machine including FlatLaf.
I am pretty pleased with that part, next challenge is that current preference system is not extensible enough.
mucommander-preferences
module had enum of all possible settings, which means that modules have to be hardcoded in it, creating tight coupling? Andmucommander-commons-conf
seems to be quite low-level, without good high level abstractions that would be easy and convenient to inject into other OSGI modules.So while window to select LookAndFeel is now pretty and working well, settings themselves are not saved.
My plan now is the following: