-
-
Notifications
You must be signed in to change notification settings - Fork 161
Display Welcome to Beta once per revision #1203
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| import processing.core.PApplet; | ||
|
|
||
|
|
||
|
|
||
| /** | ||
| * Threaded class to check for updates in the background. | ||
| * <p/> | ||
|
|
@@ -125,7 +126,6 @@ public void updateCheck() throws IOException { | |
| Preferences.set("update.last", String.valueOf(now)); | ||
|
|
||
| if (base.activeEditor != null) { | ||
| // boolean offerToUpdateContributions = true; | ||
|
|
||
| if (latest > Base.getRevision()) { | ||
| System.out.println("You are running Processing revision 0" + | ||
|
|
@@ -135,8 +135,20 @@ public void updateCheck() throws IOException { | |
| // offerToUpdateContributions = !promptToVisitDownloadPage(); | ||
| promptToVisitDownloadPage(); | ||
| } | ||
| if(latest < Base.getRevision()){ | ||
| WelcomeToBeta.showWelcomeToBeta(); | ||
|
|
||
| String lastBetaSeenStr = Preferences.get("beta.last_beta_welcome_seen"); | ||
| int lastBetaSeen = 0; | ||
| if (lastBetaSeenStr != null) { | ||
| lastBetaSeen = Integer.parseInt(lastBetaSeenStr); | ||
| } | ||
| int revision = Base.getRevision(); | ||
| System.err.println("MOON DEBUG" + | ||
| Base.getRevision() + ", and lastBetaSeen is " + | ||
| lastBetaSeen + "."); | ||
|
|
||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will remove this, i suppose
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, feel free to use |
||
|
|
||
| if(latest < revision && revision != lastBetaSeen ) { | ||
| WelcomeToBeta.showWelcomeToBeta(); | ||
| } | ||
|
|
||
| /* | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ import com.mikepenz.markdown.m2.markdownColor | |
| import com.mikepenz.markdown.m2.markdownTypography | ||
| import com.mikepenz.markdown.model.MarkdownColors | ||
| import com.mikepenz.markdown.model.MarkdownTypography | ||
| import processing.app.Preferences | ||
| import processing.app.Base.getRevision | ||
| import processing.app.Base.getVersionName | ||
| import processing.app.ui.theme.LocalLocale | ||
|
|
@@ -61,7 +62,10 @@ class WelcomeToBeta { | |
| val mac = SystemInfo.isMacFullWindowContentSupported | ||
| SwingUtilities.invokeLater { | ||
| JFrame(windowTitle).apply { | ||
| val close = { dispose() } | ||
| val close = { | ||
| Preferences.set("beta.last_beta_welcome_seen", getRevision().toString()) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i need a better key name. wondering your thoughts. should it be
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| dispose() | ||
| } | ||
| rootPane.putClientProperty("apple.awt.transparentTitleBar", mac) | ||
| rootPane.putClientProperty("apple.awt.fullWindowContent", mac) | ||
| defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE | ||
|
|
||
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.
I would say using
Preferences.getInteger()would be a better choice here, to make sure it is never empty you can add the key to thedefaults.txtinbuild/shared/lib/defaults.txt