From: pmasoudi Date: Thu, 17 Jul 2003 14:23:29 +0000 (+0000) Subject: Partional first fase final. X-Git-Tag: LucaOK~63 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=db8c9ea3c96097b03d522f0c8b54aa7da214e5e4;p=helm.git Partional first fase final. --- diff --git a/helm/gtkmathview-bonobo/Makefile.am b/helm/gtkmathview-bonobo/Makefile.am index 1119be901..8f5e45f8d 100644 --- a/helm/gtkmathview-bonobo/Makefile.am +++ b/helm/gtkmathview-bonobo/Makefile.am @@ -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 . diff --git a/helm/gtkmathview-bonobo/test/main.c b/helm/gtkmathview-bonobo/test/main.c index d0d646a94..41ec0a9fe 100644 --- a/helm/gtkmathview-bonobo/test/main.c +++ b/helm/gtkmathview-bonobo/test/main.c @@ -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; }