X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=blobdiff_plain;f=lib%2Fgtk-contrib%2Fpsppire-sheet.c;h=fdf28b123f43e4097c5e0c4465355cf7e92806a9;hp=a3bb1c8fcb96ea9e4dfa02a39a8a08d6cc12480c;hb=163b1639eab9b48eab64752205d75f951547b5c7;hpb=27b5e5cbc5517702d5660e2120013aa80ed6f97b diff --git a/lib/gtk-contrib/psppire-sheet.c b/lib/gtk-contrib/psppire-sheet.c index a3bb1c8f..fdf28b12 100644 --- a/lib/gtk-contrib/psppire-sheet.c +++ b/lib/gtk-contrib/psppire-sheet.c @@ -123,9 +123,6 @@ static void set_row_height (PsppireSheet *sheet, static void destroy_hover_window (PsppireSheetHoverTitle *); static PsppireSheetHoverTitle *create_hover_window (void); -static GtkStateType psppire_sheet_cell_get_state (PsppireSheet *sheet, gint row, gint col); - - static inline void dispose_string (const PsppireSheet *sheet, gchar *text) { @@ -2411,40 +2408,6 @@ psppire_sheet_cell_get_text (const PsppireSheet *sheet, gint row, gint col) } -static GtkStateType -psppire_sheet_cell_get_state (PsppireSheet *sheet, gint row, gint col) -{ - PsppireSheetRange *range; - - g_return_val_if_fail (sheet != NULL, 0); - g_return_val_if_fail (PSPPIRE_IS_SHEET (sheet), 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; - - range = &sheet->range; - - switch (sheet->select_status) - { - case PSPPIRE_SHEET_NORMAL: - return GTK_STATE_NORMAL; - break; - case PSPPIRE_SHEET_ROW_SELECTED: - if (row >= range->row0 && row <= range->rowi) - return GTK_STATE_SELECTED; - break; - case PSPPIRE_SHEET_COLUMN_SELECTED: - if (col >= range->col0 && col <= range->coli) - return GTK_STATE_SELECTED; - break; - case PSPPIRE_SHEET_RANGE_SELECTED: - if (row >= range->row0 && row <= range->rowi && \ - col >= range->col0 && col <= range->coli) - return GTK_STATE_SELECTED; - break; - } - return GTK_STATE_NORMAL; -} - /* Convert X, Y (in pixels) to *ROW, *COLUMN If the function returns FALSE, then the results will be unreliable. */