[SCM] GeoGebra: Dynamic mathematics software for education branch, build, updated. debian/3.2.42.0+dfsg1-1-30-g258928a

Giovanni Mascellani gio at alioth.debian.org
Fri Jul 23 19:26:18 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GeoGebra: Dynamic mathematics software for education".

The branch, build has been updated
       via  258928ad197f046200db7cf1e61496de8d4e7eaa (commit)
       via  633d1e03f57bbe4f837cdd199c979fa9777dd802 (commit)
       via  9169d99e16a7e7c4fa668a795dd4ffbb2f3ab773 (commit)
       via  214a803661329265fb16509dd0e54106193c8ca7 (commit)
       via  c0de8bcaff3bf600060bd3dbfe15389d03a75d45 (commit)
       via  cd4dbc8d74f1371dc9e47bd70709fce641adc7b3 (commit)
       via  4b6e56e070092ed0e8f0af3017454e26e9ba948b (commit)
       via  f51291ef541c45ea4b08d4cfb6d40368589fd1d9 (commit)
       via  4ec45e6f6f5bafdec265d4c2aa6ef1228a77b808 (commit)
       via  732c25345dfc1563f4b9e125bda6c4aeb0db2d4f (commit)
       via  4a7b2ed610ac55472e5e94dd6e82fbadd9962aeb (commit)
       via  d4d7cd1ca3f0f6ea4c53da39594132b99fe67c95 (commit)
       via  958fa87566fe68171a98d86b7474f489352ee53a (commit)
       via  a4076637ae5e7b3055ea6a8c2806950d983d6a84 (commit)
       via  28c73ad4e19b797e72661a0562e664b470bb4741 (commit)
       via  29f74628b36c8c44d9526f0dfb40e7686b833d5d (commit)
       via  39e5b219571773e3b7e363969fd86f4b1d5a88b5 (commit)
       via  544848fa2f03b33324881c6549a8ee2cfa3e7018 (commit)
       via  6ec98f1c2bf2d7eb48950e95e2a775d154fbed30 (commit)
       via  ab89acd0e33dd2cf8c500d9195510227e4697ec3 (commit)
       via  cd5a812566bb6160d93176849f609c5e763b7fad (commit)
       via  b3a089872c0b94e35edd06bab86eae9b0195b270 (commit)
       via  fff07809121227204708ea54ffef3e1c817ed7fc (commit)
       via  dee0d30f38b83079ff6c979c98e49137d67aeb3e (commit)
       via  6573ac4be651dd5f9c25d79b71807481484ed00d (commit)
       via  fec65535eeac87083e9aa08c4b6165b5a5afa5b0 (commit)
       via  6d6be1c05f816787d4e1f3d5ffd494cd6edde0db (commit)
       via  5ba78c0a46567b13b856917d6cfa4c3b5d2c8351 (commit)
       via  5db07a5b54cc3726e0f4767d27ff1bcd8cf89dc8 (commit)
       via  6dd3466d60b66180dbb1e5586208cc242e96d333 (commit)
      from  1cc4ec914b17927a97f3a9f8d266a48ca330cba3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 258928ad197f046200db7cf1e61496de8d4e7eaa
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 20:50:35 2010 +0200

    Patches updated

commit 633d1e03f57bbe4f837cdd199c979fa9777dd802
Merge: c0de8bc 9169d99
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 20:50:12 2010 +0200

    Merge branch 'master' into build

commit c0de8bcaff3bf600060bd3dbfe15389d03a75d45
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 18:54:08 2010 +0200

    Patches updated

commit cd4dbc8d74f1371dc9e47bd70709fce641adc7b3
Merge: 4ec45e6 4b6e56e
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 18:53:14 2010 +0200

    Merge branch 'master' into build

commit 4ec45e6f6f5bafdec265d4c2aa6ef1228a77b808
Merge: 4a7b2ed 732c253
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 17:02:34 2010 +0200

    Merge branch 'master' into build

commit 4a7b2ed610ac55472e5e94dd6e82fbadd9962aeb
Merge: 28c73ad d4d7cd1
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 16:57:30 2010 +0200

    Merge branch 'master' into build

commit 28c73ad4e19b797e72661a0562e664b470bb4741
Merge: 39e5b21 29f7462
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 16:21:17 2010 +0200

    Merge branch 'master' into build

commit 39e5b219571773e3b7e363969fd86f4b1d5a88b5
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 16:18:18 2010 +0200

    Patches updated

commit 544848fa2f03b33324881c6549a8ee2cfa3e7018
Merge: fff0780 6ec98f1
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 16:17:59 2010 +0200

    Merge branch 'master' into build

commit fff07809121227204708ea54ffef3e1c817ed7fc
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 12:37:15 2010 +0200

    Patches updated

commit dee0d30f38b83079ff6c979c98e49137d67aeb3e
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:04:39 2010 +0200

    Patches updated

commit 6573ac4be651dd5f9c25d79b71807481484ed00d
Merge: 1cc4ec9 fec6553
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Fri Jul 23 10:04:02 2010 +0200

    Merge branch 'master' into build

-----------------------------------------------------------------------

Summary of changes:
 build.pro                                          |   12 +-
 build.xml                                          |   70 ++++-
 debian/README.source                               |    3 +
 debian/TODO                                        |    7 +
 debian/changelog                                   |   13 +
 debian/geogebra.desktop                            |   11 -
 debian/geogebra.manpages                           |    1 +
 debian/geogebra.sharedmimeinfo                     |   11 -
 debian/install                                     |    4 +-
 debian/patches/patch/ScientificFormat.java.diff    |    2 +-
 debian/patches/patch/applet_export.diff            |   36 +++
 debian/patches/patch/build.xml.diff                |   80 +++++-
 debian/patches/patch/flanagan_nonfree.diff         |  317 ++++++++++++++++----
 debian/patches/patch/jama.diff                     |   50 ++--
 debian/patches/patch/no_mac.diff                   |    2 +-
 debian/patches/series                              |    1 +
 debian/rules                                       |    3 +
 geogebra/GeoGebra.java                             |    5 +-
 geogebra/euclidian/DrawRay.java                    |   43 ++-
 geogebra/euclidian/EuclidianController.java        |    2 +
 geogebra/gui/ContextMenuGeoElement.java            |    6 +-
 geogebra/gui/PropertiesDialogGeoElement.java       |    1 +
 geogebra/gui/TextInputDialog.java                  |    4 +-
 geogebra/gui/menubar/MenubarImpl.java              |   34 +-
 geogebra/kernel/AlgoAppend.java                    |    2 +-
 geogebra/kernel/AlgoBinomial.java                  |    2 +-
 geogebra/kernel/AlgoDefined.java                   |    2 +-
 geogebra/kernel/AlgoDeterminant.java               |    2 +-
 geogebra/kernel/AlgoExpand.java                    |    2 +-
 geogebra/kernel/AlgoFactor.java                    |    2 +-
 geogebra/kernel/AlgoFirst.java                     |    2 +-
 geogebra/kernel/AlgoGCD.java                       |    2 +-
 geogebra/kernel/AlgoInsert.java                    |    2 +-
 geogebra/kernel/AlgoIntersection.java              |    2 +-
 geogebra/kernel/AlgoInvert.java                    |    2 +-
 geogebra/kernel/AlgoIsInteger.java                 |    2 +-
 geogebra/kernel/AlgoJoin.java                      |    2 +-
 geogebra/kernel/AlgoKeepIf.java                    |    2 +-
 geogebra/kernel/AlgoLCM.java                       |    2 +-
 geogebra/kernel/AlgoLast.java                      |    2 +-
 geogebra/kernel/AlgoListGCD.java                   |    2 +-
 geogebra/kernel/AlgoListLCM.java                   |    2 +-
 geogebra/kernel/AlgoPolynomialFromCoordinates.java |    2 +-
 geogebra/kernel/AlgoPolynomialFromFunction.java    |    2 +-
 geogebra/kernel/AlgoRemoveUndefined.java           |    2 +-
 geogebra/kernel/AlgoReverse.java                   |    2 +-
 geogebra/kernel/AlgoSimplify.java                  |    2 +-
 geogebra/kernel/AlgoSort.java                      |    2 +-
 geogebra/kernel/AlgoTake.java                      |    2 +-
 geogebra/kernel/AlgoTranspose.java                 |    2 +-
 geogebra/kernel/AlgoUnion.java                     |    2 +-
 geogebra/kernel/GeoElement.java                    |   20 +-
 geogebra/kernel/GeoList.java                       |    5 +-
 geogebra/kernel/GeoPolygon.java                    |    2 +-
 geogebra/kernel/Kernel.java                        |   10 +-
 geogebra/kernel/parser/Parser.jj                   |    2 +-
 geogebra/kernel/statistics/AlgoFitLineX.java       |    2 +-
 geogebra/kernel/statistics/AlgoFitLineY.java       |    2 +-
 geogebra/kernel/statistics/AlgoInverseNormal.java  |    2 +-
 geogebra/kernel/statistics/AlgoMedian.java         |    2 +-
 geogebra/kernel/statistics/AlgoMode.java           |    2 +-
 geogebra/kernel/statistics/AlgoNormal.java         |    2 +-
 geogebra/kernel/statistics/AlgoQ1.java             |    2 +-
 geogebra/kernel/statistics/AlgoQ3.java             |    2 +-
 geogebra/kernel/statistics/AlgoRandom.java         |    2 +-
 geogebra/kernel/statistics/AlgoRandomBinomial.java |    2 +-
 geogebra/kernel/statistics/AlgoRandomNormal.java   |    2 +-
 geogebra/kernel/statistics/AlgoRandomPoisson.java  |    2 +-
 geogebra/main/Application.java                     |   61 +++-
 unix/debcontrol/postinst                           |   22 ++
 unix/debcontrol/postrm                             |   16 +
 unix/debrelease/Packages                           |   21 ++
 unix/debrelease/Release                            |   10 +
 unix/usr/bin/geogebra                              |    4 +
 unix/usr/bin/ggthumb                               |   13 +
 unix/usr/share/applications/geogebra.desktop       |   24 ++
 unix/usr/share/doc/geogebra/README.Debian          |    8 +
 unix/usr/share/doc/geogebra/changelog.gz           |  Bin 0 -> 152 bytes
 unix/usr/share/doc/geogebra/copyright              |   36 +++
 unix/usr/share/gconf/defaults/10_geogebra          |    3 +
 .../share/icons/hicolor/48x48/apps/geogebra.png    |  Bin 0 -> 4489 bytes
 .../mimetypes/application-vnd.geogebra.file.png    |  Bin 0 -> 4489 bytes
 .../mimetypes/application-vnd.geogebra.tool.png    |  Bin 0 -> 4489 bytes
 unix/usr/share/man/man1/geogebra.1.gz              |  Bin 0 -> 613 bytes
 unix/usr/share/man/man1/ggthumb.1.gz               |  Bin 0 -> 435 bytes
 unix/usr/share/mime/packages/geogebra.xml          |   25 ++
 unix/usr/share/pixmaps/geogebra.png                |  Bin 0 -> 4489 bytes
 87 files changed, 848 insertions(+), 230 deletions(-)

diff --git a/build.pro b/build.pro
index ce90ee5..69469b4 100644
--- a/build.pro
+++ b/build.pro
@@ -3,13 +3,13 @@
 #
 # Oct 23rd 2008
 #
--injars ../build/geogebra.jar
--injars ../build/geogebra_main.jar
--injars ../build/geogebra_gui.jar
--injars ../build/geogebra_export.jar
--injars ../build/geogebra_cas.jar
+-injars ../buildggb32/geogebra.jar
+-injars ../buildggb32/geogebra_main.jar
+-injars ../buildggb32/geogebra_gui.jar
+-injars ../buildggb32/geogebra_export.jar
+-injars ../buildggb32/geogebra_cas.jar
 
--outjars ../build/temp
+-outjars ../buildggb32/temp
 
 -libraryjars ../java142-rt.jar
 -libraryjars netscape_javascript.jar
diff --git a/build.xml b/build.xml
index e67d26f..5b182b1 100644
--- a/build.xml
+++ b/build.xml
@@ -38,9 +38,9 @@ office at geogebra.org
 	
 	<property name="src.dir" location="."/>
 	<property name="propertiessrc.dir" location="./geogebra/properties"/>
-	<property name="propertiestemp.dir" location="../build/tempproperties"/>
-	<property name="build.dir" location="../build"/>
-	<property name="temp.dir" location="../build/temp"/>
+	<property name="propertiestemp.dir" location="../buildggb32/tempproperties"/>
+	<property name="build.dir" location="../buildggb32"/>
+	<property name="temp.dir" location="../buildggb32/temp"/>
 	<property name="workspace.dir" location="../"/>
     			
 	<!-- build signed and unsigned GeoGebra jar files -->
