static void psppire_data_store_finalize (GObject *object);
static gboolean psppire_data_store_clear_datum (GSheetModel *model,
- gint row, gint column);
+ glong row, glong column);
#define MIN_COLUMNS 10
-static gint
+static glong
psppire_data_store_get_var_count (const GSheetModel *model)
{
const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
return psppire_dict_get_var_cnt (store->dict);
}
-static gint
-psppire_data_store_get_case_count (const GSheetModel *model)
+casenumber
+psppire_data_store_get_case_count (PsppireDataStore *store)
+{
+ return psppire_case_file_get_case_count (store->case_file);
+}
+
+static glong
+psppire_data_store_get_case_count_from_model (const GSheetModel *model)
{
const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
return psppire_case_file_get_case_count (store->case_file);
}
-
static void
psppire_data_store_init (PsppireDataStore *data_store)
{
const PangoFontDescription *
psppire_data_store_get_font_desc (const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
}
static inline gchar *
-psppire_data_store_get_string_wrapper (const GSheetModel *model, gint row,
- gint column)
+psppire_data_store_get_string_wrapper (const GSheetModel *model, glong row,
+ glong column)
{
return psppire_data_store_get_string (PSPPIRE_DATA_STORE (model), row, column);
}
static inline gboolean
psppire_data_store_set_string_wrapper (GSheetModel *model,
const gchar *text,
- gint row, gint column)
+ glong row, glong column)
{
return psppire_data_store_set_string (PSPPIRE_DATA_STORE (model), text,
row, column);
iface->get_font_desc = psppire_data_store_get_font_desc;
iface->get_cell_border = NULL;
iface->get_column_count = psppire_data_store_get_var_count;
- iface->get_row_count = psppire_data_store_get_case_count;
+ iface->get_row_count = psppire_data_store_get_case_count_from_model;
}
static
static void
-delete_cases_callback (GtkWidget *w, gint first, gint n_cases, gpointer data)
+delete_cases_callback (GtkWidget *w,
+ casenumber first, casenumber n_cases, gpointer data)
{
PsppireDataStore *store ;
static void
-insert_case_callback (GtkWidget *w, gint casenum, gpointer data)
+insert_case_callback (GtkWidget *w, casenumber casenum, gpointer data)
{
PsppireDataStore *store ;
/* Insert a blank case before POSN */
gboolean
-psppire_data_store_insert_new_case (PsppireDataStore *ds, gint posn)
+psppire_data_store_insert_new_case (PsppireDataStore *ds, casenumber posn)
{
gboolean result;
gint val_cnt, v;
gchar *
-psppire_data_store_get_string (PsppireDataStore *store, gint row, gint column)
+psppire_data_store_get_string (PsppireDataStore *store, glong row, glong column)
{
gint idx;
char *text;
static gboolean
psppire_data_store_clear_datum (GSheetModel *model,
- gint row, gint col)
-
+ glong row, glong col)
{
PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
*/
gboolean
psppire_data_store_set_string (PsppireDataStore *store,
- const gchar *text, gint row, gint col)
+ const gchar *text, glong row, glong col)
{
const struct variable *pv = psppire_dict_get_variable (store->dict, col);
g_return_val_if_fail (pv, FALSE);
/* Column related funcs */
-static gint
+static glong
geometry_get_column_count (const GSheetColumn *geom)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
static gint
-geometry_get_width (const GSheetColumn *geom, gint unit)
+geometry_get_width (const GSheetColumn *geom, glong unit)
{
const struct variable *pv ;
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
}
static void
-geometry_set_width (GSheetColumn *geom, gint unit, gint width)
+geometry_set_width (GSheetColumn *geom, glong unit, gint width)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
static GtkJustification
-geometry_get_justification (const GSheetColumn *geom, gint unit)
+geometry_get_justification (const GSheetColumn *geom, glong unit)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
const struct variable *pv ;
static const gchar null_var_name[]=N_("var");
static gchar *
-geometry_get_column_button_label (const GSheetColumn *geom, gint unit)
+geometry_get_column_button_label (const GSheetColumn *geom, glong unit)
{
gchar *text;
struct variable *pv ;
static gchar *
-geometry_get_column_subtitle (const GSheetColumn *geom, gint unit)
+geometry_get_column_subtitle (const GSheetColumn *geom, glong unit)
{
gchar *text;
const struct variable *v ;
static gboolean
-geometry_get_sensitivity (const GSheetColumn *geom, gint unit)
+geometry_get_sensitivity (const GSheetColumn *geom, glong unit)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
/* Row related funcs */
-static gint
+static glong
geometry_get_row_count (const GSheetRow *geom, gpointer data)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
static gint
-geometry_get_height (const GSheetRow *geom, gint unit, gpointer data)
+geometry_get_height (const GSheetRow *geom, glong unit, gpointer data)
{
return 25;
}
static gboolean
-geometry_get_row_sensitivity (const GSheetRow *geom, gint unit, gpointer data)
+geometry_get_row_sensitivity (const GSheetRow *geom, glong unit, gpointer data)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
static gchar *
-geometry_get_row_button_label (const GSheetRow *geom, gint unit, gpointer data)
+geometry_get_row_button_label (const GSheetRow *geom, glong unit, gpointer data)
{
gchar *text;
gchar *s;
TRAILING_ROWS + psppire_case_file_get_case_count (ds->case_file))
return 0;
- s = g_strdup_printf (_("%d"), unit + FIRST_CASE_NUMBER);
+ s = g_strdup_printf (_("%ld"), unit + FIRST_CASE_NUMBER);
text = pspp_locale_to_utf8 (s, -1, 0);
iface->get_button_label = geometry_get_row_button_label;
}
-
-
-