/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Free Software Foundation
+ Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011, 2012 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
void
initialize (const char *data_file)
{
- PsppireDataWindow *data_window;
-
i18n_init ();
preregister_widgets ();
psppire_selector_set_default_selection_func (PSPPIRE_VAR_VIEW_TYPE, insert_source_row_into_tree_view);
psppire_selector_set_default_selection_func (GTK_TYPE_TREE_VIEW, insert_source_row_into_tree_view);
- data_window = psppire_default_data_window ();
-
if (data_file)
{
gchar *filename = local_to_filename_encoding (data_file);
/* Check to see if the file is a .sav or a .por file. If not
assume that it is a syntax file */
if ( any_reader_may_open (filename))
- psppire_window_load (PSPPIRE_WINDOW (data_window), filename);
+ open_data_window (NULL, filename);
else
- open_syntax_window (filename, NULL);
+ {
+ create_data_window ();
+ open_syntax_window (filename, NULL);
+ }
g_free (filename);
}
+ else
+ create_data_window ();
}