]> matita.cs.unibo.it Git - helm.git/commitdiff
* added test with MathML really embedded within HTML
authorLuca Padovani <luca.padovani@unito.it>
Tue, 23 Mar 2004 21:03:55 +0000 (21:03 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Tue, 23 Mar 2004 21:03:55 +0000 (21:03 +0000)
* 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
helm/gtkmathview-bonobo/test/embedding.xml [new file with mode: 0644]
helm/gtkmathview-bonobo/test/test.mml
helm/gtkmathview-bonobo/test/testembedding.html

index 59611ab755586a488f7376740ffcc138a754e283..6d90bef3d27d147300fb345c678034c1fe0f7795 100644 (file)
@@ -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 (file)
index 0000000..b0d12e5
--- /dev/null
@@ -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>
+
index e75e4883878cce4ef85bbcbfcd17cda8d7a7ebdb..2436838bfc4be74567edd4c8c97eaea74770c7c1 100644 (file)
@@ -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>
       </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>
index 251c4cfc2bc1af0764b58649501c8cb9d872a1bb..e894388d616a3edf0eb2825dc6b792ff99454e6b 100644 (file)
@@ -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>