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 .
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)
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);
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;
}