src_ui_gui_psppire_SOURCES += \
- src/ui/gui/efficient-sheet/src/jmd-axis-model.c \
- src/ui/gui/efficient-sheet/src/jmd-constraint.c \
- src/ui/gui/efficient-sheet/src/jmd-sheet.c \
- src/ui/gui/efficient-sheet/src/jmd-sheet-axis.c \
- src/ui/gui/efficient-sheet/src/jmd-sheet-body.c \
- src/ui/gui/efficient-sheet/src/jmd-sheet-single.c \
- src/ui/gui/efficient-sheet/src/jmd-datum.c \
- src/ui/gui/efficient-sheet/src/jmd-cell.c
+ src/ui/gui/efficient-sheet/src/ssw-axis-model.c \
+ src/ui/gui/efficient-sheet/src/ssw-constraint.c \
+ src/ui/gui/efficient-sheet/src/ssw-sheet.c \
+ src/ui/gui/efficient-sheet/src/ssw-sheet-axis.c \
+ src/ui/gui/efficient-sheet/src/ssw-sheet-body.c \
+ src/ui/gui/efficient-sheet/src/ssw-sheet-single.c \
+ src/ui/gui/efficient-sheet/src/ssw-datum.c \
+ src/ui/gui/efficient-sheet/src/ssw-cell.c
nodist_src_ui_gui_psppire_SOURCES += \
- src/ui/gui/efficient-sheet/jmd-marshaller.c \
- src/ui/gui/efficient-sheet/jmd-marshaller.h
+ src/ui/gui/efficient-sheet/src/ssw-marshaller.c \
+ src/ui/gui/efficient-sheet/src/ssw-marshaller.h
src_ui_gui_psppire_CPPFLAGS+=-Isrc/ui/gui/efficient-sheet/src
BUILT_SOURCES += \
- src/ui/gui/efficient-sheet/src/jmd-marshaller.c \
- src/ui/gui/efficient-sheet/src/jmd-marshaller.h
+ src/ui/gui/efficient-sheet/src/ssw-marshaller.c \
+ src/ui/gui/efficient-sheet/src/ssw-marshaller.h
-src/ui/gui/efficient-sheet/src/jmd-marshaller.c: src/ui/gui/efficient-sheet/src/marshall-list
- glib-genmarshal --body --prefix=jmd_cclosure_marshal $< > $@
+src/ui/gui/efficient-sheet/src/ssw-marshaller.c: src/ui/gui/efficient-sheet/src/marshall-list
+ glib-genmarshal --body --prefix=ssw_cclosure_marshal $< > $@
-src/ui/gui/efficient-sheet/src/jmd-marshaller.h: src/ui/gui/efficient-sheet/src/marshall-list
- glib-genmarshal --header --prefix=jmd_cclosure_marshal $< > $@
+src/ui/gui/efficient-sheet/src/ssw-marshaller.h: src/ui/gui/efficient-sheet/src/marshall-list
+ glib-genmarshal --header --prefix=ssw_cclosure_marshal $< > $@
if (case_num >= 0 &&
case_num < gtk_tree_model_iter_n_children (GTK_TREE_MODEL (ds), NULL))
{
- jmd_sheet_scroll_to (ds, -1, case_num);
- jmd_sheet_set_active_cell (ds, -1, case_num, 0);
+ ssw_sheet_scroll_to (ds, -1, case_num);
+ ssw_sheet_set_active_cell (ds, -1, case_num, 0);
}
}
}
#include "ui/gui/psppire-data-sheet.h"
-#include "ui/gui/efficient-sheet/src/jmd-sheet.h"
+#include "ui/gui/efficient-sheet/src/ssw-sheet.h"
#include <gettext.h>
#define _(msgid) gettext (msgid)
gtk_notebook_set_current_page (GTK_NOTEBOOK (de),
PSPPIRE_DATA_EDITOR_DATA_VIEW);
- jmd_sheet_scroll_to (JMD_SHEET (de->data_sheet), dict_index, -1);
+ ssw_sheet_scroll_to (SSW_SHEET (de->data_sheet), dict_index, -1);
}
static void
-on_data_sheet_var_double_clicked (JmdSheet *data_sheet, gint dict_index,
+on_data_sheet_var_double_clicked (SswSheet *data_sheet, gint dict_index,
PsppireDataEditor *de)
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (de),
PSPPIRE_DATA_EDITOR_VARIABLE_VIEW);
- jmd_sheet_scroll_to (JMD_SHEET (de->var_sheet), -1, dict_index);
+ ssw_sheet_scroll_to (SSW_SHEET (de->var_sheet), -1, dict_index);
}
refresh_entry (PsppireDataEditor *de)
{
gint row, col;
- if (jmd_sheet_get_active_cell (JMD_SHEET (de->data_sheet), &col, &row))
+ if (ssw_sheet_get_active_cell (SSW_SHEET (de->data_sheet), &col, &row))
{
union value val;
const struct variable *var = psppire_dict_get_variable (de->dict, col);
/* Called when the active cell or the selection in the data sheet changes */
static void
-on_data_selection_change (PsppireDataEditor *de, JmdRange *sel)
+on_data_selection_change (PsppireDataEditor *de, SswRange *sel)
{
gchar *ref_cell_text = NULL;
void
psppire_data_editor_data_delete_variables (PsppireDataEditor *de)
{
- JmdRange *range = JMD_SHEET(de->data_sheet)->selection;
+ SswRange *range = SSW_SHEET(de->data_sheet)->selection;
psppire_dict_delete_variables (de->dict, range->start_x,
(range->end_x - range->start_x + 1));
void
psppire_data_editor_var_delete_variables (PsppireDataEditor *de)
{
- JmdRange *range = JMD_SHEET(de->var_sheet)->selection;
+ SswRange *range = SSW_SHEET(de->var_sheet)->selection;
psppire_dict_delete_variables (de->dict, range->start_y,
(range->end_y - range->start_y + 1));
de->split = FALSE;
de->data_sheet = psppire_data_sheet_new ();
- GtkWidget *data_button = jmd_sheet_get_button (JMD_SHEET (de->data_sheet));
+ GtkWidget *data_button = ssw_sheet_get_button (SSW_SHEET (de->data_sheet));
gtk_button_set_label (GTK_BUTTON (data_button), _("Case"));
de->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (de->vbox), hbox, FALSE, FALSE, 0);
de->var_sheet = psppire_variable_sheet_new ();
- GtkWidget *var_button = jmd_sheet_get_button (JMD_SHEET (de->var_sheet));
+ GtkWidget *var_button = ssw_sheet_get_button (SSW_SHEET (de->var_sheet));
gtk_button_set_label (GTK_BUTTON (var_button), _("Variable"));
gtk_notebook_append_page (GTK_NOTEBOOK (de), de->var_sheet,
void
psppire_data_editor_show_grid (PsppireDataEditor *de, gboolean grid_visible)
{
- g_object_set (JMD_SHEET (de->var_sheet), "gridlines", grid_visible, NULL);
- g_object_set (JMD_SHEET (de->data_sheet), "gridlines", grid_visible, NULL);
+ g_object_set (SSW_SHEET (de->var_sheet), "gridlines", grid_visible, NULL);
+ g_object_set (SSW_SHEET (de->data_sheet), "gridlines", grid_visible, NULL);
}
switch (page)
{
case PSPPIRE_DATA_EDITOR_DATA_VIEW:
- jmd_sheet_scroll_to (JMD_SHEET (de->data_sheet), dict_index, -1);
- jmd_sheet_set_active_cell (JMD_SHEET (de->data_sheet), dict_index, -1, NULL);
+ ssw_sheet_scroll_to (SSW_SHEET (de->data_sheet), dict_index, -1);
+ ssw_sheet_set_active_cell (SSW_SHEET (de->data_sheet), dict_index, -1, NULL);
break;
case PSPPIRE_DATA_EDITOR_VARIABLE_VIEW:
- jmd_sheet_scroll_to (JMD_SHEET (de->var_sheet), -1, dict_index);
- jmd_sheet_set_active_cell (JMD_SHEET (de->var_sheet), -1, dict_index, NULL);
+ ssw_sheet_scroll_to (SSW_SHEET (de->var_sheet), -1, dict_index);
+ ssw_sheet_set_active_cell (SSW_SHEET (de->var_sheet), -1, dict_index, NULL);
break;
}
}
void
psppire_data_editor_paste (PsppireDataEditor *de)
{
- JmdSheet *sheet = JMD_SHEET (de->data_sheet);
+ SswSheet *sheet = SSW_SHEET (de->data_sheet);
GtkClipboard *clip =
gtk_clipboard_get_for_display (gtk_widget_get_display (GTK_WIDGET (sheet)),
GDK_SELECTION_CLIPBOARD);
- jmd_sheet_paste (sheet, clip, store_set_datum);
+ ssw_sheet_paste (sheet, clip, store_set_datum);
}
static void
do_sort (PsppireDataSheet *sheet, GtkSortType order)
{
- JmdRange *range = JMD_SHEET(sheet)->selection;
+ SswRange *range = SSW_SHEET(sheet)->selection;
PsppireDataStore *data_store = NULL;
g_object_get (sheet, "data-model", &data_store, NULL);
}
static gchar *
-data_store_value_to_string (JmdSheet *data_sheet, PsppireDataStore *store, gint col, gint row, const GValue *v)
+data_store_value_to_string (SswSheet *data_sheet, PsppireDataStore *store, gint col, gint row, const GValue *v)
{
return psppire_data_store_value_to_string (store, col, row, v);
}
static void
delete_cases (PsppireDataSheet *sheet)
{
- JmdRange *range = JMD_SHEET(sheet)->selection;
+ SswRange *range = SSW_SHEET(sheet)->selection;
PsppireDataStore *data_store = NULL;
g_object_get (sheet, "data-model", &data_store, NULL);
static void
set_menu_items_sensitivity (PsppireDataSheet *sheet, gpointer selection, gpointer p)
{
- JmdRange *range = selection;
+ SswRange *range = selection;
PsppireDataStore *data_store = NULL;
g_object_get (sheet, "data-model", &data_store, NULL);
static void
delete_variables (PsppireDataSheet *sheet)
{
- JmdRange *range = JMD_SHEET(sheet)->selection;
+ SswRange *range = SSW_SHEET(sheet)->selection;
PsppireDataStore *data_store = NULL;
g_object_get (sheet, "data-model", &data_store, NULL);
\f
-G_DEFINE_TYPE (PsppireDataSheet, psppire_data_sheet, JMD_TYPE_SHEET)
+G_DEFINE_TYPE (PsppireDataSheet, psppire_data_sheet, SSW_TYPE_SHEET)
static GObjectClass * parent_class = NULL;
static gboolean dispose_has_run = FALSE;
#define _PSPPIRE_DATA_SHEET_H
#include <gtk/gtk.h>
-#include "ui/gui/efficient-sheet/src/jmd-sheet.h"
+#include "ui/gui/efficient-sheet/src/ssw-sheet.h"
struct _PsppireDataSheet
{
- JmdSheet parent_instance;
+ SswSheet parent_instance;
GtkWidget *data_sheet_cases_column_popup;
struct _PsppireDataSheetClass
{
- JmdSheetClass parent_class;
+ SswSheetClass parent_class;
};
#define PSPPIRE_TYPE_DATA_SHEET psppire_data_sheet_get_type ()
-G_DECLARE_FINAL_TYPE (PsppireDataSheet, psppire_data_sheet, PSPPIRE, DATA_SHEET, JmdSheet)
+G_DECLARE_FINAL_TYPE (PsppireDataSheet, psppire_data_sheet, PSPPIRE, DATA_SHEET, SswSheet)
GtkWidget *psppire_data_sheet_new (void);
#include "gl/c-strcasestr.h"
#include "gl/xvasprintf.h"
-#include "ui/gui/efficient-sheet/src/jmd-sheet.h"
+#include "ui/gui/efficient-sheet/src/ssw-sheet.h"
#include "find-dialog.h"
#include "options-dialog.h"
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);
}
#include "ui/gui/psppire-marshal.h"
#include "ui/gui/psppire-var-ptr.h"
-#include "ui/gui/efficient-sheet/src/jmd-datum.h"
+#include "ui/gui/efficient-sheet/src/ssw-datum.h"
#include <gobject/genums.h>
static GType
git (GListModel *list)
{
- return JMD_TYPE_DATUM;
+ return SSW_TYPE_DATUM;
}
static gpointer
gi (GListModel *list, guint id)
{
- JmdDatum *gd = JMD_DATUM (g_object_new (JMD_TYPE_DATUM, NULL));
+ SswDatum *gd = SSW_DATUM (g_object_new (SSW_TYPE_DATUM, NULL));
PsppireDict *dict = PSPPIRE_DICT (list);
static void
-jmd_init_iface (GListModelInterface *iface)
+ssw_init_iface (GListModelInterface *iface)
{
iface->get_n_items = gni;
iface->get_item = gi;
};
static const GInterfaceInfo list_model_info = {
- (GInterfaceInitFunc) jmd_init_iface,
+ (GInterfaceInitFunc) ssw_init_iface,
NULL,
NULL
};
#include "psppire-var-sheet-header.h"
-#include "efficient-sheet/src/jmd-axis-model.h"
-#include "efficient-sheet/src/jmd-datum.h"
+#include "efficient-sheet/src/ssw-axis-model.h"
+#include "efficient-sheet/src/ssw-datum.h"
enum {CHANGED,
n_SIGNALS};
static GType
git (GListModel *list)
{
- return JMD_TYPE_DATUM;
+ return SSW_TYPE_DATUM;
}
static gpointer
gi (GListModel *list, guint position)
{
- JmdDatum *gd = JMD_DATUM (g_object_new (JMD_TYPE_DATUM, NULL));
+ SswDatum *gd = SSW_DATUM (g_object_new (SSW_TYPE_DATUM, NULL));
switch (position)
{
#define P_(X) (X)
-G_DEFINE_TYPE (PsppireVariableSheet, psppire_variable_sheet, JMD_TYPE_SHEET)
+G_DEFINE_TYPE (PsppireVariableSheet, psppire_variable_sheet, SSW_TYPE_SHEET)
static void
set_var_type (GtkCellRenderer *renderer,
{
PsppireVariableSheet *sheet = PSPPIRE_VARIABLE_SHEET (user_data);
gint row = -1, col = -1;
- jmd_sheet_get_active_cell (JMD_SHEET (sheet), &col, &row);
+ ssw_sheet_get_active_cell (SSW_SHEET (sheet), &col, &row);
PsppireDict *dict = NULL;
g_object_get (sheet, "data-model", &dict, NULL);
{
PsppireVariableSheet *sheet = PSPPIRE_VARIABLE_SHEET (user_data);
gint row = -1, col = -1;
- jmd_sheet_get_active_cell (JMD_SHEET (sheet), &col, &row);
+ ssw_sheet_get_active_cell (SSW_SHEET (sheet), &col, &row);
PsppireDict *dict = NULL;
g_object_get (sheet, "data-model", &dict, NULL);
{
PsppireVariableSheet *sheet = PSPPIRE_VARIABLE_SHEET (user_data);
gint row = -1, col = -1;
- jmd_sheet_get_active_cell (JMD_SHEET (sheet), &col, &row);
+ ssw_sheet_get_active_cell (SSW_SHEET (sheet), &col, &row);
PsppireDict *dict = NULL;
g_object_get (sheet, "data-model", &dict, NULL);
\f
static void
-show_variables_row_popup (JmdSheet *sheet, int row, uint button,
+show_variables_row_popup (SswSheet *sheet, int row, uint button,
uint state, gpointer p)
{
PsppireVariableSheet *var_sheet = PSPPIRE_VARIABLE_SHEET (sheet);
static void
-delete_variables (JmdSheet *sheet)
+delete_variables (SswSheet *sheet)
{
- JmdRange *range = sheet->selection;
+ SswRange *range = sheet->selection;
PsppireDict *dict = NULL;
g_object_get (sheet, "data-model", &dict, NULL);
static void
-set_var_popup_sensitivity (JmdSheet *sheet, gpointer selection, gpointer p)
+set_var_popup_sensitivity (SswSheet *sheet, gpointer selection, gpointer p)
{
PsppireVariableSheet *var_sheet = PSPPIRE_VARIABLE_SHEET (sheet);
- JmdRange *range = selection;
+ SswRange *range = selection;
gint width = gtk_tree_model_get_n_columns (sheet->data_model);
gboolean whole_row_selected = (range->start_x == 0 &&
}
static gchar *
-var_sheet_data_to_string (JmdSheet *sheet, GtkTreeModel *m,
+var_sheet_data_to_string (SswSheet *sheet, GtkTreeModel *m,
gint col, gint row, const GValue *in)
{
if (col >= n_DICT_COLS - 1) /* -1 because psppire-dict has an extra column */
return text;
}
- return jmd_sheet_default_forward_conversion (sheet, m, col, row, in);
+ return ssw_sheet_default_forward_conversion (sheet, m, col, row, in);
}
\f
#define _PSPPIRE_VARIABLE_SHEET_H
#include <gtk/gtk.h>
-#include "ui/gui/efficient-sheet/src/jmd-sheet.h"
+#include "ui/gui/efficient-sheet/src/ssw-sheet.h"
struct _PsppireVariableSheet
{
- JmdSheet parent_instance;
+ SswSheet parent_instance;
GtkCellRenderer *value_label_renderer;
GtkCellRenderer *missing_values_renderer;
struct _PsppireVariableSheetClass
{
- JmdSheetClass parent_class;
+ SswSheetClass parent_class;
};
#define PSPPIRE_TYPE_VARIABLE_SHEET psppire_variable_sheet_get_type ()
-G_DECLARE_FINAL_TYPE (PsppireVariableSheet, psppire_variable_sheet, PSPPIRE, VARIABLE_SHEET, JmdSheet)
+G_DECLARE_FINAL_TYPE (PsppireVariableSheet, psppire_variable_sheet, PSPPIRE, VARIABLE_SHEET, SswSheet)
GtkWidget *psppire_variable_sheet_new (void);