X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fdata-editor.c;h=b2c506ddfa644597a166485055465110b8396a54;hb=f5c108becd49d78f4898cab11352291f5689d24e;hp=5a0f83581953d82d1d671f4ef1c963022dbf00d3;hpb=fe3a0a8896cc9f099196f0d0228bb0cfa688c34a;p=pspp-builds.git diff --git a/src/ui/gui/data-editor.c b/src/ui/gui/data-editor.c index 5a0f8358..b2c506dd 100644 --- a/src/ui/gui/data-editor.c +++ b/src/ui/gui/data-editor.c @@ -35,6 +35,9 @@ #include "split-file-dialog.h" #include "transpose-dialog.h" #include "sort-cases-dialog.h" +#include "compute-dialog.h" +#include "comments-dialog.h" +#include "variable-info-dialog.h" #include "dict-display.h" #define _(msgid) gettext (msgid) @@ -54,9 +57,7 @@ static void register_data_editor_actions (struct data_editor *de); static void insert_variable (GtkCheckMenuItem *m, gpointer data); - /* Switch between the VAR SHEET and the DATA SHEET */ -enum {PAGE_DATA_SHEET = 0, PAGE_VAR_SHEET}; static gboolean click2column (GtkWidget *w, gint col, gpointer data); @@ -250,6 +251,33 @@ new_data_editor (void) G_CALLBACK (sort_cases_dialog), de); + de->invoke_compute_dialog = + gtk_action_new ("compute-dialog", + _("Compute"), + _("Compute new values for a variable"), + "pspp-compute"); + + g_signal_connect (de->invoke_compute_dialog, "activate", + G_CALLBACK (compute_dialog), de); + + de->invoke_comments_dialog = + gtk_action_new ("commments-dialog", + _("Data File Comments"), + _("Commentary text for the data file"), + NULL); + + g_signal_connect (de->invoke_comments_dialog, "activate", + G_CALLBACK (comments_dialog), de); + + de->invoke_variable_info_dialog = + gtk_action_new ("variable-info-dialog", + _("Variables"), + _("Jump to Variable"), + "pspp-goto-variable"); + + g_signal_connect (de->invoke_variable_info_dialog, "activate", + G_CALLBACK (variable_info_dialog), de); + e->window = GTK_WINDOW (get_widget_assert (de->xml, "data_editor")); g_signal_connect_swapped (get_widget_assert (de->xml,"file_new_data"), @@ -263,6 +291,9 @@ new_data_editor (void) de->action_data_open); + + + #if RECENT_LISTS_AVAILABLE { GtkRecentManager *rm = gtk_recent_manager_get_default (); @@ -349,6 +380,17 @@ new_data_editor (void) get_widget_assert (de->xml, "data_sort-cases") ); + gtk_action_connect_proxy (de->invoke_compute_dialog, + get_widget_assert (de->xml, "transform_compute") + ); + + gtk_action_connect_proxy (de->invoke_comments_dialog, + get_widget_assert (de->xml, "utilities_comments") + ); + + gtk_action_connect_proxy (de->invoke_variable_info_dialog, + get_widget_assert (de->xml, "utilities_variables") + ); g_signal_connect (get_widget_assert (de->xml,"help_about"), "activate", @@ -436,6 +478,10 @@ new_data_editor (void) get_widget_assert (de->xml, "button-save") ); + gtk_action_connect_proxy (de->invoke_variable_info_dialog, + get_widget_assert (de->xml, "button-goto-variable") + ); + gtk_action_connect_proxy (de->invoke_weight_cases_dialog, get_widget_assert (de->xml, "button-weight-cases") );