From: Giovanni Mascellani <mascellani@poisson.phc.unipi.it>
Date: Wed, 18 Apr 2018 10:09:17 +0200
Subject: Show Debian 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.
---
 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 5c73c2a..a2b90df 100644
--- a/geogebra/GeoGebra.java
+++ b/geogebra/GeoGebra.java
@@ -29,6 +29,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 004ab16..5ce6caf 100644
--- a/geogebra/gui/app/GeoGebraFrame.java
+++ b/geogebra/gui/app/GeoGebraFrame.java
@@ -463,16 +463,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("<html><b>");
 		sb.append(vsb);
-		sb.append("</b>  (");
+		sb.append("</b> <i>Debian package ");
+		sb.append(GeoGebra.DEBIAN_VERSION_STRING);
+		sb.append("</i>  (");
 		sb.append("Java "); 
 		sb.append(System.getProperty("java.version")); 
 		sb.append(", ");
diff --git a/geogebra/main/Application.java b/geogebra/main/Application.java
index 3c19239..8207178 100644
--- a/geogebra/main/Application.java
+++ b/geogebra/main/Application.java
@@ -651,7 +651,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")) {
