gtk_widget_unmap (sheet->button);
}
+/* get cell attributes of the given cell */
+/* TRUE means that the cell is currently allocated */
+static gboolean psppire_sheet_get_attributes (const PsppireSheet *sheet,
+ gint row, gint col,
+ PsppireSheetCellAttr *attributes);
+
+
static void
psppire_sheet_cell_draw (PsppireSheet *sheet, gint row, gint col)
}
}
-gboolean
+static gboolean
psppire_sheet_get_attributes (const PsppireSheet *sheet, gint row, gint col,
PsppireSheetCellAttr *attr)
{
attr->border.mask = 0;
attr->border.color = GTK_WIDGET (sheet)->style->black;
- attr->is_editable = psppire_sheet_model_is_editable (sheet->model, row, col);
-
colormap = gtk_widget_get_colormap (GTK_WIDGET (sheet));
fg = psppire_sheet_model_get_foreground (sheet->model, row, col);
if ( fg )
GdkColor foreground;
GdkColor background;
PsppireSheetCellBorder border;
- gboolean is_editable;
};
struct _PsppireSheetHoverTitle
gchar *psppire_sheet_cell_get_text (const PsppireSheet *sheet, gint row, gint col);
-/* get cell attributes of the given cell */
-/* TRUE means that the cell is currently allocated */
-gboolean psppire_sheet_get_attributes (const PsppireSheet *sheet,
- gint row, gint col,
- PsppireSheetCellAttr *attributes);
-
void psppire_sheet_set_model (PsppireSheet *sheet,
PsppireSheetModel *model);
-
/*
Callback whenever the active cell changes on the var sheet.
*/
gint oldrow, gint oldcolumn,
gpointer data)
{
- PsppireSheetCellAttr attributes;
PsppireVarStore *var_store;
PsppireVarSheetClass *vs_class =
PSPPIRE_VAR_SHEET_CLASS(G_OBJECT_GET_CLASS (vs));
g_return_if_fail (oldcolumn == PSPPIRE_VAR_STORE_COL_NAME ||
row < psppire_var_store_get_var_cnt (var_store));
- psppire_sheet_get_attributes (sheet, row, column, &attributes);
-
var = psppire_var_store_get_var (var_store, row);
switch (column)
case PSPPIRE_VAR_STORE_COL_DECIMALS:
case PSPPIRE_VAR_STORE_COL_COLUMNS:
{
- if ( attributes.is_editable)
+ if ( psppire_sheet_model_is_editable (PSPPIRE_SHEET_MODEL(var_store),
+ row, column))
{
gint r_min, r_max;