enum
{
- PSPPIRE_VAR_STORE_TRAILING_ROWS = 1,
+ PROP_0,
PSPPIRE_VAR_STORE_FORMAT_TYPE
};
switch (property_id)
{
- case PSPPIRE_VAR_STORE_TRAILING_ROWS:
- self->trailing_rows = g_value_get_int (value);
- break;
-
case PSPPIRE_VAR_STORE_FORMAT_TYPE:
self->format_type = g_value_get_enum (value);
break;
switch (property_id)
{
- case PSPPIRE_VAR_STORE_TRAILING_ROWS:
- g_value_set_int (value, self->trailing_rows);
- break;
-
case PSPPIRE_VAR_STORE_FORMAT_TYPE:
g_value_set_enum (value, self->format_type);
break;
object_class->set_property = psppire_var_store_set_property;
object_class->get_property = psppire_var_store_get_property;
- /* The minimum value for trailing-rows is 1 to prevent the
- var-store from ever having 0 rows, which breaks invariants
- in gtksheet. */
- pspec = g_param_spec_int ("trailing-rows",
- "Trailing rows",
- "Number of rows displayed after last variable",
- 1 /* minimum value */,
- 100 /* maximum value */,
- 40 /* default value */,
- G_PARAM_READWRITE);
- g_object_class_install_property (object_class,
- PSPPIRE_VAR_STORE_TRAILING_ROWS,
- pspec);
-
pspec = g_param_spec_enum ("format-type",
"Variable format type",
("Whether variables have input or output "
G_TYPE_PSPPIRE_VAR_STORE_FORMAT_TYPE,
PSPPIRE_VAR_STORE_OUTPUT_FORMATS,
G_PARAM_READWRITE);
+
g_object_class_install_property (object_class,
PSPPIRE_VAR_STORE_FORMAT_TYPE,
pspec);
g_critical ("Could not parse color \"%s\"", DISABLED_COLOR);
var_store->dict = 0;
- var_store->trailing_rows = 40;
var_store->format_type = PSPPIRE_VAR_STORE_OUTPUT_FORMATS;
}
}
-const PangoFontDescription *
-psppire_var_store_get_font_desc (const GSheetModel *model,
- glong row, glong column)
-{
- PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
-
- return store->font_desc;
-}
-
static gchar *get_column_title (const GSheetModel *model, gint col);
static gchar *get_row_title (const GSheetModel *model, gint row);
static gboolean get_row_sensitivity (const GSheetModel *model, gint row);
iface->is_editable = psppire_var_store_is_editable;
iface->get_foreground = psppire_var_store_get_foreground;
iface->get_background = NULL;
- iface->get_font_desc = psppire_var_store_get_font_desc;
- iface->get_cell_border = NULL;
iface->get_justification = NULL;
iface->get_column_title = get_column_title;
}
-void
-psppire_var_store_set_font (PsppireVarStore *store, const PangoFontDescription *fd)
-{
- g_return_if_fail (store);
- g_return_if_fail (PSPPIRE_IS_VAR_STORE (store));
-
- store->font_desc = fd;
-
- g_sheet_model_range_changed (G_SHEET_MODEL (store), -1, -1, -1, -1);
-}
-
-
static glong
psppire_var_store_get_row_count (const GSheetModel * model)
{