gtk_widget_queue_draw (GTK_WIDGET (de));
}
-void
-insert_new_case_at_posn (PsppireDataEditor *de, gint posn)
-{
- psppire_data_store_insert_new_case (de->data_store, posn);
-
- gtk_widget_queue_draw (GTK_WIDGET (de));
-}
-
static void
insert_new_case (PsppireDataEditor *de)
{
gint posn = GPOINTER_TO_INT (g_object_get_data
(G_OBJECT (de->data_sheet_cases_row_popup), "item"));
- insert_new_case_at_posn (de, posn);
+ psppire_data_editor_insert_new_case_at_posn (de, posn);
}
void
-data_delete_variables (PsppireDataEditor *de)
+psppire_data_editor_data_delete_variables (PsppireDataEditor *de)
{
JmdRange *range = JMD_SHEET(de->data_sheet)->selection;
}
void
-var_delete_variables (PsppireDataEditor *de)
+psppire_data_editor_var_delete_variables (PsppireDataEditor *de)
{
JmdRange *range = JMD_SHEET(de->var_sheet)->selection;
}
void
-insert_new_variable_at_posn (PsppireDataEditor *de, gint posn)
+psppire_data_editor_insert_new_case_at_posn (PsppireDataEditor *de, gint posn)
+{
+ psppire_data_store_insert_new_case (de->data_store, posn);
+
+ gtk_widget_queue_draw (GTK_WIDGET (de->data_sheet));
+}
+
+void
+psppire_data_editor_insert_new_variable_at_posn (PsppireDataEditor *de, gint posn)
{
const struct variable *v = psppire_dict_insert_variable (de->dict, posn, NULL);
psppire_data_store_insert_value (de->data_store, var_get_width(v),
(G_OBJECT (de->data_sheet_cases_column_popup),
"item"));
- insert_new_variable_at_posn (de, posn);
+ psppire_data_editor_insert_new_variable_at_posn (de, posn);
}
static void
de->var_clear_variables_menu_item =
gtk_menu_item_new_with_mnemonic (_("Cl_ear Variables"));
g_signal_connect_swapped (de->var_clear_variables_menu_item, "activate",
- G_CALLBACK (var_delete_variables), de);
+ G_CALLBACK (psppire_data_editor_var_delete_variables),
+ de);
gtk_widget_set_sensitive (de->var_clear_variables_menu_item, FALSE);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), de->var_clear_variables_menu_item);
de->data_clear_variables_menu_item =
gtk_menu_item_new_with_mnemonic (_("Cl_ear Variables"));
g_signal_connect_swapped (de->data_clear_variables_menu_item, "activate",
- G_CALLBACK (data_delete_variables), de);
+ G_CALLBACK (psppire_data_editor_data_delete_variables),
+ de);
gtk_widget_set_sensitive (de->data_clear_variables_menu_item, FALSE);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), de->data_clear_variables_menu_item);
void psppire_data_editor_set_font (PsppireDataEditor *, PangoFontDescription *);
void psppire_data_editor_split_window (PsppireDataEditor *, gboolean );
-void psppire_data_editor_goto_variable (PsppireDataEditor *, gint dict_index);
+void psppire_data_editor_goto_variable (PsppireDataEditor *, gint dict_index);
+void psppire_data_editor_data_delete_variables (PsppireDataEditor *de);
+void psppire_data_editor_var_delete_variables (PsppireDataEditor *de);
+void psppire_data_editor_insert_new_case_at_posn (PsppireDataEditor *de, gint posn);
+void psppire_data_editor_insert_new_variable_at_posn (PsppireDataEditor *de, gint posn);
struct _PsppireDataSheet *psppire_data_editor_get_active_data_sheet (PsppireDataEditor *);
enum {PSPPIRE_DATA_EDITOR_DATA_VIEW = 0, PSPPIRE_DATA_EDITOR_VARIABLE_VIEW};
+
+
+
G_END_DECLS
#endif /* __PSPPIRE_DATA_EDITOR_H__ */
#include "ui/gui/helper.h"
#include "ui/gui/psppire-import-assistant.h"
#include "ui/gui/psppire-data-window.h"
+#include "ui/gui/psppire-data-editor.h"
#include "ui/gui/psppire-dialog-action.h"
#include "ui/gui/psppire-encoding-selector.h"
#include "ui/gui/psppire-syntax-window.h"
int p = gtk_notebook_get_current_page (GTK_NOTEBOOK (de));
if (p == PSPPIRE_DATA_EDITOR_DATA_VIEW)
{
- data_delete_variables (de);
+ psppire_data_editor_data_delete_variables (de);
}
else
{
- var_delete_variables (de);
+ psppire_data_editor_var_delete_variables (de);
}
}
if (p == PSPPIRE_DATA_EDITOR_DATA_VIEW)
{
JmdRange *range = JMD_SHEET(de->data_sheet)->selection;
- insert_new_variable_at_posn (de, range->start_x);
+ psppire_data_editor_insert_new_variable_at_posn (de, range->start_x);
}
else
{
JmdRange *range = JMD_SHEET(de->var_sheet)->selection;
- insert_new_variable_at_posn (de, range->start_y);
+ psppire_data_editor_insert_new_variable_at_posn (de, range->start_y);
}
}
{
PsppireDataEditor *de = dw->data_editor;
JmdRange *range = JMD_SHEET(de->data_sheet)->selection;
- insert_new_case_at_posn (de, range->start_y);
+ psppire_data_editor_insert_new_case_at_posn (de, range->start_y);
}