#include "psppire-data-window.h"
#include "psppire.h"
+#include "widgets.h"
#include <libpspp/getl.h>
#include <unistd.h>
#include "message-dialog.h"
#include <ui/syntax-gen.h>
-
+#include "psppire-window-register.h"
#include "psppire-output-window.h"
#include <data/sys-file-reader.h>
#include <ui/source-init-opts.h>
+GtkRecentManager *the_recent_mgr = 0;
PsppireDataStore *the_data_store = 0;
PsppireVarStore *the_var_store = 0;
bindtextdomain (PACKAGE, locale_dir);
+ preregister_widgets ();
+
gsl_set_error_handler_off ();
fn_init ();
outp_init ();
journal_enable ();
textdomain (PACKAGE);
+
+ the_recent_mgr = gtk_recent_manager_get_default ();
+
the_data_window = psppire_data_window_new ();
command_line_processor_replace_aux (clp, &post_init_argp, the_source_stream);
}
+static void
+func (gpointer key, gpointer value, gpointer data)
+{
+ gboolean rv;
+ PsppireWindow *window = PSPPIRE_WINDOW (value);
+
+ g_signal_emit_by_name (window, "delete-event", 0, &rv);
+}
+
+void
+psppire_quit (void)
+{
+ PsppireWindowRegister *reg = psppire_window_register_new ();
+ psppire_window_register_foreach (reg, func, NULL);
+
+ gtk_main_quit ();
+}
+
struct icon_info
{
{
case ARGP_KEY_ARG:
{
- psppire_data_window_load_file (PSPPIRE_DATA_WINDOW (the_data_window),
- arg);
+ psppire_window_load (PSPPIRE_WINDOW (the_data_window), arg);
break;
}
default:
if ( NULL == filename )
filename = xasprintf ("%s%s", dir, OUTPUT_FILE_NAME);
-
return filename;
}