/* 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
* 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>
-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);
}
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;
-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);
}
+