-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Move SettingsDialog and ErrorDialog in jme3-awt-dialogs module #1748
Conversation
1ca275b
to
92291b6
Compare
If there is no objection i think this can be merged |
I'd like more time to study this please. |
This would be much easier to review if it were split into 3 PRs: one for the native libraries, one for the settings dialog, and one for the error dialog. Would you mind splitting it up please? |
Also, the dialog changes have major impact so I think they should be discussed at the Hub/Forum before this is integrated. |
I'll remove the native patch from this PRs and commit it directly, since it is a trivial change of the build script. I don't see this as a major change, since the same functionality is provided with SettingsDialog.showDialog(settings) and ErrorDialog.showDialog(message), but i'll open a thread |
92291b6
to
d6a9bc5
Compare
I notice that the "Show Setting" checkbox in the test chooser no longer works. Please fix that.
Thanks.
OK, I'll try viewing them that way.
I disagree. If you won't start the discussion, then I will. But I imagine you could explain the changes better than I. |
Should be fixed now
I opened a thread here |
Tested and confirmed.
Looks good. Thank you. |
I got distracted today and didn't have time to study this PR in depth. Hopefully tomorrow... |
I don't understand why the |
Isn't SKIP SETTING used to skip the setting dialog there? |
Yes. And? |
If the settings dialog is removed it cannot unskip it |
Okay, the removals make sense then. I'm trying to run apps in jme3-examples on Linux (this branch of JME) and every test so far has failed. Here's a typical crash log:
|
Why 3.1? |
I noticed that, too. I suppose that might be because Riccardo's fork lacks any recent build tags: sgold:~/Git/riccardo/jmonkeyengine$ git tag
3.1-github-tag-test
3.1-snapshot-test
3.1-snapshot-test-2
3.1-snapshot-test-3
3.1-snapshot-test-4
test123
test124
v3.1-alpha1
v3.1.0-alpha2
v3.1.0-alpha3
v3.1.0-alpha4
sgold:~/Git/riccardo/jmonkeyengine$ The branch of "macNatives" from "master" took place less than a week ago. |
Somehow it seems the window is launcher fullscreen |
I'm interested in writing a new version of Settings Dialog that doesn't use AWT/Swing. @riccardobl: Instead of removing/disabling the dialogs, would you consider revising this PR so it's not a breaking change? |
I am planning to move the dialogs on a jme3-awt-dialogs module that can be replaced with a different module for different platforms or left out for no dialogs. Would that work? |
I think it would. |
Done. Both error and settings handlers will search by default the class I've implemented the JmeDialogsFactoryImpl in jme3-awt-dialogs to keep the current behavior when the new module jme3-awt-dialogs is included as dependency. To reduce the complexity and to have the entire logic selfcontained into the default handlers and the module i made so that a new instance of JmeDialogsFactoryImpl is created everytime a dialog is shown, it shouldn't be a problem, but if proven otherwise i will figure out a different approach. |
@stephengold let me know if this meets the requirements for the new dialogs |
I'll study it. Thanks! |
I've begun studying this PR. So many levels of indirection! I understand correctly, I can create a new library with its own version of By the way, something I noticed: |
Yes, that's correct.
Yes handleSettings is the new method. If you are happy with this, i will fix the conflicts and remove the deprecated calls so that it can be merged. |
In my opinion, this PR isn't ready to be merged yet. At the very least, it needs javadoc and reformatting. |
Added the missing documentation. |
IMHO, the current implementation is fine, I believe no need to use a config file in this case. |
jme3-android/src/main/java/com/jme3/system/android/JmeAndroidSystem.java
Show resolved
Hide resolved
I'd like to integrate this PR. However I can't figure out how to do so using the mechanisms built into GitHub. My plan is to integrate the diffs into a new branch in the main repo, but I'm open to other suggestions on how to proceed. |
The alternative would be to locally rebase the macNatives branch onto master and then force-push (or merge master into that branch and regularly push). |
Force pushing messes up anyone who has the repository checked out. Better to do things a different way. |
anyone who has this feature branch checked out (that is actually even on the fork repo). |
I tried that and ran into difficulties that I didn't know how to handle. Please @MeFisto94, if you know how to do this right, please do so! |
Done in https://github.com/jMonkeyEngine/jmonkeyengine/tree/pr/1748 |
Very neat. I'll open a new PR for the changes. |
Done! Integrated into "master" branch at 9e54d44 |
This PR removes SettingsDialog and ErrorDialog from the internal code, since they do not work properly in some platforms when AWT is initialized in the same thread of GLFW. ErrorDialog also causes issues with mouse release on fullscreen apps in linux.
SettingsDialog is turned into a standalone class for developers that still wish to use it, by doing so we make it easier to replace with something else, eg. a configurator that takes settings from an external launcher with commandline arguments or environment variables
ErrorDialog is replaced by an error message handler that can be configured by the developer to show/log/send the error message in the most appropriate way.
Eg. reimplementing the ErrorDialog to reproduce the current behavior will look like this:
By default on desktop ErrorDialog is not used and the error is only printed to System.err.
On android the behavior remains the same since the current error reporting is reimplemented using a default error message handler.