fix bug 19581
[pspp-builds.git] / lib / gtksheet / gsheet-hetero-column.c
index 1285e9f237c16be56d468754273e252c64e5fcbc..8b9b9b9c3b1884e7e8dded596ed9d7f6174721a6 100644 (file)
@@ -1,7 +1,6 @@
 /* gsheet-hetero-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
@@ -17,6 +16,8 @@
  * 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 <config.h>
+
 #include "gsheet-column-iface.h"
 #include "gsheet-hetero-column.h"
 #include <string.h>
@@ -184,12 +185,23 @@ g_sheet_hetero_column_finalize (GObject           *object)
   g_free(hg->col);
 }
 
+static void 
+hetero_column_set_width(GSheetColumn *geo, gint i, gint size)
+{
+  GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geo);
+
+  g_return_if_fail(i < hg->n_columns);
+
+  hg->col[i].width = size;
+}
+
+
 
 static void
 g_sheet_column_init (GSheetColumnIface *iface)
 {
   iface->get_width = g_sheet_hetero_column_get_width ;
-  iface->set_width = g_sheet_hetero_column_set_width ;
+  iface->set_width = hetero_column_set_width ;
   iface->get_sensitivity = g_sheet_hetero_column_get_sensitivity ;
   iface->get_visibility = g_sheet_hetero_column_get_visibility ;
   iface->get_justification = g_sheet_hetero_column_get_justification;
@@ -213,13 +225,14 @@ g_sheet_hetero_column_set_button_label(GSheetHeteroColumn *geo,
 
 
 
-void 
-g_sheet_hetero_column_set_width(GSheetHeteroColumn *geo,
-                                     gint i, gint size)
+
+inline void 
+g_sheet_hetero_column_set_width(GSheetHeteroColumn *geo, gint i, gint size)
 {
-  g_return_if_fail(i < geo->n_columns);
+  GSheetColumn *iface = G_SHEET_COLUMN(geo);
 
-  geo->col[i].width = size;
+  hetero_column_set_width(iface, i, size);
 }
 
 
+