From: Giovanni Mascellani Subject: [PATCH] patch/version Patches GeoGebra in order to make the Debian version visible along with the upstream one. Also, do not warn the user if he's using an old version of GeoGebra. Signed-off-by: Giovanni Mascellani --- geogebra/GeoGebra.java | 2 ++ geogebra/GeoGebraAppletPreloader.java | 3 ++- geogebra/gui/app/GeoGebraFrame.java | 7 ------- geogebra/gui/menubar/GeoGebraMenuBar.java | 4 +++- geogebra/main/Application.java | 3 ++- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/geogebra/GeoGebra.java b/geogebra/GeoGebra.java index c503fc7..2a279c4 100644 --- a/geogebra/GeoGebra.java +++ b/geogebra/GeoGebra.java @@ -28,6 +28,8 @@ public class GeoGebra extends Object { public static final boolean CAS_VIEW_ENABLED = false; public static final boolean IS_PRE_RELEASE = !VERSION_STRING.endsWith(".0"); + public static final String DEBIAN_VERSION_STRING = GeoGebraDebian.DEBIAN_VERSION_STRING; + // File format versions public static final String XML_FILE_FORMAT = "4.0"; public static final String GGB_XSD_FILENAME = "ggb.xsd"; // for ggb files diff --git a/geogebra/GeoGebraAppletPreloader.java b/geogebra/GeoGebraAppletPreloader.java index d8de89d..2929722 100644 --- a/geogebra/GeoGebraAppletPreloader.java +++ b/geogebra/GeoGebraAppletPreloader.java @@ -11,7 +11,8 @@ public class GeoGebraAppletPreloader extends JApplet { public void init() { setBackground(Color.white); - System.out.println("GeoGebraAppletPreloader " + GeoGebra.VERSION_STRING + " started"); + System.out.println("GeoGebraAppletPreloader " + GeoGebra.VERSION_STRING + + " (Debian package " + GeoGebra.DEBIAN_VERSION_STRING + ") started"); loadAllJarFiles(true); } diff --git a/geogebra/gui/app/GeoGebraFrame.java b/geogebra/gui/app/GeoGebraFrame.java index bc5fbe0..ec0f215 100644 --- a/geogebra/gui/app/GeoGebraFrame.java +++ b/geogebra/gui/app/GeoGebraFrame.java @@ -467,16 +467,9 @@ public class GeoGebraFrame extends JFrame implements WindowFocusListener { String dl = app.getPlain("GoToDownloadPage"); Object[] options = { app.getMenu("Cancel"), dl }; Component comp = app.getMainComponent(); - int returnVal = JOptionPane.showOptionDialog(comp, q, - dl, JOptionPane.DEFAULT_OPTION, - JOptionPane.WARNING_MESSAGE, null, options, - options[0]); // store date of current check only when notification has been shown: GeoGebraPreferences.getPref().savePreference( GeoGebraPreferences.VERSION_LAST_CHECK, nowLS); - if (returnVal == 1) { - app.getGuiManager().showURLinBrowser(INSTALLERS_URL); - } } } catch (Exception ex) { System.err.println(ex); diff --git a/geogebra/gui/menubar/GeoGebraMenuBar.java b/geogebra/gui/menubar/GeoGebraMenuBar.java index 6991e2c..d6529df 100644 --- a/geogebra/gui/menubar/GeoGebraMenuBar.java +++ b/geogebra/gui/menubar/GeoGebraMenuBar.java @@ -254,7 +254,9 @@ public class GeoGebraMenuBar extends JMenuBar { StringBuilder sb = new StringBuilder(); sb.append(""); sb.append(vsb); - sb.append(" ("); + sb.append(" Debian package "); + sb.append(GeoGebra.DEBIAN_VERSION_STRING); + sb.append(" ("); sb.append("Java "); sb.append(System.getProperty("java.version")); sb.append(", "); diff --git a/geogebra/main/Application.java b/geogebra/main/Application.java index e5c7038..bca00b5 100644 --- a/geogebra/main/Application.java +++ b/geogebra/main/Application.java @@ -653,7 +653,8 @@ public class Application implements KeyEventDispatcher { System.exit(0); } // help debug applets - System.out.println("GeoGebra " + GeoGebra.VERSION_STRING + " " + System.out.println("GeoGebra " + GeoGebra.VERSION_STRING + " (Debian version " + + GeoGebra.DEBIAN_VERSION_STRING + ") " + GeoGebra.BUILD_DATE + " Java " + System.getProperty("java.version")); if (args.containsArg("v")) { -- tg: (4896c42..) patch/version (depends on: master)