Fixed bug where gui would crash when columns were resized.
[pspp-builds.git] / lib / gtksheet / gsheet-hetero-column.c
index 1285e9f237c16be56d468754273e252c64e5fcbc..e32f4f4aa2dbe583615c754b377f65d567989000 100644 (file)
@@ -184,12 +184,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 +224,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);
 }
 
 
+