#include <gtk/gtk.h>
#include "window-manager.h"
-#include <gtksheet/gtksheet.h>
#include "psppire-data-editor.h"
#include "examine-dialog.h"
#include "dict-display.h"
#include "regression-dialog.h"
+#include "text-data-import-dialog.h"
#include "oneway-anova-dialog.h"
#include "t-test-independent-samples-dialog.h"
#include "syntax-editor.h"
#include <language/syntax-string-source.h>
#include <language/command.h>
-#include <libpspp/syntax-gen.h>
+#include <ui/syntax-gen.h>
#include "window-manager.h"
#include "psppire-data-store.h"
de->toggle_value_labels =
gtk_toggle_action_new ("toggle-value-labels",
- _("Labels"),
+ _("_Labels"),
_("Show/hide value labels"),
"pspp-value-labels");
de->insert_variable =
gtk_action_new ("insert-variable",
- _("Insert Variable"),
+ _("Insert _Variable"),
_("Create a new variable at the current position"),
"pspp-insert-variable");
de->insert_case =
gtk_action_new ("insert-case",
- _("Insert Case"),
+ _("Insert Ca_se"),
_("Create a new case at the current position"),
"pspp-insert-case");
de->invoke_goto_dialog =
gtk_action_new ("goto-case-dialog",
- _("Goto Case"),
+ _("_Goto Case"),
_("Jump to a Case in the Data Sheet"),
"gtk-jump-to");
de->invoke_weight_cases_dialog =
gtk_action_new ("weight-cases-dialog",
- _("Weights"),
+ _("_Weights"),
_("Weight cases by variable"),
"pspp-weight-cases");
de->invoke_transpose_dialog =
gtk_action_new ("transpose-dialog",
- _("Transpose"),
+ _("_Transpose"),
_("Transpose the cases with the variables"),
NULL);
de->invoke_split_file_dialog =
gtk_action_new ("split-file-dialog",
- _("Split"),
+ _("S_plit"),
_("Split the active file"),
"pspp-split-file");
de->invoke_sort_cases_dialog =
gtk_action_new ("sort-cases-dialog",
- _("Sort"),
+ _("_Sort"),
_("Sort cases in the active file"),
"pspp-sort-cases");
de->invoke_select_cases_dialog =
gtk_action_new ("select-cases-dialog",
- _("Select Cases"),
+ _("Select _Cases"),
_("Select cases from the active file"),
"pspp-select-cases");
de->invoke_compute_dialog =
gtk_action_new ("compute-dialog",
- _("Compute"),
+ _("_Compute"),
_("Compute new values for a variable"),
"pspp-compute");
de->invoke_comments_dialog =
gtk_action_new ("commments-dialog",
- _("Data File Comments"),
+ _("Data File _Comments"),
_("Commentary text for the data file"),
NULL);
de->invoke_find_dialog =
gtk_action_new ("find-dialog",
- _("Find"),
+ _("_Find"),
_("Find Case"),
"gtk-find");
de->invoke_variable_info_dialog =
gtk_action_new ("variable-info-dialog",
- _("Variables"),
+ _("_Variables"),
_("Jump to Variable"),
"pspp-goto-variable");
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),
{
struct data_editor *de = data;
- gtk_notebook_set_page (GTK_NOTEBOOK (de->data_editor), PSPPIRE_DATA_EDITOR_DATA_VIEW);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (de->data_editor), PSPPIRE_DATA_EDITOR_DATA_VIEW);
}
{
struct data_editor *de = data;
- gtk_notebook_set_page (GTK_NOTEBOOK (de->data_editor), PSPPIRE_DATA_EDITOR_VARIABLE_VIEW);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (de->data_editor), PSPPIRE_DATA_EDITOR_VARIABLE_VIEW);
}
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 */
g_assert (de->file_name);
- ds_init_cstr (&file_name, de->file_name);
- gen_quoted_string (&file_name);
+ ds_init_empty (&file_name);
+ syntax_gen_string (&file_name, ss_cstr (de->file_name));
if ( de->save_as_portable )
{
struct getl_interface *sss;
struct string filename;
- ds_init_cstr (&filename, file_name);
-
- gen_quoted_string (&filename);
+ ds_init_empty (&filename);
+ syntax_gen_string (&filename, ss_cstr (file_name));
sss = create_syntax_string_source ("GET FILE=%s.",
ds_cstr (&filename));