@@ -76,7 +76,7 @@ office at geogebra.org
 		<mkdir dir="${build.dir}/unsigned/unpacked"/>
 		<mkdir dir="${propertiestemp.dir}"/>
 		<delete>
-		    <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/jlatexmath.jar ,**/*.jar.pack.gz, **/*.html"/>
+		    <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/jlatexmath.jar, **/jlm_*.jar,**/*.jar.pack.gz, **/*.html"/>
 		</delete>		
 	</target>
 	
@@ -498,4 +498,66 @@ office at geogebra.org
 		</zip>
 		<delete dir="${build.dir}/installer/macosx" />
 	</target>
+	
+	
+	<!--builds Debian package -->
+	<target name="package" depends="readVersion">
+		<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" 
+					classpath="ant-deb-0.0.1.jar"/>
+		
+		
+	    <property name="deb.tree" value="${build.dir}/deb"/>
+		<property name="deb.version" value="${fullversion}"/>
+		<property name="deb.packages" value="${build.dir}/packages"/>
+		<property name="deb.package" value="${deb.packages}/geogebra_${deb.version}_all.deb"/>
+		<mkdir dir="${deb.packages}"/>
+		
+	    
+		
+		<deb toDir="${deb.packages}" postinst="unix/debcontrol/postinst"
+			package="geogebra"
+			version="${deb.version}"
+			postrm="unix/debcontrol/postrm"
+			section="math"
+			priority="optional"
+			maintainer="Markus Hohenwarter &lt;markus at geogebra.org>"
+			architecture="all"
+			recommends="sun-java6-jre | sun-java5-jre, imagemagick"
+			depends="sun-java6-jre | sun-java5-jre | default-jre"
+			packageEntry="${deb.packages}/Packages"
+			repoLocation=""
+			>
+			<description synopsis="Dynamic mathematics software for all levels of education">
+ GeoGebra joins arithmetic, geometry, algebra and calculus. It offers multiple
+ representations of objects in its graphics, algebra, and spreadsheet views
+ that are all dynamically linked.
+ This package also contains a thumbnailer for .ggb files which runs only when
+ imagemagick is installed. 
+			</description>
+		 	<tarfileset dir="${src.dir}/unix/usr/share" prefix="./usr/share"/>
+			<tarfileset dir="${src.dir}/unix/usr/bin" prefix="./usr/bin" filemode="755"/>
+		 	<tarfileset dir="${build.dir}/unpacked" prefix="./usr/share/geogebra/lib"/>
+			<tarfileset dir="${build.dir}/unsigned/unpacked" prefix="./usr/share/geogebra/lib/unsigned"/>
+		</deb>
+			
+			
+		</target>
+		
+		<!-- makes necessary Release & Packages files for Debian repo-->
+		<target name="release" depends="package">
+			<gzip src="${deb.packages}/Packages" destfile="${deb.packages}/Packages.gz"/>
+			<length file="${deb.packages}/Packages" property="packplain.size"/>
+			<length file="${deb.packages}/Packages.gz" property="packgz.size"/>
+			<checksum file="${deb.packages}/Packages" algorithm="MD5" property="packplain.md5"/>
+			<checksum file="${deb.packages}/Packages.gz" algorithm="MD5" property="packgz.md5"/>
+			<copy todir="${deb.packages}">
+				<fileset file="unix/debrelease/Release"/>
+				<filterset begintoken="[[" endtoken="]]">
+					<filter token="plain.size" value="${packplain.size}"/>
+					<filter token="gz.size" value="${packgz.size}"/>
+					<filter token="plain.md5" value="${packplain.md5}"/>
+					<filter token="gz.md5" value="${packgz.md5}"/>
+				</filterset>
+			</copy>
+		</target>
 </project>
\ No newline at end of file
diff --git a/debian/README.source b/debian/README.source
index 60f0303..6362e72 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -17,6 +17,9 @@ and then:
    doesn't allow commercial use).
  * Deleting the org/ directory, which contains copies of other software
    already package in Debian (which is used instead of the embedded copy).
+ * Deleting the geogebra/kernel/jama/ directory, except
+   the geogebra/kernel/jama/GgbMat.java file, which is a copy of
+   another software already in Debian.
 
 
 QUILT
diff --git a/debian/TODO b/debian/TODO
index 922a5dc..e3612fa 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -1,2 +1,9 @@
  * verify exportable JARs
+   + signed vs. unsigned (ability to print....)
+   + if Internet connection is not available?
+   + informing the user when the process is completed
+   + document these issues in README.Debian
+   + why both signed and unsigned?
  * add a menu entry
+ * additional resources in http://groups.google.com/group/geogebra-dev/browse_thread/thread/77c6736ed48688ae
+ * add thumbnailer
diff --git a/debian/changelog b/debian/changelog
index 8e8bd71..e5adcb2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+geogebra (3.2.43.0+dfsg1-1) unstable; urgency=low
+
+  * New upstream release (mostly bugfixes).
+    + Patches updated
+  * patch/flanagan_nonfree.diff: search of polynomial roots improved,
+    thanks to Markus Hohenwarter.
+  * Inverse of a singular matrix bug fixed.
+  * Added manpage.
+  * Upstream icons, .desktop and MIME description used.
+  * JAR files for exporting applets are downloaded from upstream website.
+
+ -- Giovanni Mascellani <gio at debian.org>  Fri, 23 Jul 2010 19:24:22 +0200
+
 geogebra (3.2.42.0+dfsg1-1) unstable; urgency=low
 
   * Initial release (Closes: #505704)
diff --git a/debian/geogebra.desktop b/debian/geogebra.desktop
deleted file mode 100644
index 08721fc..0000000
--- a/debian/geogebra.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Name=GeoGebra
-Comment=Create interactive mathematical constructions and applets 
-Exec=geogebra %f
-Icon=geogebra.png
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=Math;Education
-MimeType=application/vnd.geogebra.file;application/vnd.geogebra.tool;
-
diff --git a/debian/geogebra.manpages b/debian/geogebra.manpages
new file mode 100644
index 0000000..945f70f
--- /dev/null
+++ b/debian/geogebra.manpages
@@ -0,0 +1 @@
+unix/usr/share/man/man1/geogebra.1.gz
diff --git a/debian/geogebra.sharedmimeinfo b/debian/geogebra.sharedmimeinfo
deleted file mode 100644
index 5608011..0000000
--- a/debian/geogebra.sharedmimeinfo
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
-  <mime-type type="application/vnd.geogebra.file">
-         <comment>GeoGebra File</comment>
-         <glob pattern="*.ggb"/>
-  </mime-type>
-  <mime-type type="application/vnd.geogebra.tool">
-         <comment>GeoGebra Tool</comment>
-         <glob pattern="*.ggt"/>
-  </mime-type>
-</mime-info>
diff --git a/debian/install b/debian/install
index 6a1e8de..4665bb4 100644
--- a/debian/install
+++ b/debian/install
@@ -1,3 +1,3 @@
 build/geogebra.jar build/geogebra_main.jar build/geogebra_gui.jar build/geogebra_cas.jar build/geogebra_export.jar build/geogebra_properties.jar usr/share/geogebra
-debian/geogebra.desktop usr/share/applications
-debian/geogebra.png usr/share/pixmaps
+unix/usr/share/applications/geogebra.desktop usr/share/applications
+unix/usr/share/pixmaps/geogebra.png usr/share/pixmaps
diff --git a/debian/patches/patch/ScientificFormat.java.diff b/debian/patches/patch/ScientificFormat.java.diff
index 355f37d..7183700 100644
--- a/debian/patches/patch/ScientificFormat.java.diff
+++ b/debian/patches/patch/ScientificFormat.java.diff
@@ -42,4 +42,4 @@ index e9fb8c9..d903341 100644
 \ No newline at end of file
 +}
 -- 
