X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Fpsppire-data-window.c;h=aace66fa5a5947138087bd3656d6bc5c1741be77;hb=a258e53c63a08b0ec48aea8f03808eb651729424;hp=9bb42897e1ee7398ca46f684e788102cf686fcf3;hpb=cb40133f880615d10473c3b7ca54f57f52fd0daf;p=pspp-builds.git diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 9bb42897..aace66fa 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -25,6 +25,7 @@ #include "language/syntax-string-source.h" #include "libpspp/message.h" #include "ui/gui/help-menu.h" +#include "ui/gui/binomial-dialog.h" #include "ui/gui/comments-dialog.h" #include "ui/gui/compute-dialog.h" #include "ui/gui/correlation-dialog.h" @@ -56,6 +57,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" @@ -363,7 +365,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); @@ -458,11 +460,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); + open_new_syntax_window (name); + g_free (sysname); g_free (name); } break; @@ -525,12 +530,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)); } @@ -584,7 +589,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); } @@ -848,8 +853,6 @@ on_recent_files_select (GtkMenuShell *menushell, gpointer user_data) { gchar *file; - GtkWidget *se ; - gchar *uri = gtk_recent_chooser_get_current_uri (GTK_RECENT_CHOOSER (menushell)); @@ -857,17 +860,13 @@ on_recent_files_select (GtkMenuShell *menushell, gpointer user_data) g_free (uri); - se = psppire_syntax_window_new (); - - if ( psppire_window_load (PSPPIRE_WINDOW (se), file) ) - gtk_widget_show (se); - else - gtk_widget_destroy (se); + open_new_syntax_window (file); g_free (file); } + static void enable_delete_cases (GtkWidget *w, gint case_num, gpointer data) { @@ -1073,8 +1072,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)); @@ -1083,6 +1086,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)); @@ -1114,12 +1118,14 @@ 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)); connect_action (de, "chi-square", G_CALLBACK (chisquare_dialog)); + + connect_action (de, "binomial", G_CALLBACK (binomial_dialog)); { @@ -1255,6 +1261,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)); }