X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-window.c;h=e024fb94d3c366caa2b87b299eae172b5f086d1c;hb=481e4ef5d944216a7212f3de245dec4f42c8d120;hp=ec75e086b099bdec25e9a93597aa6152917d5a4d;hpb=f550aee00a62fe1d8baf62d83cd7efef6cc2ee92;p=pspp diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index ec75e086b0..e024fb94d3 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -37,6 +37,7 @@ #include "ui/gui/factor-dialog.h" #include "ui/gui/find-dialog.h" #include "ui/gui/frequencies-dialog.h" +#include "ui/gui/k-related-dialog.h" #include "ui/gui/goto-case-dialog.h" #include "ui/gui/helper.h" #include "ui/gui/oneway-anova-dialog.h" @@ -57,6 +58,7 @@ #include "ui/gui/t-test-paired-samples.h" #include "ui/gui/text-data-import-dialog.h" #include "ui/gui/transpose-dialog.h" +#include "ui/gui/aggregate-dialog.h" #include "ui/gui/variable-info-dialog.h" #include "ui/gui/weight-cases-dialog.h" #include "ui/syntax-gen.h" @@ -364,7 +366,7 @@ load_file (PsppireWindow *de, const gchar *file_name) g_free (native_file_name); - sss = create_syntax_string_source ("GET FILE=%s.", + sss = create_syntax_format_source ("GET FILE=%s.", ds_cstr (&filename)); ds_destroy (&filename); @@ -459,11 +461,14 @@ open_window (PsppireWindow *de) gchar *name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); - if (any_reader_may_open (name)) + gchar *sysname = convert_glib_filename_to_system_filename (name, NULL); + + if (any_reader_may_open (sysname)) psppire_window_load (de, name); else open_syntax_window (name); + g_free (sysname); g_free (name); } break; @@ -526,12 +531,12 @@ save_file (PsppireWindow *w) if ( de->save_as_portable ) { - sss = create_syntax_string_source ("EXPORT OUTFILE=%s.", + sss = create_syntax_format_source ("EXPORT OUTFILE=%s.", ds_cstr (&filename)); } else { - sss = create_syntax_string_source ("SAVE OUTFILE=%s.", + sss = create_syntax_format_source ("SAVE OUTFILE=%s.", ds_cstr (&filename)); } @@ -585,7 +590,7 @@ sysfile_info (PsppireDataWindow *de) g_free (native_file_name); - sss = create_syntax_string_source ("SYSFILE INFO %s.", + sss = create_syntax_format_source ("SYSFILE INFO %s.", ds_cstr (&filename)); execute_syntax (sss); } @@ -1074,8 +1079,12 @@ psppire_data_window_init (PsppireDataWindow *de) connect_action (de, "data_transpose", G_CALLBACK (transpose_dialog)); + connect_action (de, "data_select-cases", G_CALLBACK (select_cases_dialog)); + connect_action (de, "data_sort-cases", G_CALLBACK (sort_cases_dialog)); + connect_action (de, "data_aggregate", G_CALLBACK (aggregate_dialog)); + connect_action (de, "transform_compute", G_CALLBACK (compute_dialog)); connect_action (de, "edit_find", G_CALLBACK (find_dialog)); @@ -1084,6 +1093,7 @@ psppire_data_window_init (PsppireDataWindow *de) connect_action (de, "data_weight-cases", G_CALLBACK (weight_cases_dialog)); + connect_action (de, "utilities_variables", G_CALLBACK (variable_info_dialog)); connect_action (de, "oneway-anova", G_CALLBACK (oneway_anova_dialog)); @@ -1115,7 +1125,7 @@ psppire_data_window_init (PsppireDataWindow *de) connect_action (de, "reliability", G_CALLBACK (reliability_dialog)); connect_action (de, "roc-curve", G_CALLBACK (roc_dialog)); - + connect_action (de, "correlation", G_CALLBACK (correlation_dialog)); connect_action (de, "factor-analysis", G_CALLBACK (factor_dialog)); @@ -1123,6 +1133,8 @@ psppire_data_window_init (PsppireDataWindow *de) connect_action (de, "chi-square", G_CALLBACK (chisquare_dialog)); connect_action (de, "binomial", G_CALLBACK (binomial_dialog)); + + connect_action (de, "k-related-samples", G_CALLBACK (k_related_dialog)); { @@ -1258,6 +1270,8 @@ GtkWidget* psppire_data_window_new (void) { return GTK_WIDGET (g_object_new (psppire_data_window_get_type (), + /* TRANSLATORS: This will form a filename. Please avoid whitespace. */ + "filename", _("PSPP-data"), "description", _("Data Editor"), NULL)); }