#include "gl/c-strcasestr.h"
#include "gl/xvasprintf.h"
-#include "ui/gui/efficient-sheet/src/jmd-sheet.h"
+#include <ssw-sheet.h>
#include "find-dialog.h"
#include "options-dialog.h"
#include "psppire-dialog-action-frequencies.h"
#include "psppire-dialog-action-histogram.h"
#include "psppire-dialog-action-indep-samps.h"
+#include "psppire-dialog-action-k-independent.h"
#include "psppire-dialog-action-k-related.h"
#include "psppire-dialog-action-kmeans.h"
#include "psppire-dialog-action-logistic.h"
PsppireImportAssistant *asst = PSPPIRE_IMPORT_ASSISTANT (w);
gtk_widget_show_all (w);
- asst->main_loop = g_main_loop_new (NULL, TRUE);
- g_main_loop_run (asst->main_loop);
- g_main_loop_unref (asst->main_loop);
+ int response = psppire_import_assistant_run (asst);
- if (!asst->file_name)
- goto end;
-
- switch (asst->response)
+ switch (response)
{
case GTK_RESPONSE_APPLY:
{
break;
}
- end:
gtk_widget_destroy (GTK_WIDGET (asst));
}
static void
-set_data_page (PsppireDataWindow *dw)
+on_realize (PsppireDataWindow *dw)
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (dw->data_editor), 1);
- gtk_notebook_set_current_page (GTK_NOTEBOOK (dw->data_editor), 0);
}
g_object_get (dw->data_editor, "dictionary", &dict, NULL);
gint x, y;
- JmdSheet *sheet = JMD_SHEET (dw->data_editor->data_sheet);
- JmdRange sel = *sheet->selection;
+ SswSheet *sheet = SSW_SHEET (dw->data_editor->data_sheet);
+ SswRange sel = *sheet->selection;
GtkClipboard *clip =
gtk_clipboard_get_for_display (gtk_widget_get_display (GTK_WIDGET (dw)),
gtk_clipboard_get_for_display (gtk_widget_get_display (GTK_WIDGET (dw)),
GDK_SELECTION_CLIPBOARD);
- jmd_sheet_set_clip (JMD_SHEET (dw->data_editor->data_sheet), clip);
+ ssw_sheet_set_clip (SSW_SHEET (dw->data_editor->data_sheet), clip);
}
}
int p = gtk_notebook_get_current_page (GTK_NOTEBOOK (de));
if (p == PSPPIRE_DATA_EDITOR_DATA_VIEW)
{
- JmdRange *range = JMD_SHEET(de->data_sheet)->selection;
+ SswRange *range = SSW_SHEET(de->data_sheet)->selection;
psppire_data_store_delete_cases (de->data_store, range->start_y,
range->end_y - range->start_y + 1);
gtk_widget_queue_draw (GTK_WIDGET (de->data_sheet));
if (p == PSPPIRE_DATA_EDITOR_DATA_VIEW)
{
- JmdRange *range = JMD_SHEET(de->data_sheet)->selection;
+ SswRange *range = SSW_SHEET(de->data_sheet)->selection;
psppire_data_editor_insert_new_variable_at_posn (de, range->start_x);
}
else
{
- JmdRange *range = JMD_SHEET(de->var_sheet)->selection;
+ SswRange *range = SSW_SHEET(de->var_sheet)->selection;
psppire_data_editor_insert_new_variable_at_posn (de, range->start_y);
}
}
insert_case_at_row (PsppireDataWindow *dw)
{
PsppireDataEditor *de = dw->data_editor;
- JmdRange *range = JMD_SHEET(de->data_sheet)->selection;
+ SswRange *range = SSW_SHEET(de->data_sheet)->selection;
psppire_data_editor_insert_new_case_at_posn (de, range->start_y);
}
PSPPIRE_DATA_EDITOR (psppire_data_editor_new (de->dict, de->data_store));
g_signal_connect (de, "realize",
- G_CALLBACK (set_data_page), de);
+ G_CALLBACK (on_realize), de);
g_signal_connect_swapped (de->data_store, "case-changed",
G_CALLBACK (set_unsaved), de);
connect_dialog_action (PSPPIRE_TYPE_DIALOG_ACTION_1SKS, de);
connect_dialog_action (PSPPIRE_TYPE_DIALOG_ACTION_TWO_SAMPLE, de);
connect_dialog_action (PSPPIRE_TYPE_DIALOG_ACTION_K_RELATED, de);
+ connect_dialog_action (PSPPIRE_TYPE_DIALOG_ACTION_K_INDEPENDENT, de);
{
GSimpleAction *file_import_action = g_simple_action_new ("file-import", NULL);