]> matita.cs.unibo.it Git - helm.git/commitdiff
Control Factory modified.
authorpmasoudi <??>
Wed, 16 Jul 2003 17:33:09 +0000 (17:33 +0000)
committerpmasoudi <??>
Wed, 16 Jul 2003 17:33:09 +0000 (17:33 +0000)
helm/gtkmathview-bonobo/src/control-factory.c
helm/gtkmathview-bonobo/src/control-factory.h

index c0bda201bcefd77b14edeb89f87cff614d71f83f..9a722625974bc9211b10fbc1e326f1abd7950912 100644 (file)
@@ -206,7 +206,7 @@ set_prop(BonoboPropertyBag  *bag,
 }
 
 static BonoboControl*
-instantiate_func(void)
+gtk_math_view_control_factory(void)
 {
   BonoboControl *control;
   GtkWidget *math_view;
@@ -267,65 +267,3 @@ notify_property_bag(GtkMathView *math_view,gpointer data)
 
   //bonobo_property_bag_notify_listeners(prop_bag,);
 }
-
-/*
-GtkMathViewPresistFile *
-gtk_math_view_bonobo_data_construct(gchar *data_file)
-{
-       BonoboObject *retval;
-       BonoboPersistFile *file;
-
-       file = bonobo_persist_file_new(gtk_math_view_load_from_file,
-                       gtk_math_view_save_to_file,
-                       "OAFIID:GNOME_MATH_VIEW_FILE_Control",
-                       data_file);
-
-       if(file == NULL)
-       {
-               bonobo_object_unref(BONOBO_OBJECT (data_file));
-               g_warning("gtk_math_view_bonobo_data_construct:unable to create a new file");
-               return NULL;
-       }
-
-       bonobo_object_add_interface(BONOBO_OBJECT(data_file),
-                                       BONOBO_OBJECT(file));
-       return data_file;
-}
-
-static gint
-gtk_math_view_bonobo_load_from_file(BonoboPresistFile  *pf,
-               const CORBA_char        *filename,
-               CORBA_Environment       *ev,
-               void                    *closure)
-{
-       Bonobo_PersistStream ps = closure;
-       BonoboStream *stream;
-
-       g_return_val_if_fail (data != NULL, -1);
-       //FIXME: controllo del tipo di dato in input
-       
-       stram = bonobo_stream_open(
-                       BONOBO_IO_DRIVER_FS,
-                       filename,Bonobo_STORAGE_READ,
-                       0);
-       if(!stream)
-               return 0;
-
-       //FIXME:I have to extract content type from file
-               
-       
-       Bonobo_PersistStream_load(ps, type, ev);
-       
-       return 1;  //return 1 on success
-}
-
-static gint 
-gtk_math_view_bonobo_save_to_file(BonoboPresistFile            *pf,
-               const CORBA_char        *filename,
-               CORBA_Environment       *ev,
-               void                    *closure)
-{
-       return 1;   //return 1 on success
-}*/
-
-
index 739d02cd601274edd9b9fad92362c52381dcf785..ff75a253819a9cd842b7af977ccf4c3a376d3e15 100644 (file)
 
 enum math_args;
 
-BonoboObject *gtk_math_view_control_factory(BonoboGenericFactory *factory,const gchar *component_id, gpointer closure);
+BonoboControl *gtk_math_view_control_factory(BonoboGenericFactory *factory,const gchar *component_id, gpointer closure);
 static void get_prop(BonoboPropertyBag*, BonoboArg *, guint , CorbaEnvironment*, gpointer);
 static void set_prop(BonoboPropertyBag*, BonoboArg *, guint , CorbaEnvironment*, gpointer);
 
-static BonoboControl* instantiate_func(void);
-
 static void notify_property_bag(GtkMathView* ,gpointer);
 
 #endif