-tg: (b5e82e7..) patch/ScientificFormat.java (depends on: master)
+tg: (6d6be1c..) patch/ScientificFormat.java (depends on: master)
diff --git a/debian/patches/patch/applet_export.diff b/debian/patches/patch/applet_export.diff
new file mode 100644
index 0000000..f62dde1
--- /dev/null
+++ b/debian/patches/patch/applet_export.diff
@@ -0,0 +1,36 @@
+From: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
+Subject: [PATCH] patch/applet_export
+
+When exporting the worksheet as applet, use the classes distributed
+by the upstream site (which have embedded dependencies).
+
+Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
+
+---
+ geogebra/export/WorksheetExportDialog.java |    9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/geogebra/export/WorksheetExportDialog.java b/geogebra/export/WorksheetExportDialog.java
+index e7119c4..321389e 100644
+--- a/geogebra/export/WorksheetExportDialog.java
++++ b/geogebra/export/WorksheetExportDialog.java
+@@ -664,10 +664,15 @@ public class WorksheetExportDialog extends JDialog {
+ 	 * whether a signed or unsigned applet is needed for the options set.
+ 	 */
+ 	private URL getAppletCodebase() {
+-		URL codebase = app.getCodeBase();
++		URL codebase = null;
++		try {
++			codebase = new URL("http://www.geogebra.org/webstart/");
++		} catch (Exception e) {
++			e.printStackTrace();
++		}
+ 		if (!cbSavePrint.isSelected()) {
+ 			try {
+-				codebase = new URL(app.getCodeBase(), "unsigned/");
++				codebase = new URL(codebase, "unsigned/");
+ 			} catch (Exception e) {
+ 				e.printStackTrace();
+ 			}
+-- 
+tg: (4b6e56e..) patch/applet_export (depends on: master)
diff --git a/debian/patches/patch/build.xml.diff b/debian/patches/patch/build.xml.diff
index cae1aa7..729d06e 100644
--- a/debian/patches/patch/build.xml.diff
+++ b/debian/patches/patch/build.xml.diff
@@ -6,20 +6,20 @@ Fixes the build.xml for just building GeoGebra.
 Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
 
 ---
- build.xml |  323 ++++++++++---------------------------------------------------
- 1 files changed, 52 insertions(+), 271 deletions(-)
+ build.xml |  385 ++++++++----------------------------------------------------
+ 1 files changed, 52 insertions(+), 333 deletions(-)
 
 diff --git a/build.xml b/build.xml
-index e67d26f..1cff9bc 100644
+index 5b182b1..b6749ba 100644
 --- a/build.xml
 +++ b/build.xml
 @@ -38,22 +38,31 @@ office at geogebra.org
  	
  	<property name="src.dir" location="."/>
  	<property name="propertiessrc.dir" location="./geogebra/properties"/>
--	<property name="propertiestemp.dir" location="../build/tempproperties"/>
--	<property name="build.dir" location="../build"/>
--	<property name="temp.dir" location="../build/temp"/>
+-	<property name="propertiestemp.dir" location="../buildggb32/tempproperties"/>
+-	<property name="build.dir" location="../buildggb32"/>
+-	<property name="temp.dir" location="../buildggb32/temp"/>
 -	<property name="workspace.dir" location="../"/>
 +	<property name="propertiestemp.dir" location="build/tempproperties"/>
 +	<property name="build.dir" location="build"/>
@@ -87,7 +87,7 @@ index e67d26f..1cff9bc 100644
  		<mkdir dir="${build.dir}/packed"/>
  		<mkdir dir="${build.dir}/unpacked"/>
 @@ -79,6 +103,11 @@ office at geogebra.org
- 		    <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/jlatexmath.jar ,**/*.jar.pack.gz, **/*.html"/>
+ 		    <fileset dir="${build.dir}" includes="**/geogebra*.jar, **/gluegen-rt.jar, **/jogl.jar, **/jlatexmath.jar, **/jlm_*.jar,**/*.jar.pack.gz, **/*.html"/>
  		</delete>		
  	</target>
 +
@@ -237,7 +237,7 @@ index e67d26f..1cff9bc 100644
  	<!-- reads the version/build number from geogebra.GeoGebra.java -->
  	<target name="readVersion">
  		<loadfile property="fullversion" srcfile="${src.dir}/geogebra/GeoGebra.java">
-@@ -327,175 +278,5 @@ office at geogebra.org
+@@ -327,237 +278,5 @@ office at geogebra.org
  		<echo> ${builddate}   </echo>
  		-->
  	</target>
@@ -412,9 +412,71 @@ index e67d26f..1cff9bc 100644
 -		</zip>
 -		<delete dir="${build.dir}/installer/macosx" />
 -	</target>
+-	
+-	
+-	<!--builds Debian package -->
+-	<target name="package" depends="readVersion">
+-		<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" 
+-					classpath="ant-deb-0.0.1.jar"/>
+-		
+-		
+-	    <property name="deb.tree" value="${build.dir}/deb"/>
+-		<property name="deb.version" value="${fullversion}"/>
+-		<property name="deb.packages" value="${build.dir}/packages"/>
+-		<property name="deb.package" value="${deb.packages}/geogebra_${deb.version}_all.deb"/>
+-		<mkdir dir="${deb.packages}"/>
+-		
+-	    
+-		
+-		<deb toDir="${deb.packages}" postinst="unix/debcontrol/postinst"
+-			package="geogebra"
+-			version="${deb.version}"
+-			postrm="unix/debcontrol/postrm"
+-			section="math"
+-			priority="optional"
+-			maintainer="Markus Hohenwarter &lt;markus at geogebra.org>"
+-			architecture="all"
+-			recommends="sun-java6-jre | sun-java5-jre, imagemagick"
+-			depends="sun-java6-jre | sun-java5-jre | default-jre"
+-			packageEntry="${deb.packages}/Packages"
+-			repoLocation=""
+-			>
+-			<description synopsis="Dynamic mathematics software for all levels of education">
+- GeoGebra joins arithmetic, geometry, algebra and calculus. It offers multiple
+- representations of objects in its graphics, algebra, and spreadsheet views
+- that are all dynamically linked.
+- This package also contains a thumbnailer for .ggb files which runs only when
+- imagemagick is installed. 
+-			</description>
+-		 	<tarfileset dir="${src.dir}/unix/usr/share" prefix="./usr/share"/>
+-			<tarfileset dir="${src.dir}/unix/usr/bin" prefix="./usr/bin" filemode="755"/>
+-		 	<tarfileset dir="${build.dir}/unpacked" prefix="./usr/share/geogebra/lib"/>
+-			<tarfileset dir="${build.dir}/unsigned/unpacked" prefix="./usr/share/geogebra/lib/unsigned"/>
+-		</deb>
+-			
+-			
+-		</target>
+-		
+-		<!-- makes necessary Release & Packages files for Debian repo-->
+-		<target name="release" depends="package">
+-			<gzip src="${deb.packages}/Packages" destfile="${deb.packages}/Packages.gz"/>
+-			<length file="${deb.packages}/Packages" property="packplain.size"/>
+-			<length file="${deb.packages}/Packages.gz" property="packgz.size"/>
+-			<checksum file="${deb.packages}/Packages" algorithm="MD5" property="packplain.md5"/>
+-			<checksum file="${deb.packages}/Packages.gz" algorithm="MD5" property="packgz.md5"/>
+-			<copy todir="${deb.packages}">
+-				<fileset file="unix/debrelease/Release"/>
+-				<filterset begintoken="[[" endtoken="]]">
+-					<filter token="plain.size" value="${packplain.size}"/>
+-					<filter token="gz.size" value="${packgz.size}"/>
+-					<filter token="plain.md5" value="${packplain.md5}"/>
+-					<filter token="gz.md5" value="${packgz.md5}"/>
+-				</filterset>
+-			</copy>
+-		</target>
 -</project>
 \ No newline at end of file
 +</project>
 +
 -- 
-tg: (b5e82e7..) patch/build.xml (depends on: master)
+tg: (6d6be1c..) patch/build.xml (depends on: master)
diff --git a/debian/patches/patch/flanagan_nonfree.diff b/debian/patches/patch/flanagan_nonfree.diff
index 2dba143..8eb6e22 100644
--- a/debian/patches/patch/flanagan_nonfree.diff
+++ b/debian/patches/patch/flanagan_nonfree.diff
@@ -7,16 +7,21 @@ equivalent code from Apache Commons Math.
 Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
 
 ---
- geogebra/io/MyI2GHandler.java                      |   28 ++++++------
- geogebra/kernel/AlgoIntegralDefinite.java          |   44 ++++++++-----------
- geogebra/kernel/AlgoRootInterval.java              |   19 +++++---
- geogebra/kernel/AlgoRootNewton.java                |   22 +++++++--
- geogebra/kernel/EquationSolver.java                |   29 ++++++++-----
- geogebra/kernel/GeoVec2D.java                      |   47 ++++++++++----------
+ geogebra/io/MyI2GHandler.java                      |   28 +++++-----
+ geogebra/kernel/AlgoIntegralDefinite.java          |   55 +++++-------------
+ geogebra/kernel/AlgoRootInterval.java              |   19 ++++--
+ geogebra/kernel/AlgoRootNewton.java                |   60 +++++++++++---------
+ geogebra/kernel/AlgoRootsPolynomial.java           |    6 ++-
+ geogebra/kernel/EquationSolver.java                |   53 +++++++++++++-----
+ geogebra/kernel/GeoVec2D.java                      |   47 ++++++++--------
+ geogebra/kernel/arithmetic/Function.java           |    8 +++
+ geogebra/kernel/arithmetic/PolyFunction.java       |    4 +
  geogebra/kernel/integration/EllipticArcLength.java |    2 -
- geogebra/kernel/roots/RealRootAdapter.java         |   20 ++++++++
+ geogebra/kernel/roots/RealRootAdapter.java         |   22 +++++++
+ geogebra/kernel/roots/RealRootDerivAdapter.java    |   36 ++++++++++++
+ geogebra/kernel/roots/RealRootDerivFunction.java   |    2 +
  geogebra/kernel/roots/RealRootFunction.java        |    5 ++
- 9 files changed, 128 insertions(+), 88 deletions(-)
+ 14 files changed, 220 insertions(+), 127 deletions(-)
 
 diff --git a/geogebra/io/MyI2GHandler.java b/geogebra/io/MyI2GHandler.java
 index b62a9d8..ba24ad9 100644
@@ -102,7 +107,7 @@ index b62a9d8..ba24ad9 100644
  					}
  				}
 diff --git a/geogebra/kernel/AlgoIntegralDefinite.java b/geogebra/kernel/AlgoIntegralDefinite.java
-index bf7e8ce..06f6196 100644
+index bf7e8ce..db64bba 100644
 --- a/geogebra/kernel/AlgoIntegralDefinite.java
 +++ b/geogebra/kernel/AlgoIntegralDefinite.java
 @@ -12,8 +12,12 @@ the Free Software Foundation.
@@ -119,22 +124,37 @@ index bf7e8ce..06f6196 100644
  import geogebra.kernel.roots.RealRootFunction;
  
  /**
-@@ -33,9 +37,9 @@ public class AlgoIntegralDefinite extends AlgoElement {
+@@ -33,11 +37,9 @@ public class AlgoIntegralDefinite extends AlgoElement {
      private GeoFunction symbIntegral;
      
      // for numerical adaptive GaussQuad integration  
 -    private static final int FIRST_ORDER = 5;
 -    private static final int SECOND_ORDER = 7;   
 -    private static GaussQuadIntegration firstGauss, secondGauss;
+-    private static int adaptiveGaussQuadCounter = 0;
+-    private static final int MAX_GAUSS_QUAD_CALLS = 500;     
 +    private static final int ORDER = 5;
-+    private static final int MAX_ITER = 10;   
-+    private static LegendreGaussIntegrator gauss;
-     private static int adaptiveGaussQuadCounter = 0;
-     private static final int MAX_GAUSS_QUAD_CALLS = 500;     
++    private static final int MAX_ITER = 100;   
++    private static LegendreGaussIntegrator gauss;  
  
-@@ -180,31 +184,19 @@ public class AlgoIntegralDefinite extends AlgoElement {
-     	}
-     	
+     public AlgoIntegralDefinite(
+         Construction cons,
+@@ -167,44 +169,17 @@ public class AlgoIntegralDefinite extends AlgoElement {
+      * quadrature approach.
+      */
+     public static double adaptiveGaussQuad(RealRootFunction fun, double a, double b) {
+-    	adaptiveGaussQuadCounter = 0;
+-    	double result = doAdaptiveGaussQuad(fun, a, b);
+-    	
+-    	//System.out.println("calls: " + adaptiveGaussQuadCounter);  
+-    	return result;
+-    }
+-    
+-    private static double doAdaptiveGaussQuad(RealRootFunction fun, double a, double b) {    		   	
+-    	if (++adaptiveGaussQuadCounter > MAX_GAUSS_QUAD_CALLS) {
+-    		return Double.NaN;
+-    	}
+-    	
      	// init GaussQuad classes for numerical integration
 -        if (firstGauss == null) {
 -            firstGauss = new GaussQuadIntegration(FIRST_ORDER);
@@ -163,14 +183,11 @@ index bf7e8ce..06f6196 100644
 -            else
 -                return left + doAdaptiveGaussQuad(fun, mid, b);           
 -        }
-+        double sum;
 +		try {
-+			sum = gauss.integrate(new RealRootAdapter(fun), a, b);
++			return gauss.integrate(new RealRootAdapter(fun), a, b);
 +		} catch (Exception e) {
-+			sum = Double.NaN;
++			return Double.NaN;
 +		} 
-+
-+        return sum;
      }
  
      final public String toString() {
@@ -249,10 +266,10 @@ index d9479db..e103fb3 100644
          return Double.NaN;
      }
 diff --git a/geogebra/kernel/AlgoRootNewton.java b/geogebra/kernel/AlgoRootNewton.java
-index 188f672..c148d30 100644
+index 188f672..b499f5c 100644
 --- a/geogebra/kernel/AlgoRootNewton.java
 +++ b/geogebra/kernel/AlgoRootNewton.java
-@@ -12,9 +12,14 @@ the Free Software Foundation.
+@@ -12,9 +12,15 @@ the Free Software Foundation.
  
  package geogebra.kernel;
  
@@ -265,18 +282,20 @@ index 188f672..c148d30 100644
  import geogebra.kernel.arithmetic.NumberValue;
 -import geogebra.kernel.roots.RealRoot;
 +import geogebra.kernel.roots.RealRootAdapter;
++import geogebra.kernel.roots.RealRootDerivAdapter;
  import geogebra.kernel.roots.RealRootDerivFunction;
  import geogebra.kernel.roots.RealRootUtil;
  
-@@ -33,7 +38,6 @@ public class AlgoRootNewton extends AlgoElement {
+@@ -33,7 +39,7 @@ public class AlgoRootNewton extends AlgoElement {
      private GeoPoint rootPoint; // output 
  
      private GeoElement startGeo;
 -    private RealRoot rootFinder;
++    private UnivariateRealSolver rootFinderBrent, rootFinderNewton;
  
      public AlgoRootNewton(
          Construction cons,
-@@ -45,8 +49,6 @@ public class AlgoRootNewton extends AlgoElement {
+@@ -45,8 +51,6 @@ public class AlgoRootNewton extends AlgoElement {
          this.start = start;
          startGeo = start.toGeoElement();
  
@@ -285,7 +304,7 @@ index 188f672..c148d30 100644
          // output
          rootPoint = new GeoPoint(cons);
          setInputOutput(); // for AlgoElement    
-@@ -57,7 +59,6 @@ public class AlgoRootNewton extends AlgoElement {
+@@ -57,7 +61,6 @@ public class AlgoRootNewton extends AlgoElement {
  
      AlgoRootNewton(Construction cons) {
          super(cons);
@@ -293,42 +312,105 @@ index 188f672..c148d30 100644
      }
  
      protected String getClassName() {
-@@ -94,6 +95,16 @@ public class AlgoRootNewton extends AlgoElement {
+@@ -93,35 +96,40 @@ public class AlgoRootNewton extends AlgoElement {
+ 
      final double calcRoot(Function fun, double start) {
      	double root = Double.NaN;
-     	
-+    	UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
-+    	UnivariateRealSolver rootFinder = fact.newBrentSolver();
+-    	
 +    	double [] borders = getDomain(fun, start);
-+    	try {
-+			root = rootFinder.solve(new RealRootAdapter(fun), borders[0], borders[1], start);
-+		} catch (Exception e) {
-+			root = Double.NaN;
-+		}
 +
-+        /*
      	// for Newton's method we need the derivative of our function fun
          RealRootDerivFunction derivFun = fun.getRealRootDerivFunction();        
          
-@@ -122,6 +133,7 @@ public class AlgoRootNewton extends AlgoElement {
-                 }                      	        	        	
+-        // no derivative found: let's use REGULA FALSI
+-        if (derivFun == null) {
+-        	double [] borders = getDomain(fun, start);
+-        	try {
+-        		root = rootFinder.brent(fun, borders[0], borders[1]);
+-        	} catch (Exception e) {
+-        		root = Double.NaN;
++        // derivative found: let's use Newton's method
++        if (derivFun != null) {
++        	if (rootFinderNewton == null) {
++        		UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
++        		rootFinderNewton = fact.newNewtonSolver();
+         	}
+-        }
+-        else {
+-        	// NEWTON's METHOD
++
+             try {        	                  	
+-            	root = rootFinder.newtonRaphson(derivFun, start);                      
++            	root = rootFinderNewton.solve(new RealRootDerivAdapter(derivFun), borders[0], borders[1], start);
+             } 
+-            catch (IllegalArgumentException e) {   
+-            	// BISECTION with NEWTON's METHOD
+-                try {                               	        	
+-                	// Newton's method failed because we left our function's domain
+-                	// Let's search for a valid domain and try again using a restricted method
+-                	double [] borders = getDomain(fun, start);
+-                	root = rootFinder.bisectNewtonRaphson(derivFun, borders[0], borders[1]);                                
+-                } catch (Exception ex) {
+-                }                      	        	        	
++            catch (Exception e) {   
++            	e.printStackTrace();
++            	root = Double.NaN;                    	        	        	
              }
          }
-+        */
++        
++        // if Newton didn't know the answer, let's ask Brent
++        if (Double.isNaN(root)) {
++        	if (rootFinderBrent == null) {
++        		UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
++        		rootFinderBrent = fact.newBrentSolver();
++        	}
++        	
++        	try {		
++        		root = rootFinderBrent.solve(new RealRootAdapter(fun), borders[0], borders[1]);
++        	} catch (Exception e) {
++        		root = Double.NaN;
++        	}
++        }
                
          // check what we got
          if (Math.abs(fun.evaluate(root)) < Kernel.MIN_PRECISION )
+diff --git a/geogebra/kernel/AlgoRootsPolynomial.java b/geogebra/kernel/AlgoRootsPolynomial.java
+index cac5380..7af3d07 100644
+--- a/geogebra/kernel/AlgoRootsPolynomial.java
++++ b/geogebra/kernel/AlgoRootsPolynomial.java
+@@ -20,8 +20,10 @@ import java.util.Arrays;
+ import java.util.Iterator;
+ import java.util.LinkedList;
+ 
++import org.apache.commons.math.analysis.solvers.UnivariateRealSolver;
++
+ /**
+- * Finds all real roots of a polynomial.
++ * Finds all real roots of a polynomial using Brent's method.
+  * TODO: extend for rational functions
+  * 
+  * @author Markus Hohenwarter
+@@ -52,6 +54,8 @@ public class AlgoRootsPolynomial extends AlgoIntersect {
+     // used for AlgoExtremumPolynomial, see setRootPoints()
+     private Function diffFunction; // used for intersection of f and g
+     private GeoPoint tempPoint;
++    
++    private UnivariateRealSolver rootFinder;
+ 
+     /**
+      * Computes all roots of f
 diff --git a/geogebra/kernel/EquationSolver.java b/geogebra/kernel/EquationSolver.java
-index a3ad579..8f8dac4 100644
+index a3ad579..0466abc 100644
 --- a/geogebra/kernel/EquationSolver.java
 +++ b/geogebra/kernel/EquationSolver.java
-@@ -12,25 +12,26 @@ the Free Software Foundation.
+@@ -12,25 +12,28 @@ the Free Software Foundation.
  
  package geogebra.kernel;
  
 +import org.apache.commons.math.ConvergenceException;
 +import org.apache.commons.math.FunctionEvaluationException;
 +import org.apache.commons.math.analysis.solvers.LaguerreSolver;
++import org.apache.commons.math.analysis.solvers.UnivariateRealSolver;
 +import org.apache.commons.math.analysis.solvers.UnivariateRealSolverFactory;
 +import org.apache.commons.math.complex.Complex;
  
@@ -344,9 +426,12 @@ index a3ad579..8f8dac4 100644
  		
  	private static final double LAGUERRE_EPS = 1E-5;
  	private double epsilon = Kernel.STANDARD_PRECISION;
- 	
+-	
 -	private RealRoot rootPolisher;
- 	//private ExtremumFinder extrFinder;
+-	//private ExtremumFinder extrFinder;
++
++	private LaguerreSolver laguerreSolver;
++	private UnivariateRealSolver rootFinderBrent, rootFinderNewton;
  	
      public EquationSolver(Kernel kernel) {		
  		// we need someone to polish our roots
@@ -354,7 +439,7 @@ index a3ad579..8f8dac4 100644
  		//extrFinder = kernel.getExtremumFinder();
      }
      
-@@ -391,8 +392,12 @@ public class EquationSolver {
+@@ -391,8 +394,15 @@ public class EquationSolver {
  		*/			
  	
  		// calc roots with Laguerre method
@@ -362,38 +447,54 @@ index a3ad579..8f8dac4 100644
 -		Complex [] complexRoots = poly.roots(false, new Complex(LAGUERRE_START, 0)); // don't polish here 
 +		Complex[] complexRoots = null;
 +		try {
-+			complexRoots = new LaguerreSolver().solveAll(eqn, LAGUERRE_START);
++			if (laguerreSolver == null) {
++				laguerreSolver = new LaguerreSolver();
++			}
++			complexRoots = laguerreSolver.solveAll(eqn, LAGUERRE_START);
 +		} catch (Exception e) {
-+			e.printStackTrace();
++			System.err.println("EquationSolver.LaguerreSolver: "+e.getLocalizedMessage());
 +		}
  	
  		// sort complexRoots by real part into laguerreRoots
  		double [] laguerreRoots = new double[complexRoots.length];
-@@ -418,15 +423,16 @@ public class EquationSolver {
- 			double f_right = polyFunc.evaluate(right);
+@@ -419,14 +429,23 @@ public class EquationSolver {
  			boolean bounded = f_left * f_right < 0.0; 
  			
-+			UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
  			try {					
- 				if (bounded) {						
+-				if (bounded) {						
++				if (bounded) {		
++					if (rootFinderBrent == null) {
++						UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
++						rootFinderBrent = fact.newBrentSolver();
++					}
++					
  					//	small f'(root): don't go too fare from our laguerre root !	
 -					root = rootPolisher.bisectNewtonRaphson(polyFunc, left, right);
-+					root = fact.newBrentSolver().solve(new RealRootAdapter(polyFunc), left, right);
++					root = rootFinderBrent.solve(new RealRootAdapter(polyFunc), left, right);
  					//System.out.println("Polish bisectNewtonRaphson: " + root);
  				} 
  				else {
++					if (rootFinderNewton == null) {
++						UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
++						rootFinderNewton = fact.newNewtonSolver();
++					}
  					// the root is not bounded: give Mr. Newton a chance
 -					root = rootPolisher.newtonRaphson(polyFunc, root);
-+					root = fact.newNewtonSolver().solve(new RealRootAdapter(polyFunc), left, right, root);
++					root = rootFinderNewton.solve(new RealRootAdapter(polyFunc), left, right, root);
  					//System.out.println("Polish newtonRaphson: " + root);
  				}				
  			} 
-@@ -435,10 +441,11 @@ public class EquationSolver {
+@@ -435,10 +454,16 @@ public class EquationSolver {
  				// polishing failed: maybe we have an extremum here
  				// try to find a local extremum
  				try {		
 -					root = rootPolisher.bisectNewtonRaphson(derivFunc, left, right);	
-+					root = fact.newBrentSolver().solve(new RealRootAdapter(derivFunc), left, right);
++					if (rootFinderBrent == null) {
++						UnivariateRealSolverFactory fact = UnivariateRealSolverFactory.newInstance();
++						rootFinderBrent = fact.newBrentSolver();
++					}
++					
++					root = rootFinderBrent.solve(new RealRootAdapter(derivFunc), left, right);
  					//System.out.println("    find extremum successfull: " + root);
  				} catch (Exception ex) {
 -					System.err.println(ex.getMessage());
@@ -530,6 +631,47 @@ index f30afd1..2f19282 100644
        	c.setMode(Kernel.COORD_COMPLEX);
      }
  
+diff --git a/geogebra/kernel/arithmetic/Function.java b/geogebra/kernel/arithmetic/Function.java
+index 9e094b5..7c16b17 100644
+--- a/geogebra/kernel/arithmetic/Function.java
++++ b/geogebra/kernel/arithmetic/Function.java
+@@ -256,6 +256,10 @@ implements ExpressionValue, RealRootFunction, Functional {
+     	}
+     }
+     
++    public double evaluateDerivative(double x) {
++    	return getDerivative(1).evaluate(x);
++    }
++    
+     /**
+      * Returns this function's value at position x.
+      * (Note: use this method if isBooleanFunction() returns true.
+@@ -1249,6 +1253,10 @@ implements ExpressionValue, RealRootFunction, Functional {
+ 		public double evaluate(double x) { 
+ 			return fun.evaluate(x);
+ 		}
++
++		public double evaluateDerivative(double x) {
++			return derivative.evaluate(x);
++		}
+     }
+ 	
+ 	public final boolean includesDivisionByVariable() {
+diff --git a/geogebra/kernel/arithmetic/PolyFunction.java b/geogebra/kernel/arithmetic/PolyFunction.java
+index 98c1884..6df2802 100644
+--- a/geogebra/kernel/arithmetic/PolyFunction.java
++++ b/geogebra/kernel/arithmetic/PolyFunction.java
+@@ -87,6 +87,10 @@ public class PolyFunction implements RealRootFunction, RealRootDerivFunction {
+ 		return deriv;
+ 	}
+ 	
++	final public double evaluateDerivative(double x) {
++		return evaluateDerivFunc(x)[1];
++	}
++	
+ 	/**
+ 	 * Evaluates polynomial and its derivative 
+ 	 */		 
 diff --git a/geogebra/kernel/integration/EllipticArcLength.java b/geogebra/kernel/integration/EllipticArcLength.java
 index d6aec8f..e80c66d 100644
 --- a/geogebra/kernel/integration/EllipticArcLength.java
@@ -549,10 +691,10 @@ index d6aec8f..e80c66d 100644
  	/**
 diff --git a/geogebra/kernel/roots/RealRootAdapter.java b/geogebra/kernel/roots/RealRootAdapter.java
 new file mode 100644
-index 0000000..427a8ad
+index 0000000..e6241c3
 --- /dev/null
 +++ b/geogebra/kernel/roots/RealRootAdapter.java
-@@ -0,0 +1,20 @@
+@@ -0,0 +1,22 @@
 +package geogebra.kernel.roots;
 +
 +import org.apache.commons.math.FunctionEvaluationException;
@@ -568,11 +710,66 @@ index 0000000..427a8ad
 +
 +	public double value(double x) throws FunctionEvaluationException {
 +		double res = this.fun.evaluate(x);
-+		if (res == Double.NaN) throw new FunctionEvaluationException(res);
-+		return res;
++		if (Double.isInfinite(res) || Double.isNaN(res))
++			throw new FunctionEvaluationException(res);
++		else
++			return res;
 +	}
 +
 +}
+diff --git a/geogebra/kernel/roots/RealRootDerivAdapter.java b/geogebra/kernel/roots/RealRootDerivAdapter.java
+new file mode 100644
+index 0000000..65c8725
+--- /dev/null
++++ b/geogebra/kernel/roots/RealRootDerivAdapter.java
+@@ -0,0 +1,36 @@
++package geogebra.kernel.roots;
++
++import org.apache.commons.math.FunctionEvaluationException;
++import org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction;
++import org.apache.commons.math.analysis.UnivariateRealFunction;
++
++public class RealRootDerivAdapter implements
++		DifferentiableUnivariateRealFunction {
++
++	private RealRootDerivFunction derivFun;
++	
++	public RealRootDerivAdapter(RealRootDerivFunction derivFun) {
++		this.derivFun = derivFun;
++	}
++	
++	public UnivariateRealFunction derivative() {
++		return new UnivariateRealFunction() {
++			public double value(double x) throws FunctionEvaluationException {
++				double res = derivFun.evaluateDerivative(x);
++				if (Double.isInfinite(res) || Double.isNaN(res))
++					throw new FunctionEvaluationException(x);
++				else
++					return res;
++			}
++		};
++	}
++
++	public double value(double x) throws FunctionEvaluationException {
++		double res = derivFun.evaluate(x);
++		if (Double.isInfinite(res) || Double.isNaN(res))
++			throw new FunctionEvaluationException(x);
++		else
++			return res;
++	}
++	
++}
+diff --git a/geogebra/kernel/roots/RealRootDerivFunction.java b/geogebra/kernel/roots/RealRootDerivFunction.java
+index 055f023..ba4c964 100644
+--- a/geogebra/kernel/roots/RealRootDerivFunction.java
++++ b/geogebra/kernel/roots/RealRootDerivFunction.java
+@@ -7,4 +7,6 @@ public interface RealRootDerivFunction extends RealRootFunction {
+ 	 * @param x	 
+ 	 */
+ 	public double [] evaluateDerivFunc(double x);
++
++	public double evaluateDerivative(double x);
+ }
 diff --git a/geogebra/kernel/roots/RealRootFunction.java b/geogebra/kernel/roots/RealRootFunction.java
 new file mode 100644
 index 0000000..65c8438
@@ -585,4 +782,4 @@ index 0000000..65c8438
 +	public double evaluate(double x);
 +}
 -- 
-tg: (7db013e..) patch/flanagan_nonfree (depends on: master)
+tg: (6d6be1c..) patch/flanagan_nonfree (depends on: master)
diff --git a/debian/patches/patch/jama.diff b/debian/patches/patch/jama.diff
index de0dc4e..6f66eb4 100644
--- a/debian/patches/patch/jama.diff
+++ b/debian/patches/patch/jama.diff
@@ -8,12 +8,12 @@ Signed-off-by: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
 ---
  geogebra/kernel/AlgoInvert.java                |    2 +-
  geogebra/kernel/AlgoTranspose.java             |    2 +-
- geogebra/kernel/jama/GgbMat.java               |   68 ++++++++---------------
+ geogebra/kernel/jama/GgbMat.java               |   74 ++++++++++++------------
  geogebra/kernel/statistics/RegressionMath.java |    2 +-
- 4 files changed, 27 insertions(+), 47 deletions(-)
+ 4 files changed, 39 insertions(+), 41 deletions(-)
 
 diff --git a/geogebra/kernel/AlgoInvert.java b/geogebra/kernel/AlgoInvert.java
-index 0934f2f..890b8e8 100644
+index b7493eb..ce611f3 100644
 --- a/geogebra/kernel/AlgoInvert.java
 +++ b/geogebra/kernel/AlgoInvert.java
 @@ -81,7 +81,7 @@ public class AlgoInvert extends AlgoElement {
@@ -21,12 +21,12 @@ index 0934f2f..890b8e8 100644
     		}*/
     		
 -   		matrix.inverseImmediate();
-+   		matrix = new GgbMat(matrix.inverse());
++   		matrix = matrix.ggbInverse();
     		
     		if (matrix.isUndefined()) {
    			//outputList.setUndefined();
 diff --git a/geogebra/kernel/AlgoTranspose.java b/geogebra/kernel/AlgoTranspose.java
-index 282466c..89f7495 100644
+index 4147a4f..d0b99b8 100644
 --- a/geogebra/kernel/AlgoTranspose.java
 +++ b/geogebra/kernel/AlgoTranspose.java
 @@ -63,7 +63,7 @@ public class AlgoTranspose extends AlgoElement {
@@ -34,15 +34,15 @@ index 282466c..89f7495 100644
  	   	}
     		
 -   		matrix.transposeImmediate();
-+   		matrix = new GgbMat(matrix.transpose());
++   		matrix = matrix.ggbTranspose();
     		// Transpose[{{1,2},{3,4}}]
     		
     		outputList = matrix.getGeoList(outputList, cons);
 diff --git a/geogebra/kernel/jama/GgbMat.java b/geogebra/kernel/jama/GgbMat.java
-index 80ee214..e8aa175 100644
+index 80ee214..db01f23 100644
 --- a/geogebra/kernel/jama/GgbMat.java
 +++ b/geogebra/kernel/jama/GgbMat.java
-@@ -1,44 +1,55 @@
+@@ -1,44 +1,59 @@
  package geogebra.kernel.jama;
  
 +import java.awt.Dimension;
@@ -64,6 +64,10 @@ index 80ee214..e8aa175 100644
 +		super(m.getArray());
 +	}
 +
++	public GgbMat(int row, int col) {
++		super(row, col);
++	}
++
 +	public static Dimension calcDim(GeoList inputList) {
  		int rows = inputList.size();
  		if (!inputList.isDefined() || rows == 0) {
@@ -108,13 +112,14 @@ index 80ee214..e8aa175 100644
  		for (int r = 0 ; r < rows ; r++) {
  			geo = inputList.get(r);
  			if (!geo.isGeoList()) {
-@@ -62,37 +73,6 @@ public class GgbMat extends Matrix{
+@@ -62,35 +77,18 @@ public class GgbMat extends Matrix{
  		}
  	}
  
 -	public void inverseImmediate() {
 -
--		try {
++	public GgbMat ggbInverse() {
+ 		try {
 -			Matrix ret = inverse();
 -			A = ret.A;
 -			m = ret.m;
@@ -122,10 +127,15 @@ index 80ee214..e8aa175 100644
 -		}
 -		catch (Exception e) { // can't invert
 -			setIsUndefined(true);
--		}
--
--	}
++			return new GgbMat(((Matrix) this).inverse());
++		} catch (Exception e) {
++			GgbMat mat = new GgbMat(this.getRowDimension(), this.getColumnDimension());
++			mat.setIsUndefined(true);
++			return mat;
+ 		}
 -
+ 	}
+ 
 -
 -
 -	public void transposeImmediate() {
@@ -141,12 +151,12 @@ index 80ee214..e8aa175 100644
 -		n = m;
 -		m = temp;
 -		//Application.debug(""+A[0][0]);
--	}
--
++	public GgbMat ggbTranspose() {
++		return new GgbMat(((Matrix) this).transpose());
+ 	}
+ 
  	/*
- 	 * returns GgbMatrix as a GeoList eg { {1,2}, {3,4} }
- 	 */
-@@ -106,9 +86,9 @@ public class GgbMat extends Matrix{
+@@ -106,9 +104,9 @@ public class GgbMat extends Matrix{
  		outputList.clear();
  		outputList.setDefined(true);
  
@@ -158,7 +168,7 @@ index 80ee214..e8aa175 100644
  				//Application.debug(get(r, c)+"");
  				columnList.add(new GeoNumeric(cons, get(r, c)));  	   			
  			}
-@@ -131,7 +111,7 @@ public class GgbMat extends Matrix{
+@@ -131,7 +129,7 @@ public class GgbMat extends Matrix{
  	}
  
  	public boolean isSquare() {
@@ -181,4 +191,4 @@ index 55ee4fc..8d4ff23 100644
  /* 
  GeoGebra - Dynamic Mathematics for Everyone
 -- 
-tg: (f0cc56c..) patch/jama (depends on: master)
+tg: (6d6be1c..) patch/jama (depends on: master)
diff --git a/debian/patches/patch/no_mac.diff b/debian/patches/patch/no_mac.diff
index 02845c3..f2ebad7 100644
--- a/debian/patches/patch/no_mac.diff
+++ b/debian/patches/patch/no_mac.diff
@@ -163,4 +163,4 @@ index c4d696f..0000000
 -	
 -}
 -- 
-tg: (b5e82e7..) patch/no_mac (depends on: master)
+tg: (6d6be1c..) patch/no_mac (depends on: master)
diff --git a/debian/patches/series b/debian/patches/series
index 9c9d63f..f31abe9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
 patch/ScientificFormat.java.diff -p1
+patch/applet_export.diff -p1
 patch/build.xml.diff -p1
 patch/flanagan_nonfree.diff -p1
 patch/jama.diff -p1
diff --git a/debian/rules b/debian/rules
index cdd4bbe..3b93409 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,6 +27,9 @@ DEB_JARS += /usr/share/java/freehep-graphicsio-emf.jar
 install/geogebra::
 	install -m 755 $(CURDIR)/debian/geogebra.sh $(CURDIR)/debian/geogebra/usr/bin/geogebra
 
+	# This link is created so dh_installmime gets the correct file
+	ln -s ../unix/usr/share/mime/packages/geogebra.xml debian/geogebra.sharedmimeinfo
+
 get-orig-source:
 	./debian/get_orig_source.sh
 
diff --git a/geogebra/GeoGebra.java b/geogebra/GeoGebra.java
index 2fc7cce..e042af5 100644
--- a/geogebra/GeoGebra.java
+++ b/geogebra/GeoGebra.java
@@ -19,8 +19,9 @@ import java.net.URL;
 public class GeoGebra extends Object {
 	
 	// GeoGebra version
-	public static final String BUILD_DATE = "June 19, 2010";
-	public static final String VERSION_STRING = "3.2.42.0";
+	public static final String BUILD_DATE = "July 21, 2010";
+	
+	public static final String VERSION_STRING = "3.2.43.0";
 	public static final String SHORT_VERSION_STRING = "3.2"; // used for online archive
 		
 	// File format versions
diff --git a/geogebra/euclidian/DrawRay.java b/geogebra/euclidian/DrawRay.java
index 5e6553d..64d9f71 100644
--- a/geogebra/euclidian/DrawRay.java
+++ b/geogebra/euclidian/DrawRay.java
@@ -18,6 +18,7 @@ the Free Software Foundation.
 
 package geogebra.euclidian;
 
+import geogebra.euclidian.clipping.ClipLine;
 import geogebra.kernel.ConstructionDefaults;
 import geogebra.kernel.GeoElement;
 import geogebra.kernel.GeoLine;
@@ -55,8 +56,7 @@ implements Previewable {
     	this.view = view;
     	this.ray = ray;
     	geo = ray;
-    	    	
-    	
+
         update();
     }
     
@@ -79,18 +79,7 @@ implements Previewable {
         if (isVisible) { 
 			labelVisible = showLabel && geo.isLabelVisible();       
 			updateStrokes(ray);
-			
-			A = ray.getStartPoint();			
-			
-			// calc start point of ray in screen coords
-			a[0] = A.inhomX;
-			a[1] = A.inhomY;
-			view.toScreenCoords(a);
-
-			// calc direction vector of ray in screen coords
-			v[0] = ray.y * view.xscale;
-			v[1] = ray.x * view.yscale;
-			
+						
 			setClippedLine();
 			
 			 // line on screen?		
@@ -135,6 +124,16 @@ implements Previewable {
     }
     
     private void setClippedLine() {
+    	A = ray.getStartPoint();			
+		
+		// calc start point of ray in screen coords
+		A.getInhomCoords(a);
+		boolean onscreenA = view.toScreenCoords(a);
+
+		// calc direction vector of ray in screen coords
+		v[0] = ray.y * view.xscale;
+		v[1] = ray.x * view.yscale;
+		    	    	
 		// calc clip point C = a + lambda * v
 		double lambda;
 		if (Math.abs(v[0]) > Math.abs(v[1])) {
@@ -154,7 +153,21 @@ implements Previewable {
 			return;
 		}
 
-		line.setLine( a[0], a[1],  a[0] + 100*lambda * v[0], a[1] + 100*lambda * v[1]);		  
+		if (onscreenA ) {
+			// A on screen
+			line.setLine(a[0], a[1],  a[0] + lambda * v[0], a[1] + lambda * v[1]);
+		} else {
+			// A off screen
+			// clip ray at screen, that's important for huge coordinates of A
+			Point2D.Double [] clippedPoints = 
+				ClipLine.getClipped(a[0], a[1],  a[0] + lambda * v[0], a[1] + lambda * v[1], -EuclidianView.CLIP_DISTANCE, view.width + EuclidianView.CLIP_DISTANCE, -EuclidianView.CLIP_DISTANCE, view.height + EuclidianView.CLIP_DISTANCE);
+			if (clippedPoints == null) {
+				isVisible = false;	
+			} else {
+				line.setLine(clippedPoints[0].x, clippedPoints[0].y, clippedPoints[1].x, clippedPoints[1].y);
+			}
+		}
+		
     }
     
     final public void draw(Graphics2D g2) {
diff --git a/geogebra/euclidian/EuclidianController.java b/geogebra/euclidian/EuclidianController.java
index b65b0bd..0ad753f 100644
--- a/geogebra/euclidian/EuclidianController.java
+++ b/geogebra/euclidian/EuclidianController.java
@@ -1016,6 +1016,7 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 			// important for electronic whiteboards
 			if (movedGeoBoolean.isCheckboxFixed()) {
 				movedGeoBoolean.setValue(!movedGeoBoolean.getBoolean());
+				app.removeSelectedGeo(movedGeoBoolean); // make sure it doesn't get selected
 				movedGeoBoolean.updateCascade();
 
 			} 
@@ -1502,6 +1503,7 @@ MouseMotionListener, MouseWheelListener, ComponentListener {
 					GeoBoolean bool = (GeoBoolean)(hits.get(0));
 					if (!bool.isCheckboxFixed()) { // otherwise changed on mouse down
 						bool.setValue(!bool.getBoolean());
+						app.removeSelectedGeo(bool); // make sure doesn't get selected
 						bool.updateCascade();
 					}
 				}
diff --git a/geogebra/gui/ContextMenuGeoElement.java b/geogebra/gui/ContextMenuGeoElement.java
index 8e98e11..630565c 100644
--- a/geogebra/gui/ContextMenuGeoElement.java
+++ b/geogebra/gui/ContextMenuGeoElement.java
@@ -364,7 +364,7 @@ public class ContextMenuGeoElement extends JPopupMenu {
     		final GeoText geoText = (GeoText) geo;
     		 // show object
         	JCheckBoxMenuItem cbItem = new JCheckBoxMenuItem(app.getPlain("AbsoluteScreenLocation"));
-        	cbItem.setIcon(app.getEmptyIcon());
+        	app.setEmptyIcon(cbItem);
             cbItem.setSelected(geoText.isAbsoluteScreenLocActive());
             cbItem.addActionListener(new ActionListener() {
         		public void actionPerformed(ActionEvent e) {
@@ -457,7 +457,7 @@ public class ContextMenuGeoElement extends JPopupMenu {
             //  animation
             if (geo.isAnimatable()) {            	
                 cbItem = new JCheckBoxMenuItem( app.getPlain("Animating"));
-                cbItem.setIcon(app.getEmptyIcon());
+                app.setEmptyIcon(cbItem);
                 cbItem.setSelected(((GeoNumeric) geo).isAnimating() && app.getKernel().getAnimatonManager().isRunning());
                 cbItem.addActionListener(new ActionListener() {
                 	public void actionPerformed(ActionEvent e) {
@@ -498,7 +498,7 @@ public class ContextMenuGeoElement extends JPopupMenu {
             if (geo.isFixable() && (geo.isGeoText() || geo.isGeoImage())) {   
             	
             	cbItem = new JCheckBoxMenuItem( app.getPlain("FixObject"));
-                cbItem.setIcon(app.getEmptyIcon());
+                app.setEmptyIcon(cbItem);
                 cbItem.setSelected(geo.isFixed());
                 cbItem.addActionListener(new ActionListener() {
                 	public void actionPerformed(ActionEvent e) {
diff --git a/geogebra/gui/PropertiesDialogGeoElement.java b/geogebra/gui/PropertiesDialogGeoElement.java
index 9ed7cb0..9d57076 100644
--- a/geogebra/gui/PropertiesDialogGeoElement.java
+++ b/geogebra/gui/PropertiesDialogGeoElement.java
@@ -5248,6 +5248,7 @@ class ColorFunctionPanel
 				for (int i=0; i < geos.length; i++) {
 					GeoElement geo = (GeoElement) geos[i];	
 					geo.removeColorFunction();
+					geo.setObjColor(geo.getObjectColor());
 					geo.updateRepaint();
 				}
 				tfRed.setText("");
diff --git a/geogebra/gui/TextInputDialog.java b/geogebra/gui/TextInputDialog.java
index cd8aff7..c8f50e4 100644
--- a/geogebra/gui/TextInputDialog.java
+++ b/geogebra/gui/TextInputDialog.java
@@ -153,11 +153,11 @@ public class TextInputDialog extends InputDialog {
 						break;
 						
 					case 8: // 2x2 matrix
-						insertString("\\left(\\begin{array} a & b \\\\ c & d \\\\ \\end{array}\\right)");						
+						insertString("\\left(\\begin{array}{} a & b \\\\ c & d \\\\ \\end{array}\\right)");						
 						break;
 						
 					case 9: // 3x3 matrix
-						insertString("\\left(\\begin{array} a & b & c \\\\ d & e & f \\\\ g & h & i \\\\ \\end{array}\\right)");						
+						insertString("\\left(\\begin{array}{} a & b & c \\\\ d & e & f \\\\ g & h & i \\\\ \\end{array}\\right)");						
 						break;
 						
 					default:
diff --git a/geogebra/gui/menubar/MenubarImpl.java b/geogebra/gui/menubar/MenubarImpl.java
index 3658f3c..7a24880 100644
--- a/geogebra/gui/menubar/MenubarImpl.java
+++ b/geogebra/gui/menubar/MenubarImpl.java
@@ -331,45 +331,50 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 		menu.addSeparator();
 
 		cbShowAlgebraView = new JCheckBoxMenuItem(showAlgebraViewAction);		
-		cbShowAlgebraView.setIcon(app.getEmptyIcon());
+		app.setEmptyIcon(cbShowAlgebraView);
 		cbShowAlgebraView.setSelected(app.showAlgebraView());
 		setMenuShortCutShiftAccelerator(cbShowAlgebraView, 'A');
 		menu.add(cbShowAlgebraView);
 
 	    // Michael Borcherds 2008-01-14
 		cbShowSpreadsheet = new JCheckBoxMenuItem(showSpreadsheetAction);		
-		cbShowSpreadsheet.setIcon(app.getEmptyIcon());
+		app.setEmptyIcon(cbShowSpreadsheet);
 		cbShowSpreadsheet.setSelected(app.showSpreadsheetView());	
 		setMenuShortCutShiftAccelerator(cbShowSpreadsheet, 'S');
 		menu.add(cbShowSpreadsheet);		
 		
 		cbShowAuxiliaryObjects = new JCheckBoxMenuItem(
 				showAuxiliaryObjectsAction);
-		cbShowAuxiliaryObjects.setIcon(app.getEmptyIcon());
+		app.setEmptyIcon(cbShowAuxiliaryObjects);
 		cbShowAuxiliaryObjects.setSelected(app.showAuxiliaryObjects());
 		menu.add(cbShowAuxiliaryObjects);
 
 		cbHorizontalSplit = new JCheckBoxMenuItem(horizontalSplitAction);				
-		cbHorizontalSplit.setIcon(app.getEmptyIcon());
+		app.setEmptyIcon(cbHorizontalSplit);
 		menu.add(cbHorizontalSplit);
 
 		menu.addSeparator();
 
 		// show/hide cmdlist, algebra input
-		cbShowAlgebraInput = new JCheckBoxMenuItem(showAlgebraInputAction);		
+		cbShowAlgebraInput = new JCheckBoxMenuItem(showAlgebraInputAction);	
+		app.setEmptyIcon(cbShowAlgebraInput);
 		menu.add(cbShowAlgebraInput);
 
-		cbShowCmdList = new JCheckBoxMenuItem(showCmdListAction);		
+		cbShowCmdList = new JCheckBoxMenuItem(showCmdListAction);	
+		app.setEmptyIcon(cbShowCmdList);
 		menu.add(cbShowCmdList);
 		menu.addSeparator();
 
 		// Construction Protocol
 		cbShowConsProtNavigation = new JCheckBoxMenuItem(
 				showConsProtNavigationAction);
+		app.setEmptyIcon(cbShowConsProtNavigation);
 		cbShowConsProtNavigationPlay = new JCheckBoxMenuItem(
 				showConsProtNavigationPlayAction);
+		app.setEmptyIcon(cbShowConsProtNavigationPlay);
 		cbShowConsProtNavigationOpenProt = new JCheckBoxMenuItem(
 				showConsProtNavigationOpenProtAction);	
+		app.setEmptyIcon(cbShowConsProtNavigationOpenProt);
 		menu.add(constProtocolAction);
 		menu.add(cbShowConsProtNavigation);
 		menu.add(cbShowConsProtNavigationPlay);
@@ -690,8 +695,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 			}
 		};
 
-		showAlgebraInputAction = new AbstractAction(app.getMenu("InputField"),
-				app.getEmptyIcon()) {
+		showAlgebraInputAction = new AbstractAction(app.getMenu("InputField")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -702,8 +706,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 			}
 		};
 
-		showCmdListAction = new AbstractAction(app.getMenu("CmdList"),
-				app.getEmptyIcon()) {
+		showCmdListAction = new AbstractAction(app.getMenu("CmdList")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -739,8 +742,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 		};
 
 		showConsProtNavigationAction = new AbstractAction(
-				app.getPlain("ConstructionProtocolNavigation"),
-				app.getEmptyIcon()) {
+				app.getPlain("ConstructionProtocolNavigation")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -753,8 +755,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 		};
 
 		showConsProtNavigationPlayAction = new AbstractAction(
-				app.getPlain("PlayButton"),
-				app.getEmptyIcon()) {
+				app.getPlain("PlayButton")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -770,8 +771,7 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
 		};
 
 		showConsProtNavigationOpenProtAction = new AbstractAction(
-				app.getPlain("ConstructionProtocolButton"),
-				app.getEmptyIcon()) {
+				app.getPlain("ConstructionProtocolButton")) {
 			private static final long serialVersionUID = 1L;
 
 			public void actionPerformed(ActionEvent e) {
@@ -1755,6 +1755,6 @@ public abstract class MenubarImpl extends JMenuBar implements Menubar {
         }
     }
     
-    
+
   
 }
diff --git a/geogebra/kernel/AlgoAppend.java b/geogebra/kernel/AlgoAppend.java
index ddc7508..4a42cd0 100644
--- a/geogebra/kernel/AlgoAppend.java
+++ b/geogebra/kernel/AlgoAppend.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoBinomial.java b/geogebra/kernel/AlgoBinomial.java
index 2416f74..8bdab5e 100644
--- a/geogebra/kernel/AlgoBinomial.java
+++ b/geogebra/kernel/AlgoBinomial.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoDefined.java b/geogebra/kernel/AlgoDefined.java
index 3b4fddf..13c5388 100644
--- a/geogebra/kernel/AlgoDefined.java
+++ b/geogebra/kernel/AlgoDefined.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoDeterminant.java b/geogebra/kernel/AlgoDeterminant.java
index 93a3106..af4c8e7 100644
--- a/geogebra/kernel/AlgoDeterminant.java
+++ b/geogebra/kernel/AlgoDeterminant.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoExpand.java b/geogebra/kernel/AlgoExpand.java
index e04a8ff..4046af8 100644
--- a/geogebra/kernel/AlgoExpand.java
+++ b/geogebra/kernel/AlgoExpand.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoFactor.java b/geogebra/kernel/AlgoFactor.java
index 2e84177..5ac9aa3 100644
--- a/geogebra/kernel/AlgoFactor.java
+++ b/geogebra/kernel/AlgoFactor.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoFirst.java b/geogebra/kernel/AlgoFirst.java
index 1c5faf7..c8c61ec 100644
--- a/geogebra/kernel/AlgoFirst.java
+++ b/geogebra/kernel/AlgoFirst.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoGCD.java b/geogebra/kernel/AlgoGCD.java
index 1088cf6..0f368a8 100644
--- a/geogebra/kernel/AlgoGCD.java
+++ b/geogebra/kernel/AlgoGCD.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoInsert.java b/geogebra/kernel/AlgoInsert.java
index 8cc255d..c3e62b6 100644
--- a/geogebra/kernel/AlgoInsert.java
+++ b/geogebra/kernel/AlgoInsert.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoIntersection.java b/geogebra/kernel/AlgoIntersection.java
index bc64162..8e5107b 100644
--- a/geogebra/kernel/AlgoIntersection.java
+++ b/geogebra/kernel/AlgoIntersection.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoInvert.java b/geogebra/kernel/AlgoInvert.java
index 0934f2f..b7493eb 100644
--- a/geogebra/kernel/AlgoInvert.java
+++ b/geogebra/kernel/AlgoInvert.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoIsInteger.java b/geogebra/kernel/AlgoIsInteger.java
index 1a502fc..f577369 100644
--- a/geogebra/kernel/AlgoIsInteger.java
+++ b/geogebra/kernel/AlgoIsInteger.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoJoin.java b/geogebra/kernel/AlgoJoin.java
index e40a242..0dd7921 100644
--- a/geogebra/kernel/AlgoJoin.java
+++ b/geogebra/kernel/AlgoJoin.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/kernel/AlgoKeepIf.java b/geogebra/kernel/AlgoKeepIf.java
index fb68ed7..4bfe9f0 100644
--- a/geogebra/kernel/AlgoKeepIf.java
+++ b/geogebra/kernel/AlgoKeepIf.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoLCM.java b/geogebra/kernel/AlgoLCM.java
index 4b5ae1c..96c36bd 100644
--- a/geogebra/kernel/AlgoLCM.java
+++ b/geogebra/kernel/AlgoLCM.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoLast.java b/geogebra/kernel/AlgoLast.java
index df84d65..22ec5aa 100644
--- a/geogebra/kernel/AlgoLast.java
+++ b/geogebra/kernel/AlgoLast.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoListGCD.java b/geogebra/kernel/AlgoListGCD.java
index 6ff6c29..fdd8575 100644
--- a/geogebra/kernel/AlgoListGCD.java
+++ b/geogebra/kernel/AlgoListGCD.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoListLCM.java b/geogebra/kernel/AlgoListLCM.java
index d61845c..34081dc 100644
--- a/geogebra/kernel/AlgoListLCM.java
+++ b/geogebra/kernel/AlgoListLCM.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoPolynomialFromCoordinates.java b/geogebra/kernel/AlgoPolynomialFromCoordinates.java
index 5d2c7e8..78caa0b 100644
--- a/geogebra/kernel/AlgoPolynomialFromCoordinates.java
+++ b/geogebra/kernel/AlgoPolynomialFromCoordinates.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoPolynomialFromFunction.java b/geogebra/kernel/AlgoPolynomialFromFunction.java
index afdcc9c..9522ab7 100644
--- a/geogebra/kernel/AlgoPolynomialFromFunction.java
+++ b/geogebra/kernel/AlgoPolynomialFromFunction.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoRemoveUndefined.java b/geogebra/kernel/AlgoRemoveUndefined.java
index c551d59..2aa4c66 100644
--- a/geogebra/kernel/AlgoRemoveUndefined.java
+++ b/geogebra/kernel/AlgoRemoveUndefined.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoReverse.java b/geogebra/kernel/AlgoReverse.java
index be0a5bb..9ce27bd 100644
--- a/geogebra/kernel/AlgoReverse.java
+++ b/geogebra/kernel/AlgoReverse.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoSimplify.java b/geogebra/kernel/AlgoSimplify.java
index 6f754c2..bd8f21e 100644
--- a/geogebra/kernel/AlgoSimplify.java
+++ b/geogebra/kernel/AlgoSimplify.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoSort.java b/geogebra/kernel/AlgoSort.java
index 87e38bf..b228dc2 100644
--- a/geogebra/kernel/AlgoSort.java
+++ b/geogebra/kernel/AlgoSort.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoTake.java b/geogebra/kernel/AlgoTake.java
index 04b83c7..7fa3bc6 100644
--- a/geogebra/kernel/AlgoTake.java
+++ b/geogebra/kernel/AlgoTake.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoTranspose.java b/geogebra/kernel/AlgoTranspose.java
index 282466c..4147a4f 100644
--- a/geogebra/kernel/AlgoTranspose.java
+++ b/geogebra/kernel/AlgoTranspose.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/AlgoUnion.java b/geogebra/kernel/AlgoUnion.java
index 1234c5d..299b685 100644
--- a/geogebra/kernel/AlgoUnion.java
+++ b/geogebra/kernel/AlgoUnion.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/GeoElement.java b/geogebra/kernel/GeoElement.java
index e4f43e0..bb5ccd9 100644
--- a/geogebra/kernel/GeoElement.java
+++ b/geogebra/kernel/GeoElement.java
@@ -2051,10 +2051,24 @@ public abstract class GeoElement
 		// remove this object from List
 		if (isIndependent()) 
 			cons.removeFromConstructionList(this);
+		
+		// remove Listeners
+		AlgoElement algo = getParentAlgorithm();
+		if (algo instanceof EuclidianViewAlgo) {
+			cons.unregisterEuclidianViewAlgo((EuclidianViewAlgo)algo);
+		}
+
+		if (condShowObject != null) {
+			condShowObject.unregisterConditionListener(this);
+		}
+				
+		if (colFunction != null) {
+			colFunction.unregisterColorFunctionListener(this);
+		}
+
 
 		// remove all dependent algorithms		
 		if (algorithmList != null) {
-			AlgoElement algo;
 			Object[] algos = algorithmList.toArray();
 			for (int i = 0; i < algos.length; i++) {
 				algo = (AlgoElement) algos[i];
@@ -2068,8 +2082,8 @@ public abstract class GeoElement
 		}
 
 		// remove from selection
-		app.removeSelectedGeo(this, false);					
-				
+		app.removeSelectedGeo(this, false);		
+		
 		// notify views before we change labelSet
 		notifyRemove();
 		
diff --git a/geogebra/kernel/GeoList.java b/geogebra/kernel/GeoList.java
index c2bfc75..b3cf03d 100644
--- a/geogebra/kernel/GeoList.java
+++ b/geogebra/kernel/GeoList.java
@@ -163,6 +163,8 @@ public class GeoList extends GeoElement implements ListValue, LineProperties, Po
 			// copy color function
 			if (this.colFunction != null) {
 				geo.setColorFunction(this.colFunction);
+			} else {
+				geo.removeColorFunction();
 			}
 			
 			geo.setLineThickness(this.getLineThickness());
@@ -204,8 +206,9 @@ public class GeoList extends GeoElement implements ListValue, LineProperties, Po
     	int size = geoList.size();	        
         for (int i=0; i < size; i++) {
 			GeoElement geo = (GeoElement)geoList.get(i);
-			if (!geo.isLabelSet())
+			if (!geo.isLabelSet()) {
         		geo.removeColorFunction();
+			}
         }
 	}
 	
diff --git a/geogebra/kernel/GeoPolygon.java b/geogebra/kernel/GeoPolygon.java
index d83bf7c..554a423 100644
--- a/geogebra/kernel/GeoPolygon.java
+++ b/geogebra/kernel/GeoPolygon.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/Kernel.java b/geogebra/kernel/Kernel.java
index 0e4d7fe..d0256ab 100644
--- a/geogebra/kernel/Kernel.java
+++ b/geogebra/kernel/Kernel.java
@@ -4939,17 +4939,17 @@ public class Kernel {
 	}
 
 	/**
-	 * Returns whether x is greater than y
+	 * Returns whether x is greater than y	 	 
 	 */
 	final public boolean isGreater(double x, double y) {
-		return x > y;
+		return x > y + EPSILON;
 	}
-
+	
 	/**
-	 * Returns whether x is greater than or equal to y
+	 * Returns whether x is greater than or equal to y	 	 
 	 */
 	final public boolean isGreaterEqual(double x, double y) {
-		return x > y || isEqual(x, y);
+		return x + EPSILON > y;
 	}
 
 	// compares double arrays:
diff --git a/geogebra/kernel/parser/Parser.jj b/geogebra/kernel/parser/Parser.jj
index 7d88d89..21d1002 100644
--- a/geogebra/kernel/parser/Parser.jj
+++ b/geogebra/kernel/parser/Parser.jj
@@ -173,7 +173,7 @@ TOKEN : {
         | "." <INTEGER> 
         | <INTEGER> "."
         >
- |     < EFLOAT: <FLOAT> "E"  (<MINUS>)? <INTEGER> >
+ |     < EFLOAT: <FLOAT> "E"  (<PLUS>|<MINUS>)? <INTEGER> >
   |     < #INTEGER: ( <DIGIT> )+ >
   |     < #DIGIT:                                     // unicode digits
        [
diff --git a/geogebra/kernel/statistics/AlgoFitLineX.java b/geogebra/kernel/statistics/AlgoFitLineX.java
index 44ce8f7..ca6692c 100644
--- a/geogebra/kernel/statistics/AlgoFitLineX.java
+++ b/geogebra/kernel/statistics/AlgoFitLineX.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoFitLineY.java b/geogebra/kernel/statistics/AlgoFitLineY.java
index 6f6984b..4cb53ee 100644
--- a/geogebra/kernel/statistics/AlgoFitLineY.java
+++ b/geogebra/kernel/statistics/AlgoFitLineY.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoInverseNormal.java b/geogebra/kernel/statistics/AlgoInverseNormal.java
index 9fc9dac..a2a4f81 100644
--- a/geogebra/kernel/statistics/AlgoInverseNormal.java
+++ b/geogebra/kernel/statistics/AlgoInverseNormal.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoMedian.java b/geogebra/kernel/statistics/AlgoMedian.java
index 922d66a..8114511 100644
--- a/geogebra/kernel/statistics/AlgoMedian.java
+++ b/geogebra/kernel/statistics/AlgoMedian.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoMode.java b/geogebra/kernel/statistics/AlgoMode.java
index cfd9c35..03b7d3b 100644
--- a/geogebra/kernel/statistics/AlgoMode.java
+++ b/geogebra/kernel/statistics/AlgoMode.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoNormal.java b/geogebra/kernel/statistics/AlgoNormal.java
index 45ba9a0..92f30ec 100644
--- a/geogebra/kernel/statistics/AlgoNormal.java
+++ b/geogebra/kernel/statistics/AlgoNormal.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoQ1.java b/geogebra/kernel/statistics/AlgoQ1.java
index dee4c14..f461d67 100644
--- a/geogebra/kernel/statistics/AlgoQ1.java
+++ b/geogebra/kernel/statistics/AlgoQ1.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoQ3.java b/geogebra/kernel/statistics/AlgoQ3.java
index 96decf2..5cf4659 100644
--- a/geogebra/kernel/statistics/AlgoQ3.java
+++ b/geogebra/kernel/statistics/AlgoQ3.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
 */
diff --git a/geogebra/kernel/statistics/AlgoRandom.java b/geogebra/kernel/statistics/AlgoRandom.java
index 0f59fcf..71759f3 100644
--- a/geogebra/kernel/statistics/AlgoRandom.java
+++ b/geogebra/kernel/statistics/AlgoRandom.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/kernel/statistics/AlgoRandomBinomial.java b/geogebra/kernel/statistics/AlgoRandomBinomial.java
index 7bc18ee..c7cc926 100644
--- a/geogebra/kernel/statistics/AlgoRandomBinomial.java
+++ b/geogebra/kernel/statistics/AlgoRandomBinomial.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/kernel/statistics/AlgoRandomNormal.java b/geogebra/kernel/statistics/AlgoRandomNormal.java
index 21f2257..e173696 100644
--- a/geogebra/kernel/statistics/AlgoRandomNormal.java
+++ b/geogebra/kernel/statistics/AlgoRandomNormal.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/kernel/statistics/AlgoRandomPoisson.java b/geogebra/kernel/statistics/AlgoRandomPoisson.java
index 883513c..6de8a9b 100644
--- a/geogebra/kernel/statistics/AlgoRandomPoisson.java
+++ b/geogebra/kernel/statistics/AlgoRandomPoisson.java
@@ -5,7 +5,7 @@ http://www.geogebra.org
 This file is part of GeoGebra.
 
 This program is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License v2 as published by 
+under the terms of the GNU General Public License as published by 
 the Free Software Foundation.
 
  */
diff --git a/geogebra/main/Application.java b/geogebra/main/Application.java
index 6da86a4..d613cfa 100644
--- a/geogebra/main/Application.java
+++ b/geogebra/main/Application.java
@@ -88,6 +88,7 @@ import javax.imageio.ImageIO;
 import javax.swing.BorderFactory;
 import javax.swing.ImageIcon;
 import javax.swing.JApplet;
+import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JComponent;
 import javax.swing.JDialog;
 import javax.swing.JFrame;
@@ -119,9 +120,7 @@ public abstract class Application implements KeyEventDispatcher {
 	// supported GUI languages (from properties files)
 	public static ArrayList supportedLocales = new ArrayList();
 	static {
-		// TODO: remove IS_PRE_RELEASE
-		if (GeoGebra.IS_PRE_RELEASE)
-			supportedLocales.add(new Locale("sq")); // Albanian
+		supportedLocales.add(new Locale("sq")); // Albanian
 		
 		supportedLocales.add(new Locale("ar")); // Arabic
 		supportedLocales.add(new Locale("eu")); // Basque
@@ -168,23 +167,17 @@ public abstract class Application implements KeyEventDispatcher {
 		supportedLocales.add(new Locale("ro")); // Romanian
 		supportedLocales.add(new Locale("ru")); // Russian
 		supportedLocales.add(new Locale("sr")); // Serbian
-		// TODO: remove IS_PRE_RELEASE
-		if (GeoGebra.IS_PRE_RELEASE)
-			supportedLocales.add(new Locale("si")); // Sinhala (Sri Lanka)
+		supportedLocales.add(new Locale("si")); // Sinhala (Sri Lanka)
 		
 		supportedLocales.add(new Locale("sk")); // Slovakian
 		supportedLocales.add(new Locale("sl")); // Slovenian
 		supportedLocales.add(new Locale("es")); // Spanish
 		supportedLocales.add(new Locale("sv")); // Swedish
 		// supportedLocales.add(new Locale("ty")); // Tahitian
-		// TODO: remove IS_PRE_RELEASE
-		if (GeoGebra.IS_PRE_RELEASE)
-			supportedLocales.add(new Locale("ta")); // Tamil
+		supportedLocales.add(new Locale("ta")); // Tamil
 		
 		// supportedLocales.add(new Locale("te")); // Telugu
-		// TODO: remove IS_PRE_RELEASE
-		if (GeoGebra.IS_PRE_RELEASE)
-			supportedLocales.add(new Locale("th")); // Thai
+		supportedLocales.add(new Locale("th")); // Thai
 
 		supportedLocales.add(new Locale("tr")); // Turkish
 		// supportedLocales.add(new Locale("uk")); // Ukrainian
@@ -3065,12 +3058,48 @@ public abstract class Application implements KeyEventDispatcher {
 	}
 
 	// check if we are on a mac
-	public static boolean MAC_OS = System.getProperty("os.name").toLowerCase(
-			Locale.US).startsWith("mac");
-	public static boolean WINDOWS = System.getProperty("os.name").toLowerCase(
-			Locale.US).startsWith("windows"); // Michael Borcherds 2008-03-21
+	public static String OS = System.getProperty("os.name").toLowerCase(Locale.US);
+	public static boolean MAC_OS = OS.startsWith("mac");
+	public static boolean WINDOWS = OS.startsWith("windows"); // Michael Borcherds 2008-03-21
+	
+			/* current possible values http://mindprod.com/jgloss/properties.html
+			 * AIX
+		Digital Unix
+		FreeBSD
+		HP UX
+		Irix
+		Linux
+		Mac OS
+		Mac OS X
+		MPE/iX
+		Netware 4.11
+		OS/2
+		Solaris
+		Windows 2000
+		Windows 7
+		Windows 95
+		Windows 98
+		Windows NT
+		Windows Vista
+		Windows XP */
+	
+	// make sure still works in the future on eg Windows 9 
+	public static boolean WINDOWS_VISTA_OR_LATER = WINDOWS && !OS.startsWith("windows 2000")
+														   && !OS.startsWith("windows 95")
+														   && !OS.startsWith("windows 98")
+														   && !OS.startsWith("windows nt")
+														   && !OS.startsWith("windows xp");
 
 	/*
+	 * needed for padding in Windows XP or earlier
+	 * without check, checkbox isn't shown in Vista, Win 7
+	 */
+    public void setEmptyIcon(JCheckBoxMenuItem cb) {
+        if (!WINDOWS_VISTA_OR_LATER)
+                cb.setIcon(getEmptyIcon());
+    }
+
+    /*
 	 * check for alt pressed (but not ctrl) (or ctrl but not alt on MacOS)
 	 */
 	public static boolean isAltDown(InputEvent e) {
diff --git a/unix/debcontrol/postinst b/unix/debcontrol/postinst
new file mode 100755
index 0000000..195b1b0
--- /dev/null
+++ b/unix/debcontrol/postinst
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] ; then
+  # update desktop database
+  if [ -x /usr/bin/update-desktop-database ]; then
+    update-desktop-database -q /usr/share/applications
+  fi
+fi
+ # Automatically added by dh_installmime
+if [ "$1" = "configure" ] && [ -x "`which update-mime-database 2>/dev/null`" ]; then
+	update-mime-database /usr/share/mime
+fi
+# End automatically added section
+# Automatically added by dh_gconf
+if [ "$1" = "configure" ] && which update-gconf-defaults >/dev/null 2>&1; then
+	update-gconf-defaults 
+fi
+# End automatically added section
+
+
diff --git a/unix/debcontrol/postrm b/unix/debcontrol/postrm
new file mode 100755
index 0000000..7737dbe
--- /dev/null
+++ b/unix/debcontrol/postrm
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+ # Automatically added by dh_gconf
+if which update-gconf-defaults >/dev/null 2>&1; then
+	update-gconf-defaults 
+fi
+# End automatically added section
+# Automatically added by dh_installmime
+if [ -x "`which update-mime-database 2>/dev/null`" ]; then
+	update-mime-database /usr/share/mime
+fi
+# End automatically added section
+
+
diff --git a/unix/debrelease/Packages b/unix/debrelease/Packages
new file mode 100644
index 0000000..9e37258
--- /dev/null
+++ b/unix/debrelease/Packages
@@ -0,0 +1,21 @@
+*Package: geogebra
+*Version: [[version]]
+*Architecture: all
+*Maintainer: Markus Hohenwarter <markus at geogebra.org>
+*Installed-Size: [[installed.kb]]
+*Depends: sun-java6-jre | sun-java5-jre | default-jre
+*Recommends: sun-java6-jre | sun-java5-jre, imagemagick
+Filename: ./geogebra_[[version]]_all.deb
+Size: [[size]]
+MD5sum: [[md5]]
+SHA1: [[sha1]]
+SHA256: [[sha256]]
+*Section: math
+*Priority: optional
+*Description: Dynamic mathematics software for all levels of education
+ GeoGebra joins arithmetic, geometry, algebra and calculus. It offers multiple
+ representations of objects in its graphics, algebra, and spreadsheet views
+ that are all dynamically linked.
+ This package also contains a thumbnailer for .ggb files which runs only when
+ imagemagick is installed.
+
diff --git a/unix/debrelease/Release b/unix/debrelease/Release
new file mode 100644
index 0000000..d04a7cd
--- /dev/null
+++ b/unix/debrelease/Release
@@ -0,0 +1,10 @@
+Origin: GeoGebra unofficial repo
+Label: GeoGebra
+Codename: lucid
+Date: Sun, 04 Apr 2010 09:08:27 +0000
+Architectures: i386
+Components: main
+Description: GeoGebra -- Dynamic mathematics for everyone
+MD5Sum:
+ [[plain.md5]] [[plain.size]] main/binary-i386/Packages
+ [[gz.md5]] [[gz.size]] main/binary-i386/Packages.gz
diff --git a/unix/usr/bin/geogebra b/unix/usr/bin/geogebra
new file mode 100755
index 0000000..eee626a
--- /dev/null
+++ b/unix/usr/bin/geogebra
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+java -jar /usr/share/geogebra/lib/geogebra.jar "$@"
+
diff --git a/unix/usr/bin/ggthumb b/unix/usr/bin/ggthumb
new file mode 100755
index 0000000..67c9de8
--- /dev/null
+++ b/unix/usr/bin/ggthumb
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+urldecode(){
+  echo -e "$(sed 'y/+/ /; s/%/\\x/g')"
+}
+
+mkdir /tmp/ggthumb
+f=`echo -n $3| sed 's/file:\/\///'|urldecode`
+cp "$f" /tmp/ggthumb/ggt.zip
+unzip -qq /tmp/ggthumb/ggt.zip -d /tmp/ggthumb
+convert -resize $2 /tmp/ggthumb/geogebra_thumbnail.png $4 2>/dev/null
+echo "$3 $f $?">>/tmp/glog
+rm -rf /tmp/ggthumb
diff --git a/unix/usr/share/applications/geogebra.desktop b/unix/usr/share/applications/geogebra.desktop
new file mode 100644
index 0000000..1631774
--- /dev/null
+++ b/unix/usr/share/applications/geogebra.desktop
@@ -0,0 +1,24 @@
+[Desktop Entry]
+Name=GeoGebra
+GenericName=Dynamic mathematics software
+GenericName[cs]=Dynamický matematický software
+GenericName[de]=Dynamische Mathematiksoftware
+GenericName[es]=Programa de matemáticas dinámico
+GenericName[fr]=Logiciel de Mathématiques dynamiques
+GenericName[hi]=सक्रिय गणितीय सॉफ्टवेर 
+GenericName[it]=Software di matematica dinamica
+GenericName[pt_BR]=Programa de Matemática Dinâmica
+Comment=Create interactive mathematical constructions and applets. 
+Comment[cs]=Vytvořte interaktivní konstrukce a aplety.
+Comment[de]=Erstelle interaktive Konstruktionen und Applets.
+Comment[fr]=Créer des constructions mathématiques et des appliquettes.
+Comment[hi]=संवादात्मक गणितीय निर्माण और एप्लेट बनाएँ
+Comment[it]=Creazione di costruzioni matematiche e applet interattive.
+Comment[pt_BR]=Crie construções matemáticas interativas e applets.
+Exec=geogebra
+Icon=geogebra.png
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Science;Math;Education
+MimeType=application/vnd.geogebra.file;application/vnd.geogebra.tool;
diff --git a/unix/usr/share/doc/geogebra/README.Debian b/unix/usr/share/doc/geogebra/README.Debian
new file mode 100644
index 0000000..1f791c9
--- /dev/null
+++ b/unix/usr/share/doc/geogebra/README.Debian
@@ -0,0 +1,8 @@
+geogebra for Debian
+-------------------
+
+For GeoGebra to work properly, you may have to replace the openjdk by
+sun-java6. For more details see 
+http://www.geogebra.org/en/wiki/index.php/GeoGebra_in_Linux
+
+ -- Zbynek Konecny (Kondr) <kondr at lesnimoudrost.cz>  Mon, 29 Mar 2010 00:12:03 +0200
diff --git a/unix/usr/share/doc/geogebra/changelog.gz b/unix/usr/share/doc/geogebra/changelog.gz
new file mode 100644
index 0000000..6a23cff
Binary files /dev/null and b/unix/usr/share/doc/geogebra/changelog.gz differ
diff --git a/unix/usr/share/doc/geogebra/copyright b/unix/usr/share/doc/geogebra/copyright
new file mode 100644
index 0000000..a0bb4b7
--- /dev/null
+++ b/unix/usr/share/doc/geogebra/copyright
@@ -0,0 +1,36 @@
+This package was debianized by George Sturr <george at geogebra.org> 
+Sat, 03 Apr 2010 21:39:06 +0100.
+
+It was downloaded from http://www.geogebra.org/
+
+Upstream Authors:
+
+    Markus Hohenwarter <markus at geogebra.org>
+    Michael Borcherds  <michael at geogebra.org>
+    Mathieu Blosier <mathieu at geogebra.org>
+    Judith Hohenwarter <judith at geogebra.org> 
+    Zoltan Kovacs <zoltan at geogebra.org>
+    Yves Kreis <yves at geogebra.org>
+    Florian Sonner <florian at geogebra.org>
+    George Sturr <george at geogebra.org>
+    
+Copyright:
+
+    Copyright (C) 2010 International GeoGebra Institute
+
+License:
+
+    GPL v2 and Creative Commons Attribution-Share Alike 3.0
+
+The Debian packaging is:
+
+    Copyright (C) 2010 George Sturr <george at geogebra.org>
+
+and is licensed under the GPL version 3, 
+see `/usr/share/common-licenses/GPL-3'.
+
+All GeoGebra language and documentation files are subject to 
+   the following Creative Commons Attribution-Share Alike License; 
+   either version 3.0 of the License, or (at your option) any later 
+   version (see http://creativecommons.org/licenses/by-sa/3.0/):
+
diff --git a/unix/usr/share/gconf/defaults/10_geogebra b/unix/usr/share/gconf/defaults/10_geogebra
new file mode 100644
index 0000000..e7b1a74
--- /dev/null
+++ b/unix/usr/share/gconf/defaults/10_geogebra
@@ -0,0 +1,3 @@
+/desktop/gnome/thumbnailers/application at geogebra.vnd.file/command /usr/bin/ggthumb -s %s %u %o
+/desktop/gnome/thumbnailers/application at geogebra.vnd.file/enable true
+
diff --git a/unix/usr/share/icons/hicolor/48x48/apps/geogebra.png b/unix/usr/share/icons/hicolor/48x48/apps/geogebra.png
new file mode 100644
index 0000000..fbd66e6
Binary files /dev/null and b/unix/usr/share/icons/hicolor/48x48/apps/geogebra.png differ
diff --git a/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.file.png b/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.file.png
new file mode 100644
index 0000000..fbd66e6
Binary files /dev/null and b/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.file.png differ
diff --git a/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.tool.png b/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.tool.png
new file mode 100644
index 0000000..fbd66e6
Binary files /dev/null and b/unix/usr/share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.tool.png differ
diff --git a/unix/usr/share/man/man1/geogebra.1.gz b/unix/usr/share/man/man1/geogebra.1.gz
new file mode 100644
index 0000000..4b76848
Binary files /dev/null and b/unix/usr/share/man/man1/geogebra.1.gz differ
diff --git a/unix/usr/share/man/man1/ggthumb.1.gz b/unix/usr/share/man/man1/ggthumb.1.gz
new file mode 100644
index 0000000..74aeb28
Binary files /dev/null and b/unix/usr/share/man/man1/ggthumb.1.gz differ
diff --git a/unix/usr/share/mime/packages/geogebra.xml b/unix/usr/share/mime/packages/geogebra.xml
new file mode 100644
index 0000000..e908dab
--- /dev/null
+++ b/unix/usr/share/mime/packages/geogebra.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+  <mime-type type="application/vnd.geogebra.file">
+         <comment>GeoGebra worksheet</comment>
+         <comment xml:lang="cs">Pracovní list GeoGebry</comment>
+         <comment xml:lang="de">GeoGebra Arbeitsblatt</comment>
+         <comment xml:lang="es">Archivo GeoGebra</comment>
+         <comment xml:lang="fr">Feuille de travail GeoGebra </comment>
+         <comment xml:lang="hi">जीओ-जेब्रा कार्य-पत्र</comment>
+         <comment xml:lang="it">Foglio di lavoro GeoGebra </comment>
+         <comment xml:lang="pt-BR">Planilha GeoGebra</comment>
+         <glob pattern="*.ggb"/>
+  </mime-type>
+  <mime-type type="application/vnd.geogebra.tool">
+         <comment>GeoGebra tool</comment>
+         <comment xml:lang="cs">Nástroj GeoGebry</comment>
+         <comment xml:lang="de">GeoGebra Werkzeug</comment>
+         <comment xml:lang="es">Herramienta GeoGebra</comment>
+         <comment xml:lang="fr">Outil GeoGebra</comment>
+         <comment xml:lang="hi">जीओ-जेब्रा साधन</comment>
+         <comment xml:lang="it">Strumento GeoGebra</comment>
+         <comment xml:lang="pt-BR">Ferramenta GeoGebra</comment>
+         <glob pattern="*.ggt"/>
+  </mime-type>
+</mime-info>
diff --git a/unix/usr/share/pixmaps/geogebra.png b/unix/usr/share/pixmaps/geogebra.png
new file mode 100644
index 0000000..fbd66e6
Binary files /dev/null and b/unix/usr/share/pixmaps/geogebra.png differ


hooks/post-receive
-- 
GeoGebra: Dynamic mathematics software for education



More information about the pkg-java-commits mailing list