]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/gtkmathview-bonobo/src/persist-file.c
* added first version of persist stream implementation (not yet working)
[helm.git] / helm / gtkmathview-bonobo / src / persist-file.c
index 68914ded4133fe07d42ab3c4f7c2f470a8a4a195..36b4536a45b215b52bc1105804c368b9a5523040 100644 (file)
@@ -39,7 +39,9 @@ gtk_math_view_persist_file_class_init(GtkMathViewPersistFileClass *klass)
        BonoboPersistClass *persist_class = BONOBO_PERSIST_CLASS(klass);
        POA_Bonobo_PersistFile__epv *epv = &klass->epv;
 
+#ifdef DEBUG
        printf("persist file class init\n");
+#endif
        gtk_math_view_persist_file_parent_class = g_type_class_peek_parent(klass);
 
        epv->load = load_implementation;
@@ -53,7 +55,9 @@ GType
 gtk_math_view_persist_file_get_type(void)
 {
        static GType type = 0;
+#ifdef DEBUG
        printf("persist file get type\n");
+#endif
        if(!type){
                GTypeInfo info = {
                        sizeof(GtkMathViewPersistFileClass),
@@ -103,11 +107,14 @@ load_implementation(PortableServer_Servant servant,const gchar *path,CORBA_Envir
        {
                CORBA_exception_set(ev,CORBA_USER_EXCEPTION,ex_Bonobo_Persist_WrongDataType,NULL);
        }
+    bonobo_object_unref(BONOBO_OBJECT(file));
        return ;
 }
 
 static void
-save_implementation(PortableServer_Servant servant,const gchar *path,CORBA_Environment *ev)
+save_implementation(PortableServer_Servant servant,
+                    const gchar *path,
+                    CORBA_Environment *ev)
 {
        bonobo_exception_set(ev,"save_exception");
        bonobo_exception_add_handler_str("save_exception",