From 4e3448a11133f4e5568b33157b45b744ee75a1b7 Mon Sep 17 00:00:00 2001 From: Luca Padovani <luca.padovani@unito.it> Date: Tue, 23 Mar 2004 21:03:55 +0000 Subject: [PATCH] * added test with MathML really embedded within HTML * set plugin border to 0 (? black line still visible) * is set SHADOW_NONE the plugin window gets dirty!!! :-( --- helm/gtkmathview-bonobo/src/control-factory.c | 5 ++-- helm/gtkmathview-bonobo/test/embedding.xml | 30 +++++++++++++++++++ helm/gtkmathview-bonobo/test/test.mml | 6 ++-- .../test/testembedding.html | 2 +- 4 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 helm/gtkmathview-bonobo/test/embedding.xml diff --git a/helm/gtkmathview-bonobo/src/control-factory.c b/helm/gtkmathview-bonobo/src/control-factory.c index 59611ab75..6d90bef3d 100644 --- a/helm/gtkmathview-bonobo/src/control-factory.c +++ b/helm/gtkmathview-bonobo/src/control-factory.c @@ -408,8 +408,9 @@ gtk_math_view_control_factory(BonoboGenericFactory* factory, const gchar* compon GtkWidget *scrolled_window; scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_SHADOW_IN); + /* putting SHADOW_NONE screws the plugin window, how's that??? */ + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN); + gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_show_all (scrolled_window); diff --git a/helm/gtkmathview-bonobo/test/embedding.xml b/helm/gtkmathview-bonobo/test/embedding.xml new file mode 100644 index 000000000..b0d12e52d --- /dev/null +++ b/helm/gtkmathview-bonobo/test/embedding.xml @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> </head> + +<body> + + <h1>GtkMathView-Bonobo test page</h1> + + The embedded object should display a mathematical formula. + <br /> + + <object data="#math1" width="500" height="100" type="application/mathml+xml"> + No viewer capable of displaying the test document installed. + <input type="hidden"> + <math id="math1" display="block" xmlns="http://www.w3.org/1998/Math/MathML"> + <mfrac> + <mi href="http://www.google.it">x</mi> + <mn>2</mn> + </mfrac> + <mo>=</mo> + <mtext href="javascript:alert('like if I can do that')">click for the answer</mtext> + </math> + </input> + </object> + + </body> + +</html> + diff --git a/helm/gtkmathview-bonobo/test/test.mml b/helm/gtkmathview-bonobo/test/test.mml index e75e48838..2436838bf 100644 --- a/helm/gtkmathview-bonobo/test/test.mml +++ b/helm/gtkmathview-bonobo/test/test.mml @@ -25,7 +25,7 @@ <mi>x</mi> </mrow> <mo>+</mo> - <mi href="questo era q">q</mi> + <mi href="javascript:alert('You clicked on q')">q</mi> </mrow> </mfrac> </mrow> @@ -121,6 +121,8 @@ </mrow> </mrow> <mo>+</mo> - <mi>c</mi> + <mi href="javascript:alert('You clicked on c')">c</mi> </mrow> + <mspace width="1cm"/> + <mtext href="http://www.cs.unibo.it/~lpadovan/">go to Luca's home page</mtext> </math> diff --git a/helm/gtkmathview-bonobo/test/testembedding.html b/helm/gtkmathview-bonobo/test/testembedding.html index 251c4cfc2..e894388d6 100644 --- a/helm/gtkmathview-bonobo/test/testembedding.html +++ b/helm/gtkmathview-bonobo/test/testembedding.html @@ -9,7 +9,7 @@ The embedded object should display a mathematical formula. <br /> <br /> -<object data="test2.mml" width="400" height="100" type="application/mathml+xml"> +<object data="test.mml" width="500" height="100" type="application/mathml+xml"> No viewer capable of displaying the test document installed. </object> -- 2.39.2