- glade_init();
-
- fmt_init();
- settings_init();
- fh_init ();
- the_source_stream = create_source_stream (
- fn_getenv_default ("STAT_INCLUDE_PATH", include_path)
- );
-
- the_lexer = lex_create (the_source_stream);
-
- the_dataset = create_dataset ();
-
- message_dialog_init (the_source_stream);
-
- the_dictionary =
- psppire_dict_new_from_dict (
- dataset_dict (the_dataset)
- );
-
- bind_textdomain_codeset(PACKAGE, "UTF-8");
-
- /* Create the model for the var_sheet */
- var_store = psppire_var_store_new(the_dictionary);
-
- data_store = psppire_data_store_new(the_dictionary);
-
- create_icon_factory();
-
- /* load the interface */
- xml = glade_xml_new(PKGDATADIR "/psppire.glade", NULL, NULL);
-
- if ( !xml ) return 1;
-
- data_editor = get_widget_assert(xml, "data_editor");
- gtk_window_set_icon_from_file(GTK_WINDOW(data_editor),
- PKGDATADIR "/psppicon.png",0);
-
- /* connect the signals in the interface */
- glade_xml_signal_autoconnect(xml);
-
- var_sheet = GTK_SHEET(get_widget_assert(xml, "variable_sheet"));
- data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-
- gtk_sheet_set_model(var_sheet, G_SHEET_MODEL(var_store));
-
- gtk_sheet_set_model(data_sheet, G_SHEET_MODEL(data_store));
-
- if (filename)
- gtk_init_add((GtkFunction)load_system_file, filename);
- else
- gtk_init_add((GtkFunction)clear_file, 0);
-
- var_data_selection_init();
-
- {
- GList *helps = glade_xml_get_widget_prefix(xml, "help_button_");
-
- GList *i;
- for ( i = g_list_first(helps); i ; i = g_list_next(i))
- g_signal_connect(GTK_WIDGET(i->data), "clicked", give_help, 0);
- }
-
-
- /* start the event loop */
- gtk_main();
-
- destroy_source_stream (the_source_stream);
- message_dialog_done();
-
- settings_done();