From: John Darrington Date: Fri, 14 Nov 2008 11:21:39 +0000 (+0900) Subject: More unused code deleted. X-Git-Tag: v0.7.1~161 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aeec83144677194d5609dce0fb45c2c72a1f6066;p=pspp-builds.git More unused code deleted. --- diff --git a/lib/gtksheet/gtksheet.c b/lib/gtksheet/gtksheet.c index 7ac5115c..fd998a5a 100644 --- a/lib/gtksheet/gtksheet.c +++ b/lib/gtksheet/gtksheet.c @@ -96,8 +96,8 @@ static void gtk_sheet_column_title_button_draw (GtkSheet *sheet, gint column); static void gtk_sheet_row_title_button_draw (GtkSheet *sheet, gint row); -static void gtk_sheet_set_row_height (GtkSheet * sheet, - gint row, +static void gtk_sheet_set_row_height (GtkSheet *sheet, + gint row, guint height); static gboolean gtk_sheet_cell_empty (const GtkSheet *, gint, gint); @@ -522,9 +522,6 @@ static void init_attributes (const GtkSheet *sheet, /* Memory allocation routines */ -static void gtk_sheet_real_range_clear (GtkSheet *sheet, - const GtkSheetRange *range); - static void gtk_sheet_real_cell_clear (GtkSheet *sheet, gint row, gint column); @@ -1355,27 +1352,6 @@ gtk_sheet_get_columns_count (GtkSheet *sheet) return g_sheet_column_get_column_count (sheet->column_geometry); } -guint -gtk_sheet_get_rows_count (GtkSheet *sheet) -{ - g_return_val_if_fail (sheet != NULL, 0); - g_return_val_if_fail (GTK_IS_SHEET (sheet), 0); - - return g_sheet_row_get_row_count (sheet->row_geometry); -} - -void -gtk_sheet_set_selection_mode (GtkSheet *sheet, gint mode) -{ - g_return_if_fail (sheet != NULL); - g_return_if_fail (GTK_IS_SHEET (sheet)); - - if (GTK_WIDGET_REALIZED (sheet)) - gtk_sheet_real_unselect_range (sheet, NULL); - - sheet->selection_mode = mode; -} - static void gtk_sheet_set_column_width (GtkSheet * sheet, gint column, @@ -1419,39 +1395,6 @@ gtk_sheet_autoresize_column (GtkSheet *sheet, gint column) } } - - -void -gtk_sheet_set_row_titles_width (GtkSheet *sheet, guint width) -{ - if (width < COLUMN_MIN_WIDTH) return; - - sheet->row_title_area.width = width; - - adjust_scrollbars (sheet); - - if (sheet->hadjustment) - g_signal_emit_by_name (sheet->hadjustment, - "value_changed"); - size_allocate_global_button (sheet); -} - -void -gtk_sheet_set_column_titles_height (GtkSheet *sheet, guint height) -{ - if (height < default_row_height (sheet)) - return; - - sheet->column_title_area.height = height; - - adjust_scrollbars (sheet); - - if (sheet->vadjustment) - g_signal_emit_by_name (sheet->vadjustment, - "value_changed"); - size_allocate_global_button (sheet); -} - void gtk_sheet_show_column_titles (GtkSheet *sheet) { @@ -1655,16 +1598,7 @@ gtk_sheet_moveto (GtkSheet *sheet, } -void -gtk_sheet_columns_set_resizable (GtkSheet *sheet, gboolean resizable) -{ - g_return_if_fail (sheet != NULL); - g_return_if_fail (GTK_IS_SHEET (sheet)); - - sheet->columns_resizable = resizable; -} - -gboolean +static gboolean gtk_sheet_columns_resizable (GtkSheet *sheet) { g_return_val_if_fail (sheet != NULL, FALSE); @@ -1674,16 +1608,7 @@ gtk_sheet_columns_resizable (GtkSheet *sheet) } -void -gtk_sheet_rows_set_resizable (GtkSheet *sheet, gboolean resizable) -{ - g_return_if_fail (sheet != NULL); - g_return_if_fail (GTK_IS_SHEET (sheet)); - - sheet->rows_resizable = resizable; -} - -gboolean +static gboolean gtk_sheet_rows_resizable (GtkSheet *sheet) { g_return_val_if_fail (sheet != NULL, FALSE); @@ -2734,44 +2659,6 @@ gtk_sheet_real_cell_clear (GtkSheet *sheet, gint row, gint column) dispose_string (sheet, old_text); } -void -gtk_sheet_range_clear (GtkSheet *sheet, const GtkSheetRange *range) -{ - g_return_if_fail (sheet != NULL); - g_return_if_fail (GTK_IS_SHEET (sheet)); - - gtk_sheet_real_range_clear (sheet, range); -} - -static void -gtk_sheet_real_range_clear (GtkSheet *sheet, const GtkSheetRange *range) -{ - gint i, j; - GtkSheetRange clear; - - if (!range) - { - clear.row0 = 0; - clear.rowi = g_sheet_row_get_row_count (sheet->row_geometry) - 1; - clear.col0 = 0; - clear.coli = g_sheet_column_get_column_count (sheet->column_geometry) - 1; - } - else - clear=*range; - - clear.row0 = MAX (clear.row0, 0); - clear.col0 = MAX (clear.col0, 0); - clear.rowi = MIN (clear.rowi, g_sheet_row_get_row_count (sheet->row_geometry) - 1 ); - clear.coli = MIN (clear.coli, g_sheet_column_get_column_count (sheet->column_geometry) - 1 ); - - for (i = clear.row0; i <= clear.rowi; i++) - for (j = clear.col0; j <= clear.coli; j++) - { - gtk_sheet_real_cell_clear (sheet, i, j); - } - - gtk_sheet_range_draw (sheet, NULL); -} static gboolean diff --git a/lib/gtksheet/gtksheet.h b/lib/gtksheet/gtksheet.h index 983c5f0a..127f803e 100644 --- a/lib/gtksheet/gtksheet.h +++ b/lib/gtksheet/gtksheet.h @@ -36,21 +36,7 @@ G_BEGIN_DECLS - -typedef enum -{ - GTK_SHEET_FOREGROUND, - GTK_SHEET_BACKGROUND, - GTK_SHEET_FONT, - GTK_SHEET_JUSTIFICATION, - GTK_SHEET_BORDER, - GTK_SHEET_BORDER_COLOR, - GTK_SHEET_IS_EDITABLE, - GTK_SHEET_IS_VISIBLE -} GtkSheetAttrType; - /* sheet->state */ - enum { GTK_SHEET_NORMAL, @@ -68,8 +54,6 @@ enum #define GTK_IS_SHEET(obj) GTK_CHECK_TYPE (obj, gtk_sheet_get_type ()) - - typedef struct _GtkSheetClass GtkSheetClass; typedef struct _GtkSheetCellAttr GtkSheetCellAttr; typedef struct _GtkSheetCell GtkSheetCell; @@ -335,13 +319,6 @@ void gtk_sheet_get_active_cell (GtkSheet *sheet, /* get cell contents */ gchar *gtk_sheet_cell_get_text (const GtkSheet *sheet, gint row, gint col); -/* clear cell contents */ -void gtk_sheet_cell_clear (GtkSheet *sheet, gint row, gint col); - -/* clear range contents. If range==NULL the whole sheet will be cleared */ -void gtk_sheet_range_clear (GtkSheet *sheet, - const GtkSheetRange *range); - /* get cell attributes of the given cell */ /* TRUE means that the cell is currently allocated */ @@ -349,7 +326,7 @@ gboolean gtk_sheet_get_attributes (const GtkSheet *sheet, gint row, gint col, GtkSheetCellAttr *attributes); -void gtk_sheet_set_model (GtkSheet *sheet, +void gtk_sheet_set_model (GtkSheet *sheet, GSheetModel *model); GSheetModel * gtk_sheet_get_model (const GtkSheet *sheet);