Accept TO in any case for use with n-ary functions. Fixes bug #18923.
[pspp] / lib / gtksheet / gsheet-hetero-column.c
index 575fdc8a3858c6ba080220166fe424052cb10e01..1107a4505a433263c9a5cf1bf27102b089851317 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
@@ -116,8 +115,6 @@ g_sheet_hetero_column_get_width(const GSheetColumn *geom, gint i)
 static gint 
 g_sheet_hetero_column_get_sensitivity(const GSheetColumn *geom, gint u)
 {
-  GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-
   return TRUE;
 }
 
@@ -125,27 +122,23 @@ g_sheet_hetero_column_get_sensitivity(const GSheetColumn *geom, gint u)
 static gint 
 g_sheet_hetero_column_get_visibility(const GSheetColumn *geom, gint u)
 {
-  GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-
   return TRUE;
 }
 
 
 
-static const gchar *
+static gchar *
 g_sheet_hetero_column_get_button_label(const GSheetColumn *geom, gint u)
 {
   GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-  
-  return hg->col[u].button.label;
+
+  return g_locale_to_utf8(hg->col[u].button.label, -1, 0, 0, 0);
 }
 
 
 static GtkJustification
 g_sheet_hetero_column_get_justification(const GSheetColumn *geom, gint u)
 {
-  GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-  
   return GTK_JUSTIFY_FILL;
 }
 
@@ -190,12 +183,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;
@@ -219,13 +223,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);
 }
 
 
+