X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fgtksheet%2Fgsheet-uniform-column.c;h=c0f6732a5e51c2a38965d6c8347ae82abca560cb;hb=b069636965a498047e2eb12a31c8c45694cfb221;hp=6822fa3606b684cf00a371c53853317c383a9cba;hpb=e294a372f351d7105c21a2db58022af8b119aa64;p=pspp diff --git a/lib/gtksheet/gsheet-uniform-column.c b/lib/gtksheet/gsheet-uniform-column.c index 6822fa3606..c0f6732a5e 100644 --- a/lib/gtksheet/gsheet-uniform-column.c +++ b/lib/gtksheet/gsheet-uniform-column.c @@ -1,9 +1,8 @@ /* gsheet-uniform-column.c - * + * * PSPPIRE --- A Graphical User Interface for PSPP * Copyright (C) 2006 Free Software Foundation - * Written by John Darrington - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either @@ -13,12 +12,14 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "gsheet-column-iface.h" #include "gsheet-uniform-column.h" @@ -59,7 +60,7 @@ g_sheet_uniform_column_get_type (void) NULL }; - uniform_column_type = + uniform_column_type = g_type_register_static (G_TYPE_OBJECT, "g_sheet_uniform_column", &uniform_column_info, 0); @@ -89,59 +90,49 @@ g_sheet_uniform_column_new (gint width, gint n_columns) ug = G_SHEET_UNIFORM_COLUMN(retval); ug->n_columns = n_columns; ug->width = width; - ug->is_visible = TRUE; ug->is_sensitive = FALSE; return retval; } -static gint -g_sheet_uniform_column_get_width(const GSheetColumn *geom, gint u, gpointer data) +static gint +g_sheet_uniform_column_get_width (const GSheetColumn *geom, glong u) { - GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN(geom); - + GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN (geom); + return ug->width; } -static gint -g_sheet_uniform_column_get_sensitivity(const GSheetColumn *geom, gint u, gpointer data) +static gboolean +g_sheet_uniform_column_get_sensitivity (const GSheetColumn *geom, glong u) { - GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN(geom); - - return ug->is_sensitive; -} - + GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN (geom); -static gint -g_sheet_uniform_column_get_visibility(const GSheetColumn *geom, gint u, gpointer data) -{ - GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN(geom); - - return ug->is_visible; + return ug->is_sensitive; } static gchar * -g_sheet_uniform_column_get_button_label(const GSheetColumn *geom, gint u, gpointer data) +g_sheet_uniform_column_get_button_label (const GSheetColumn *geom, glong u) { - gchar *label = g_strdup_printf("%d", u); + gchar *label = g_strdup_printf ("%ld", u); return label; } static GtkJustification -g_sheet_uniform_column_get_justification(const GSheetColumn *geom, gint u, gpointer data) +g_sheet_uniform_column_get_justification (const GSheetColumn *geom, glong u) { return GTK_JUSTIFY_FILL; } -static gint -g_sheet_uniform_column_get_column_count(const GSheetColumn *geom, gpointer data) +static glong +g_sheet_uniform_column_get_column_count (const GSheetColumn *geom) { - GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN(geom); + GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN (geom); return ug->n_columns; } @@ -164,8 +155,8 @@ g_sheet_uniform_column_init (GSheetUniformColumn *o) { } -static void -g_sheet_uniform_column_finalize (GObject *object) +static void +g_sheet_uniform_column_finalize (GObject *object) { } @@ -175,7 +166,6 @@ g_sheet_column_init (GSheetColumnIface *iface) { iface->get_width = g_sheet_uniform_column_get_width ; iface->get_sensitivity = g_sheet_uniform_column_get_sensitivity ; - iface->get_visibility = g_sheet_uniform_column_get_visibility ; iface->get_justification = g_sheet_uniform_column_get_justification; iface->get_column_count = g_sheet_uniform_column_get_column_count; iface->get_button_label = g_sheet_uniform_column_get_button_label;