projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add casegrouper, to allow cases read from a given casereader to be
[pspp-builds.git]
/
lib
/
gtksheet
/
gsheet-hetero-column.c
diff --git
a/lib/gtksheet/gsheet-hetero-column.c
b/lib/gtksheet/gsheet-hetero-column.c
index 575fdc8a3858c6ba080220166fe424052cb10e01..8b9b9b9c3b1884e7e8dded596ed9d7f6174721a6 100644
(file)
--- a/
lib/gtksheet/gsheet-hetero-column.c
+++ b/
lib/gtksheet/gsheet-hetero-column.c
@@
-1,7
+1,6
@@
/* gsheet-hetero-column.c
* PSPPIRE --- A Graphical User Interface for PSPP
* Copyright (C) 2006 Free Software Foundation
/* 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
*
* 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
*/
* 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>
#include "gsheet-column-iface.h"
#include "gsheet-hetero-column.h"
#include <string.h>
@@
-116,8
+117,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)
{
static gint
g_sheet_hetero_column_get_sensitivity(const GSheetColumn *geom, gint u)
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-
return TRUE;
}
return TRUE;
}
@@
-125,27
+124,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)
{
static gint
g_sheet_hetero_column_get_visibility(const GSheetColumn *geom, gint u)
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-
return TRUE;
}
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);
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)
{
}
static GtkJustification
g_sheet_hetero_column_get_justification(const GSheetColumn *geom, gint u)
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-
return GTK_JUSTIFY_FILL;
}
return GTK_JUSTIFY_FILL;
}
@@
-190,12
+185,23
@@
g_sheet_hetero_column_finalize (GObject *object)
g_free(hg->col);
}
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 ;
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;
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
+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)
;
}
}
+