static Bonobo_Persist_ContentTypeList *
get_content_types(BonoboPersist *persist,CORBA_Environment *ev)
{
- //FIXME: il tipo di dato non e` noto
- return bonobo_persist_generate_content_types(0);
+ return bonobo_persist_generate_content_types(3, "application/mathml+xml", "text/mathml", "text/plain");
}
BonoboObject *
gtk_math_view_persist_file_new(GtkMathView *math_view)
{
- BonoboObject *file;
+ BonoboObject *file;
- printf("persist file new\n");
- file = g_object_new(gtk_math_view_persist_file_get_type(),NULL);
- bonobo_persist_construct(BONOBO_PERSIST(file),CONTROL_FACTORY_ID);
+ printf("persist file new\n");
+ file = g_object_new(gtk_math_view_persist_file_get_type(),NULL);
+ bonobo_persist_construct(BONOBO_PERSIST(file),CONTROL_FACTORY_ID);
- g_object_ref(math_view);
- GTK_MATH_VIEW_PERSIST_FILE(file)->math_view = math_view;
+ g_object_ref(math_view);
+ GTK_MATH_VIEW_PERSIST_FILE(file)->math_view = math_view;
- return file;
+ printf("OK\n");
+
+ return file;
}
static void
load_implementation(PortableServer_Servant servant,const gchar *path,CORBA_Environment *ev)
{
- gboolean result;
- GtkMathViewPersistFile* file = GTK_MATH_VIEW_PERSIST_FILE(bonobo_object_from_servant(servant));
- //fd = open(path, O_RDONLY);
-
- result = gtk_math_view_load_uri(file->math_view,path);
- if(!result)
- {
- CORBA_exception_set(ev,CORBA_USER_EXCEPTION,ex_Bonobo_Persist_WrongDataType,NULL);
- }
- bonobo_object_unref(BONOBO_OBJECT(file));
- return ;
+ gboolean result;
+ GtkMathViewPersistFile* file = GTK_MATH_VIEW_PERSIST_FILE(bonobo_object_from_servant(servant));
+ //fd = open(path, O_RDONLY);
+
+ printf("passing from here LOAD\n");
+
+ result = gtk_math_view_load_uri(file->math_view,path);
+ if(!result)
+ {
+ printf("exception here!\n");
+ CORBA_exception_set(ev,CORBA_USER_EXCEPTION,ex_Bonobo_Persist_WrongDataType,NULL);
+ }
+ bonobo_object_unref(BONOBO_OBJECT(file));
+ return ;
}
static void