Skip to content
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

Do not show splash screen when options are present #5132

Merged
merged 1 commit into from Aug 22, 2016

Conversation

dagwieers
Copy link
Contributor

@dagwieers dagwieers commented Jul 14, 2016

This ensures now splash-screen is shown when preferences are changed or CLI-mode is used.

More information in #5131.

However this does NOT fix #5131, since the Arduino IDE in CLI-mode still requires X11 (according to #1981).

@dagwieers dagwieers changed the title Do not require X11 DISPLAY for CLI prefs changes Do not use a splash screen for CLI prefs changes Jul 14, 2016
@@ -27,7 +27,7 @@ fi
# Collect options to java in an array, to properly handle whitespace in options
JAVA_OPTIONS=("-DAPP_DIR=$APPDIR" "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel")

if [[ "$@" != *"--upload"* && "$@" != *"--verify"* && "$@" != *"--get-pref"* && "$@" != *"--pref"* && "$@" != *"--install-board"* && "$@" != *"--install-library"* ]] ; then
if [[ "$@" != *"--upload"* && "$@" != *"--verify"* && "$@" != *"--get-pref"* && "$@" != *"--save-prefs"* "$@" != *"--install-boards"* && "$@" != *"--install-library"* ]] ; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message mentions --board, but I don't see that here? Also, the commit removes --pref again, isn't that needed after all? The commit message doesn't mention it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I adapted my commit but not the commit-message. I chose to add --save-prefs instead of adding both --board and --pref since they go together when used CLI-only. In fact, if you would be starting the IDE with --board (which I guess is possible) the splash will still be there.

Maybe this does not cover all the use-cases, but it covers my use-cases cfr. the man-page:
https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc

Copy link
Contributor Author

@dagwieers dagwieers Jul 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original issue title was also wrong. Somehow I was hoping that this would fix the X11 DISPLAY requirement (as the original error message was related to the Splash-screen), but that's rooted much deeper into the code I learned by experience :-/ So this is a minor improvement only.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this does not cover all the use-cases,

I wonder if it would be better to just suppress the splash screen whenever any options are passed, since keeping this list of options up-to-date is probably going to fail (again) in the future. The most-used invocation is without options, which should show a test screen. The invocations with options that do show the GUI and should (ideally) show a splash screen too are probably very seldomly used, so it might be acceptable to not show a splash screen in those cases.

Somehow I was hoping that this would fix the X11 DISPLAY requirement (as the original error message was related to the Splash-screen), but that's rooted much deeper into the code I learned by experience :-/ So this is a minor improvement only.

Ah, I already wondered about that indeed :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes a lot of sense too. The Splash screen is not an integral/functional part of Arduino, so only showing it when options (not just arguments) are present makes sense. I will make a new proposal.

@dagwieers dagwieers changed the title Do not use a splash screen for CLI prefs changes Do not show splash screen when options are present Jul 14, 2016
@dagwieers
Copy link
Contributor Author

@matthijskooijman I simplified this PR to a single small change as you proposed. I hope you like it ;-)

This ensures now splash-screen is shown when preferences are changed or CLI-mode is used.

More information in arduino#5131.

However this does NOT fix arduino#5131, since the Arduino IDE in CLI-mode still requires X11 (according to arduino#1981).
@wtgee wtgee mentioned this pull request Aug 20, 2016
@cmaglie cmaglie added this to the Release 1.6.12 milestone Aug 22, 2016
@cmaglie cmaglie merged commit 1b95b43 into arduino:master Aug 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arduino requires X11 DISPLAY where none should be needed
3 participants