void
psppire_sheet_change_entry (PsppireSheet *sheet, GtkType entry_type)
{
- gint state;
-
g_return_if_fail (sheet != NULL);
g_return_if_fail (PSPPIRE_IS_SHEET (sheet));
- state = sheet->select_status;
-
if (sheet->select_status == PSPPIRE_SHEET_NORMAL)
psppire_sheet_hide_entry_widget (sheet);
create_sheet_entry (sheet);
- if (state == PSPPIRE_SHEET_NORMAL)
- {
- psppire_sheet_show_entry_widget (sheet);
- }
-
+ if (sheet->select_status == PSPPIRE_SHEET_NORMAL)
+ psppire_sheet_show_entry_widget (sheet);
}
void
static GtkStateType
psppire_sheet_cell_get_state (PsppireSheet *sheet, gint row, gint col)
{
- gint state;
PsppireSheetRange *range;
g_return_val_if_fail (sheet != NULL, 0);
if (col >= psppire_axis_unit_count (sheet->haxis) || row >= psppire_axis_unit_count (sheet->vaxis)) return 0;
if (col < 0 || row < 0) return 0;
- state = sheet->select_status;
range = &sheet->range;
- switch (state)
+ switch (sheet->select_status)
{
case PSPPIRE_SHEET_NORMAL:
return GTK_STATE_NORMAL;
psppire_sheet_real_select_range (PsppireSheet *sheet,
const PsppireSheetRange *range)
{
- gint state;
-
g_return_if_fail (sheet != NULL);
if (range == NULL) range = &sheet->range;
if (range->row0 < 0 || range->rowi < 0) return;
if (range->col0 < 0 || range->coli < 0) return;
- state = sheet->select_status;
-
psppire_sheet_update_primary_selection (sheet);
g_signal_emit (sheet, sheet_signals[SELECT_RANGE], 0, &sheet->range);
{
draw_sheet_region (sheet, event->region);
-
if (sheet->select_status != PSPPIRE_SHEET_NORMAL)
{
#if 0
TRUE,
area.x + 1, area.y + 1,
area.width, area.height);
-
}
#if 0