From bda57108154cc05a58915933d9c24e609ee08710 Mon Sep 17 00:00:00 2001 From: Jason Stover Date: Fri, 8 Feb 2008 16:10:12 +0000 Subject: [PATCH] oops --- src/ui/gui/automake.mk | 8 ++++++++ src/ui/gui/data-editor.c | 31 +++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 498ffd47..a313a19b 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -51,6 +51,7 @@ src_ui_gui_psppiredir = $(pkgdatadir) dist_src_ui_gui_psppire_DATA = \ $(top_srcdir)/src/ui/gui/data-editor.glade \ $(top_srcdir)/src/ui/gui/descriptives-dialog.glade \ + $(top_srcdir)/src/ui/gui/crosstabs.glade \ $(top_srcdir)/src/ui/gui/frequencies.glade \ $(top_srcdir)/src/ui/gui/oneway.glade \ $(top_srcdir)/src/ui/gui/output-viewer.glade \ @@ -58,6 +59,7 @@ dist_src_ui_gui_psppire_DATA = \ $(top_srcdir)/src/ui/gui/rank.glade \ $(top_srcdir)/src/ui/gui/recode.glade \ $(top_srcdir)/src/ui/gui/syntax-editor.glade \ + $(top_srcdir)/src/ui/gui/text-data-import.glade \ $(top_srcdir)/src/ui/gui/t-test.glade \ $(top_srcdir)/src/ui/gui/psppicon.png \ $(top_srcdir)/src/ui/gui/pspplogo.png \ @@ -88,6 +90,8 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/compute-dialog.h \ src/ui/gui/comments-dialog.c \ src/ui/gui/comments-dialog.h \ + src/ui/gui/crosstabs-dialog.c \ + src/ui/gui/crosstabs-dialog.h \ src/ui/gui/customentry.c \ src/ui/gui/customentry.h \ src/ui/gui/frequencies-dialog.c \ @@ -157,6 +161,10 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/syntax-editor.h \ src/ui/gui/syntax-editor-source.c \ src/ui/gui/syntax-editor-source.h \ + src/ui/gui/text-data-import-dialog.c \ + src/ui/gui/text-data-import-dialog.h \ + src/ui/gui/text-data-import-model.c \ + src/ui/gui/text-data-import-model.h \ src/ui/gui/transpose-dialog.c \ src/ui/gui/transpose-dialog.h \ src/ui/gui/t-test-independent-samples-dialog.c \ diff --git a/src/ui/gui/data-editor.c b/src/ui/gui/data-editor.c index 6e05d271..1be409be 100644 --- a/src/ui/gui/data-editor.c +++ b/src/ui/gui/data-editor.c @@ -42,11 +42,12 @@ #include "comments-dialog.h" #include "variable-info-dialog.h" #include "descriptives-dialog.h" +#include "crosstabs-dialog.h" #include "frequencies-dialog.h" +#include "text-data-import-dialog.h" #include "dict-display.h" #include "clipboard.h" - #include "oneway-anova-dialog.h" #include "t-test-independent-samples-dialog.h" #include "t-test-one-sample.h" @@ -711,6 +712,15 @@ new_data_editor (void) g_signal_connect (de->invoke_frequencies_dialog, "activate", G_CALLBACK (frequencies_dialog), de); + de->invoke_crosstabs_dialog = + gtk_action_new ("crosstabs-dialog", + _("_Crosstabs"), + _("Generate crosstabulations"), + "pspp-crosstabs"); + + g_signal_connect (de->invoke_crosstabs_dialog, "activate", + G_CALLBACK (crosstabs_dialog), de); + e->window = GTK_WINDOW (get_widget_assert (de->xml, "data_editor")); @@ -724,7 +734,6 @@ new_data_editor (void) G_CALLBACK (gtk_action_activate), de->action_data_open); - #if RECENT_LISTS_AVAILABLE { GtkRecentManager *rm = gtk_recent_manager_get_default (); @@ -778,6 +787,11 @@ new_data_editor (void) G_CALLBACK (open_syntax_window), e->window); + g_signal_connect_swapped (get_widget_assert (de->xml,"file_import-text"), + "activate", + G_CALLBACK (gtk_action_activate), + de->invoke_text_import_assistant); + g_signal_connect_swapped (get_widget_assert (de->xml,"file_save"), "activate", G_CALLBACK (gtk_action_activate), @@ -870,6 +884,10 @@ new_data_editor (void) get_widget_assert (de->xml, "analyze_descriptives") ); + gtk_action_connect_proxy (de->invoke_crosstabs_dialog, + get_widget_assert (de->xml, "crosstabs") + ); + gtk_action_connect_proxy (de->invoke_frequencies_dialog, get_widget_assert (de->xml, "analyze_frequencies") ); @@ -1499,6 +1517,15 @@ register_data_editor_actions (struct data_editor *de) g_signal_connect (de->action_data_new, "activate", G_CALLBACK (new_file), de); + + de->invoke_text_import_assistant = + gtk_action_new ("file_import-text", + _("_Import Text Data"), + _("Import text data file"), + ""); + + g_signal_connect (de->invoke_text_import_assistant, "activate", + G_CALLBACK (text_data_import_assistant), de); } /* Returns true if NAME has a suffix which might denote a PSPP file */ -- 2.30.2