From: Ben Pfaff Date: Wed, 30 Mar 2011 04:29:13 +0000 (-0700) Subject: gui: Make syntax execution functions take a PsppireDataWindow argument. X-Git-Tag: v0.7.8~11 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eea449691e75dfc2af4fd5d6670ab155b813a13e;p=pspp-builds.git gui: Make syntax execution functions take a PsppireDataWindow argument. The argument specifies which dataset the syntax is meant to apply to. For now, this is obvious, because there is only one dataset, but in the future there will be more than one. --- diff --git a/src/ui/gui/aggregate-dialog.c b/src/ui/gui/aggregate-dialog.c index ced6a32c..7414c4df 100644 --- a/src/ui/gui/aggregate-dialog.c +++ b/src/ui/gui/aggregate-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2010 Free Software Foundation + Copyright (C) 2010, 2011 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 @@ -590,7 +590,7 @@ aggregate_dialog (PsppireDataWindow *dw) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&fd))); + g_free (execute_syntax_string (dw, generate_syntax (&fd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&fd))); diff --git a/src/ui/gui/binomial-dialog.c b/src/ui/gui/binomial-dialog.c index 256b3252..195c4201 100644 --- a/src/ui/gui/binomial-dialog.c +++ b/src/ui/gui/binomial-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2010 Free Software Foundation + Copyright (C) 2010, 2011 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 @@ -185,7 +185,7 @@ binomial_dialog (PsppireDataWindow *dw) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&bin_d))); + g_free (execute_syntax_string (dw, generate_syntax (&bin_d))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&bin_d))); diff --git a/src/ui/gui/chi-square-dialog.c b/src/ui/gui/chi-square-dialog.c index ccfa48ec..c7aaf52b 100644 --- a/src/ui/gui/chi-square-dialog.c +++ b/src/ui/gui/chi-square-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2010 Free Software Foundation + Copyright (C) 2010, 2011 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 @@ -228,7 +228,7 @@ chisquare_dialog (PsppireDataWindow *dw) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&csd))); + g_free (execute_syntax_string (dw, generate_syntax (&csd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&csd))); diff --git a/src/ui/gui/comments-dialog.c b/src/ui/gui/comments-dialog.c index 35e7c368..69a8096b 100644 --- a/src/ui/gui/comments-dialog.c +++ b/src/ui/gui/comments-dialog.c @@ -163,7 +163,7 @@ comments_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&cd))); + g_free (execute_syntax_string (de, generate_syntax (&cd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&cd))); diff --git a/src/ui/gui/compute-dialog.c b/src/ui/gui/compute-dialog.c index 89a64563..6f9ec222 100644 --- a/src/ui/gui/compute-dialog.c +++ b/src/ui/gui/compute-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -434,7 +434,7 @@ compute_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&scd))); + g_free (execute_syntax_string (de, generate_syntax (&scd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&scd))); diff --git a/src/ui/gui/correlation-dialog.c b/src/ui/gui/correlation-dialog.c index e0dfd89f..2e715039 100644 --- a/src/ui/gui/correlation-dialog.c +++ b/src/ui/gui/correlation-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009, 2010 Free Software Foundation + Copyright (C) 2009, 2010, 2011 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 @@ -117,7 +117,7 @@ correlation_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&rd))); + g_free (execute_syntax_string (de, generate_syntax (&rd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&rd))); diff --git a/src/ui/gui/crosstabs-dialog.c b/src/ui/gui/crosstabs-dialog.c index d3903437..34a39213 100644 --- a/src/ui/gui/crosstabs-dialog.c +++ b/src/ui/gui/crosstabs-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2010 Free Software Foundation + Copyright (C) 2008, 2010, 2011 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 @@ -463,7 +463,7 @@ crosstabs_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&cd))); + g_free (execute_syntax_string (de, generate_syntax (&cd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&cd))); diff --git a/src/ui/gui/descriptives-dialog.c b/src/ui/gui/descriptives-dialog.c index ef772468..c6343d5b 100644 --- a/src/ui/gui/descriptives-dialog.c +++ b/src/ui/gui/descriptives-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -257,7 +257,7 @@ descriptives_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&scd))); + g_free (execute_syntax_string (de, generate_syntax (&scd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&scd))); diff --git a/src/ui/gui/examine-dialog.c b/src/ui/gui/examine-dialog.c index 931c0461..7b33ac45 100644 --- a/src/ui/gui/examine-dialog.c +++ b/src/ui/gui/examine-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation + Copyright (C) 2007, 2008, 2009, 2010, 2011 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 @@ -300,7 +300,7 @@ examine_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&ex_d))); + g_free (execute_syntax_string (de, generate_syntax (&ex_d))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&ex_d))); diff --git a/src/ui/gui/executor.c b/src/ui/gui/executor.c index 123000fe..584b1376 100644 --- a/src/ui/gui/executor.c +++ b/src/ui/gui/executor.c @@ -39,7 +39,7 @@ create_casereader_from_data_store (void *data_store_) } gboolean -execute_syntax (struct lex_reader *lex_reader) +execute_syntax (PsppireDataWindow *window, struct lex_reader *lex_reader) { struct lexer *lexer; gboolean retval = TRUE; @@ -114,15 +114,15 @@ execute_syntax (struct lex_reader *lex_reader) /* Executes null-terminated string SYNTAX as syntax. Returns SYNTAX. */ gchar * -execute_syntax_string (gchar *syntax) +execute_syntax_string (PsppireDataWindow *window, gchar *syntax) { - execute_const_syntax_string (syntax); + execute_const_syntax_string (window, syntax); return syntax; } /* Executes null-terminated string SYNTAX as syntax. */ void -execute_const_syntax_string (const gchar *syntax) +execute_const_syntax_string (PsppireDataWindow *window, const gchar *syntax) { - execute_syntax (lex_reader_for_string (syntax)); + execute_syntax (window, lex_reader_for_string (syntax)); } diff --git a/src/ui/gui/executor.h b/src/ui/gui/executor.h index ae363e96..d7d5182f 100644 --- a/src/ui/gui/executor.h +++ b/src/ui/gui/executor.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2010 Free Software Foundation + Copyright (C) 2007, 2009, 2010, 2011 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 @@ -19,11 +19,12 @@ #define EXECUTOR_H #include +#include "ui/gui/psppire-data-window.h" struct lex_reader; -gboolean execute_syntax (struct lex_reader *); -gchar *execute_syntax_string (gchar *syntax); -void execute_const_syntax_string (const gchar *syntax); +gboolean execute_syntax (PsppireDataWindow *, struct lex_reader *); +gchar *execute_syntax_string (PsppireDataWindow *, gchar *syntax); +void execute_const_syntax_string (PsppireDataWindow *, const gchar *syntax); #endif diff --git a/src/ui/gui/factor-dialog.c b/src/ui/gui/factor-dialog.c index e0b9f4fa..c10fa597 100644 --- a/src/ui/gui/factor-dialog.c +++ b/src/ui/gui/factor-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009, 2010 Free Software Foundation + Copyright (C) 2009, 2010, 2011 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 @@ -399,7 +399,7 @@ factor_dialog (PsppireDataWindow *dw) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&fd))); + g_free (execute_syntax_string (dw, generate_syntax (&fd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&fd))); diff --git a/src/ui/gui/frequencies-dialog.c b/src/ui/gui/frequencies-dialog.c index 3378d819..016682e4 100644 --- a/src/ui/gui/frequencies-dialog.c +++ b/src/ui/gui/frequencies-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -569,7 +569,7 @@ frequencies_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&fd))); + g_free (execute_syntax_string (de, generate_syntax (&fd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&fd))); diff --git a/src/ui/gui/k-related-dialog.c b/src/ui/gui/k-related-dialog.c index c7f48a9b..fd849005 100644 --- a/src/ui/gui/k-related-dialog.c +++ b/src/ui/gui/k-related-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2010 Free Software Foundation + Copyright (C) 2010, 2011 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 @@ -160,7 +160,7 @@ k_related_dialog (PsppireDataWindow *dw) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&krd))); + g_free (execute_syntax_string (dw, generate_syntax (&krd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&krd))); diff --git a/src/ui/gui/oneway-anova-dialog.c b/src/ui/gui/oneway-anova-dialog.c index 9919a598..8b91a513 100644 --- a/src/ui/gui/oneway-anova-dialog.c +++ b/src/ui/gui/oneway-anova-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -210,7 +210,7 @@ oneway_anova_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&ow))); + g_free (execute_syntax_string (de, generate_syntax (&ow))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&ow))); diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 23af0e5a..99bc9074 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -19,6 +19,7 @@ #include #include "psppire-data-editor.h" #include "psppire-var-sheet.h" +#include "psppire.h" #include "psppire-data-store.h" #include @@ -1245,15 +1246,15 @@ popup_cases_menu (PsppireSheet *sheet, gint row, /* Sorting */ static void -do_sort (PsppireDataStore *ds, int var, gboolean descend) +do_sort (PsppireDataEditor *de, int var, gboolean descend) { - const struct variable *v = - psppire_dict_get_variable (ds->dict, var); + const struct variable *v + = psppire_dict_get_variable (de->data_store->dict, var); gchar *syntax; syntax = g_strdup_printf ("SORT CASES BY %s%s.", var_get_name (v), descend ? " (D)" : ""); - g_free (execute_syntax_string (syntax)); + g_free (execute_syntax_string (psppire_default_data_window (), syntax)); } @@ -1265,7 +1266,7 @@ psppire_data_editor_sort_ascending (PsppireDataEditor *de) PsppireSheetRange range; psppire_sheet_get_selected_range (PSPPIRE_SHEET(de->data_sheet[0]), &range); - do_sort (de->data_store, range.col0, FALSE); + do_sort (de, range.col0, FALSE); } @@ -1277,7 +1278,7 @@ psppire_data_editor_sort_descending (PsppireDataEditor *de) PsppireSheetRange range; psppire_sheet_get_selected_range (PSPPIRE_SHEET(de->data_sheet[0]), &range); - do_sort (de->data_store, range.col0, TRUE); + do_sort (de, range.col0, TRUE); } diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index ff17ed32..74c4ca69 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -156,9 +156,9 @@ set_cut_copy_menuitem_sensitivity (PsppireDataWindow *de, gboolean x) /* Run the EXECUTE command. */ static void -execute (void) +execute (PsppireDataWindow *dw) { - execute_const_syntax_string ("EXECUTE."); + execute_const_syntax_string (dw, "EXECUTE."); } static void @@ -338,7 +338,8 @@ load_file (PsppireWindow *de, const gchar *file_name) syntax = g_strdup_printf ("GET FILE=%s.", ds_cstr (&filename)); ds_destroy (&filename); - ok = execute_syntax (lex_reader_for_string (syntax)); + ok = execute_syntax (PSPPIRE_DATA_WINDOW (de), + lex_reader_for_string (syntax)); g_free (syntax); return ok; } @@ -500,7 +501,7 @@ save_file (PsppireWindow *w) ds_destroy (&filename); - g_free (execute_syntax_string (syntax)); + g_free (execute_syntax_string (de, syntax)); } @@ -520,7 +521,7 @@ on_insert_variable (PsppireDataWindow *dw) static void display_dict (PsppireDataWindow *de) { - execute_const_syntax_string ("DISPLAY DICTIONARY."); + execute_const_syntax_string (de, "DISPLAY DICTIONARY."); } static void @@ -546,7 +547,7 @@ sysfile_info (PsppireDataWindow *de) g_free (utf8_file_name); syntax = g_strdup_printf ("SYSFILE INFO %s.", ds_cstr (&filename)); - g_free (execute_syntax_string (syntax)); + g_free (execute_syntax_string (de, syntax)); } gtk_widget_destroy (dialog); @@ -657,7 +658,7 @@ data_save (PsppireWindow *de) static void new_file (PsppireDataWindow *de) { - execute_const_syntax_string ("NEW FILE."); + execute_const_syntax_string (de, "NEW FILE."); psppire_window_set_filename (PSPPIRE_WINDOW (de), NULL); } diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index eea46eba..66292351 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -163,7 +163,7 @@ editor_execute_syntax (const PsppireSyntaxWindow *sw, GtkTextIter start, lex_reader_set_file_name (reader, psppire_window_get_filename (win)); - execute_syntax (reader); + execute_syntax (psppire_default_data_window (), reader); } diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index d4008659..1b11c119 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -127,7 +127,7 @@ initialize (const char *data_file) if (data_file != NULL) load_data_file (data_file); - execute_const_syntax_string (""); + execute_const_syntax_string (PSPPIRE_DATA_WINDOW (the_data_window), ""); gtk_widget_show (the_data_window); } @@ -141,6 +141,11 @@ de_initialize (void) i18n_done (); } +PsppireDataWindow * +psppire_default_data_window (void) +{ + return PSPPIRE_DATA_WINDOW (the_data_window); +} static void func (gpointer key, gpointer value, gpointer data) diff --git a/src/ui/gui/psppire.h b/src/ui/gui/psppire.h index bb796608..4b9cdbef 100644 --- a/src/ui/gui/psppire.h +++ b/src/ui/gui/psppire.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation + Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 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 @@ -17,6 +17,8 @@ #ifndef PSPPIRE_H #define PSPPIRE_H +#include "ui/gui/psppire-data-window.h" + struct lexer; void initialize (const char *data_file); @@ -27,5 +29,6 @@ void psppire_quit (void); const char * output_file_name (void); void psppire_set_lexer (struct lexer *); +PsppireDataWindow *psppire_default_data_window (void); #endif /* PSPPIRE_H */ diff --git a/src/ui/gui/rank-dialog.c b/src/ui/gui/rank-dialog.c index a092cab7..58e4f511 100644 --- a/src/ui/gui/rank-dialog.c +++ b/src/ui/gui/rank-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -321,7 +321,7 @@ rank_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&rd))); + g_free (execute_syntax_string (de, generate_syntax (&rd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&rd))); diff --git a/src/ui/gui/recode-dialog.c b/src/ui/gui/recode-dialog.c index 8c44c444..55376644 100644 --- a/src/ui/gui/recode-dialog.c +++ b/src/ui/gui/recode-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2010 Free Software Foundation + Copyright (C) 2007, 2009, 2010, 2011 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 @@ -1059,7 +1059,7 @@ recode_dialog (PsppireDataWindow *de, gboolean diff) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&rd))); + g_free (execute_syntax_string (de, generate_syntax (&rd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&rd))); diff --git a/src/ui/gui/regression-dialog.c b/src/ui/gui/regression-dialog.c index 062d69e4..7bea89e1 100644 --- a/src/ui/gui/regression-dialog.c +++ b/src/ui/gui/regression-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2010 Free Software Foundation + Copyright (C) 2008, 2010, 2011 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 @@ -287,7 +287,7 @@ regression_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&rd))); + g_free (execute_syntax_string (de, generate_syntax (&rd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&rd))); diff --git a/src/ui/gui/reliability-dialog.c b/src/ui/gui/reliability-dialog.c index 431a9c0e..c60f0df5 100644 --- a/src/ui/gui/reliability-dialog.c +++ b/src/ui/gui/reliability-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009, 2010 Free Software Foundation + Copyright (C) 2009, 2010, 2011 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 @@ -166,7 +166,7 @@ reliability_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&rd))); + g_free (execute_syntax_string (de, generate_syntax (&rd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&rd))); diff --git a/src/ui/gui/roc-dialog.c b/src/ui/gui/roc-dialog.c index 2e57830a..a024c9c4 100644 --- a/src/ui/gui/roc-dialog.c +++ b/src/ui/gui/roc-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009, 2010 Free Software Foundation + Copyright (C) 2009, 2010, 2011 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 @@ -161,7 +161,7 @@ roc_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&rd))); + g_free (execute_syntax_string (de, generate_syntax (&rd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&rd))); diff --git a/src/ui/gui/select-cases-dialog.c b/src/ui/gui/select-cases-dialog.c index 04fcf0dd..c5a7fa72 100644 --- a/src/ui/gui/select-cases-dialog.c +++ b/src/ui/gui/select-cases-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. 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 @@ -347,7 +347,7 @@ select_cases_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&scd))); + g_free (execute_syntax_string (de, generate_syntax (&scd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&scd))); diff --git a/src/ui/gui/sort-cases-dialog.c b/src/ui/gui/sort-cases-dialog.c index 50624ad0..6977469b 100644 --- a/src/ui/gui/sort-cases-dialog.c +++ b/src/ui/gui/sort-cases-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -128,7 +128,7 @@ sort_cases_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&scd))); + g_free (execute_syntax_string (de, generate_syntax (&scd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&scd))); diff --git a/src/ui/gui/split-file-dialog.c b/src/ui/gui/split-file-dialog.c index 9aacdffd..46758ed5 100644 --- a/src/ui/gui/split-file-dialog.c +++ b/src/ui/gui/split-file-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -199,7 +199,7 @@ split_file_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&sfd))); + g_free (execute_syntax_string (de, generate_syntax (&sfd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&sfd))); diff --git a/src/ui/gui/t-test-independent-samples-dialog.c b/src/ui/gui/t-test-independent-samples-dialog.c index 2da218e5..8983bc67 100644 --- a/src/ui/gui/t-test-independent-samples-dialog.c +++ b/src/ui/gui/t-test-independent-samples-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2010 Free Software Foundation + Copyright (C) 2007, 2009, 2010, 2011 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 @@ -454,7 +454,7 @@ t_test_independent_samples_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&tt_d))); + g_free (execute_syntax_string (de, generate_syntax (&tt_d))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&tt_d))); diff --git a/src/ui/gui/t-test-one-sample.c b/src/ui/gui/t-test-one-sample.c index 79168714..befe8682 100644 --- a/src/ui/gui/t-test-one-sample.c +++ b/src/ui/gui/t-test-one-sample.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -165,7 +165,7 @@ t_test_one_sample_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&tt_d))); + g_free (execute_syntax_string (de, generate_syntax (&tt_d))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&tt_d))); diff --git a/src/ui/gui/t-test-paired-samples.c b/src/ui/gui/t-test-paired-samples.c index 1b1c2511..6233aa30 100644 --- a/src/ui/gui/t-test-paired-samples.c +++ b/src/ui/gui/t-test-paired-samples.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2010 Free Software Foundation + Copyright (C) 2008, 2010, 2011 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 @@ -209,7 +209,7 @@ t_test_paired_samples_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&tt_d))); + g_free (execute_syntax_string (de, generate_syntax (&tt_d))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&tt_d))); diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index 6cc4bee3..ee42b7d8 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -232,8 +232,9 @@ static void pop_watch_cursor (struct import_assistant *); /* Pops up the Text Data Import assistant. */ void -text_data_import_assistant (GtkWindow *parent_window) +text_data_import_assistant (PsppireDataWindow *dw) { + GtkWindow *parent_window = GTK_WINDOW (dw); struct import_assistant *ia; ia = xzalloc (sizeof *ia); @@ -258,7 +259,7 @@ text_data_import_assistant (GtkWindow *parent_window) switch (ia->asst.response) { case GTK_RESPONSE_APPLY: - free (execute_syntax_string (generate_syntax (ia))); + free (execute_syntax_string (dw, generate_syntax (ia))); break; case PSPPIRE_RESPONSE_PASTE: free (paste_syntax_to_window (generate_syntax (ia))); diff --git a/src/ui/gui/text-data-import-dialog.h b/src/ui/gui/text-data-import-dialog.h index 1aeaee98..664249c9 100644 --- a/src/ui/gui/text-data-import-dialog.h +++ b/src/ui/gui/text-data-import-dialog.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2010 Free Software Foundation + Copyright (C) 2008, 2010, 2011 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 @@ -17,8 +17,9 @@ #ifndef TEXT_DATA_IMPORT_DIALOG_H #define TEXT_DATA_IMPORT_DIALOG_H -#include +#include +#include "ui/gui/psppire-data-window.h" -void text_data_import_assistant (GtkWindow *parent_window); +void text_data_import_assistant (PsppireDataWindow *); #endif diff --git a/src/ui/gui/transpose-dialog.c b/src/ui/gui/transpose-dialog.c index c2169a53..87e3b1e4 100644 --- a/src/ui/gui/transpose-dialog.c +++ b/src/ui/gui/transpose-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -110,7 +110,7 @@ transpose_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (dict, xml))); + g_free (execute_syntax_string (de, generate_syntax (dict, xml))); break; case PSPPIRE_RESPONSE_PASTE: { diff --git a/src/ui/gui/weight-cases-dialog.c b/src/ui/gui/weight-cases-dialog.c index 066c5e54..fa85ae4a 100644 --- a/src/ui/gui/weight-cases-dialog.c +++ b/src/ui/gui/weight-cases-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 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 @@ -152,7 +152,7 @@ weight_cases_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - g_free (execute_syntax_string (generate_syntax (&wcd))); + g_free (execute_syntax_string (de, generate_syntax (&wcd))); break; case PSPPIRE_RESPONSE_PASTE: g_free (paste_syntax_to_window (generate_syntax (&wcd)));