]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/gtkmathview-bonobo/test/main.c
* a few adjustments and debugging messages added
[helm.git] / helm / gtkmathview-bonobo / test / main.c
index fc9715e6d87107b1d1a8872f9c6329cf5b8c7a19..dccb6e63a570e25b6948f5003e99adf64550fd81 100644 (file)
@@ -46,14 +46,19 @@ load_through_persist_stream(const gchar *filename,
     CORBA_Environment ev;
     CORBA_exception_init (&ev);
 
+#if 0
+    stream = bonobo_stream_open ("fs", filename,
+                                Bonobo_Storage_READ, 0);
+#endif
+
     /*if (stream == NULL) 
     {
         g_warning ("Couldn't load `%s'\n", filename);
     } else*/ {
         Bonobo_Stream corba_stream;
-        //corba_stream = bonobo_object_corba_objref (stream);
-        //Bonobo_Stream_truncate (corba_stream, 0, &ev);
-        Bonobo_PersistStream_load (pstream, corba_stream,"",&ev);
+        corba_stream = bonobo_object_corba_objref (stream);
+        Bonobo_Stream_truncate (corba_stream, 0, &ev);
+        Bonobo_PersistStream_load (pstream, corba_stream, "application/mathml+xml", &ev);
     }
     Bonobo_Unknown_unref (pstream, &ev);
     CORBA_Object_release (pstream, &ev);
@@ -90,8 +95,8 @@ file_selection_ok_cb (GtkWidget *widget,
        (GTK_FILE_SELECTION (file_selection_info.widget));
        switch (file_selection_info.Operations) {
            case LOAD_STREAM:
-               load_through_persist_stream (fname, interface);
-               break;
+            load_through_persist_stream (fname, interface);
+            break;
            case LOAD_FILE:
                load_through_persist_file (fname, interface);
                break;