X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire.c;h=78b56752f0d39ea42c34acd3676af4be79abe185;hb=66d74ee3a5eab89c650e54a866edf7c99d331303;hp=ae962e66fcc408c8e56ded614754f219dbf319db;hpb=b3cd77d4190ad01f3297eb82ffb5053c536a427a;p=pspp diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index ae962e66fc..78b56752f0 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #include #include @@ -34,19 +33,15 @@ #include "psppire-dict.h" #include "psppire-var-store.h" #include "psppire-data-store.h" - #include "helper.h" #include "data-sheet.h" #include "var-sheet.h" -#include "psppire-case-array.h" #include "message-dialog.h" GladeXML *xml; PsppireDict *the_dictionary = 0; -PsppireCaseArray *the_cases = 0; - PsppireDataStore *data_store = 0; @@ -74,39 +69,49 @@ give_help(void) popup_message(&m); } +PsppireVarStore *var_store = 0; + int main(int argc, char *argv[]) { - PsppireVarStore *var_store ; + GtkWidget *data_editor ; GtkSheet *var_sheet ; GtkSheet *data_sheet ; gchar *filename=0; GError *err = 0; + gchar *vers; gtk_init(&argc, &argv); + if ( (vers = gtk_check_version(GTK_MAJOR_VERSION, + GTK_MINOR_VERSION, + GTK_MICRO_VERSION)) ) + { + g_critical(vers); + } + /* gtk_init messes with the locale. So unset the bits we want to control ourselves */ setlocale (LC_NUMERIC, "C"); bindtextdomain (PACKAGE, locale_dir); + textdomain (PACKAGE); if ( ! parse_command_line(&argc, &argv, &filename, &err) ) { g_clear_error(&err); - return 1; + return 0; } + glade_init(); settings_init(); - - /* set_pspp_locale("da_DK"); */ @@ -115,13 +120,12 @@ main(int argc, char *argv[]) the_dictionary = psppire_dict_new(); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + /* Create the model for the var_sheet */ var_store = psppire_var_store_new(the_dictionary); - /* Create the model for the data sheet */ - the_cases = psppire_case_array_new(100000, 20); - - data_store = psppire_data_store_new(the_dictionary, the_cases); + data_store = psppire_data_store_new(the_dictionary); /* load the interface */ xml = glade_xml_new(PKGDATADIR "/psppire.glade", NULL, NULL); @@ -193,12 +197,12 @@ parse_command_line (int *argc, char ***argv, gchar **filename, GError **err) switch (c) { case 'h': - g_printerr("Usage: psppire {|--help|--version}\n"); + g_print ("Usage: psppire {|--help|--version}\n"); return false; case 'V': - g_print(version); - g_print("\n"); - g_print(legal); + g_print (version); + g_print ("\n"); + g_print (legal); return false; default: return false;