]> matita.cs.unibo.it Git - helm.git/commitdiff
Partional first fase final.
authorpmasoudi <??>
Thu, 17 Jul 2003 14:23:29 +0000 (14:23 +0000)
committerpmasoudi <??>
Thu, 17 Jul 2003 14:23:29 +0000 (14:23 +0000)
helm/gtkmathview-bonobo/Makefile.am
helm/gtkmathview-bonobo/test/main.c

index 1119be90182153f28d9a7e0fe1ce83edcb946a1e..8f5e45f8d0fcefca2200e5a9ab3da46b3401822c 100644 (file)
@@ -3,7 +3,7 @@ SUBDIRS = src test
 CLEANFILES = core *.log *.eps
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA=gtkmathview-bonobo.pc
+#pkgconfig_DATA=gtkmathview-bonobo.pc
 
 backup:
        tar cvfz ../@PACKAGE@-@VERSION@-`date|tr ' ' '_'|tr ':' '_'`.tar.gz .
index d0d646a946086e3e23bab8cebb6accf3adfcdb6b..41ec0a9fe4f3472587c4fd10494e54f8213c278b 100644 (file)
@@ -17,6 +17,18 @@ struct FileSelectionInfo {
 
 static struct FileSelectionInfo file_selection_info = { NULL, NULL };
 
+static void
+load_through_persist_file (const gchar *filename,
+                                          Bonobo_PersistFile pfile)
+{
+       CORBA_Environment ev;
+       CORBA_exception_init (&ev);
+       Bonobo_PersistFile_load (pfile, filename, &ev);
+       if (ev._major != CORBA_NO_EXCEPTION)
+                  g_warning ("Cannot load.");
+       CORBA_exception_free (&ev);
+}
+
 static void
 file_selection_ok_cb (GtkWidget *widget,
                      gpointer data)
@@ -39,8 +51,7 @@ file_selection_ok_cb (GtkWidget *widget,
   else         
     {
       const gchar *fname = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selection_info.widget));
-      /* load_through_persist_file (fname, interface); */
-      /* todo */
+      load_through_persist_file (fname, interface);
     }
   
   gtk_widget_destroy (file_selection_info.widget);
@@ -205,8 +216,7 @@ load_file (const gchar *fname)
   interface = Bonobo_Unknown_queryInterface (bonobo_widget_get_objref (BONOBO_WIDGET (control)),
                                             "IDL:Bonobo/PersistFile:1.0", &ev);
   CORBA_exception_free (&ev);
-  /* load_through_persist_file (fname, interface); */
-  /* TODO */
+  load_through_persist_file (fname, interface);
 
   return FALSE;
 }