projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug reporting the significance of paired value t-test.
[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..ecc06cc54b76280defb1168c99946979cf27bc1d 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>
@@
-58,7
+59,7
@@
g_sheet_hetero_column_get_type (void)
NULL
};
NULL
};
- hetero_column_type =
+ hetero_column_type =
g_type_register_static (G_TYPE_OBJECT, "g_sheet_hetero_column",
&hetero_column_info, 0);
g_type_register_static (G_TYPE_OBJECT, "g_sheet_hetero_column",
&hetero_column_info, 0);
@@
-72,7
+73,7
@@
g_sheet_hetero_column_get_type (void)
static GtkSheetButton default_button;
static GtkSheetButton default_button;
-
+
/**
/**
@@
-90,12
+91,12
@@
g_sheet_hetero_column_new (gint default_width, gint n_columns)
retval = g_object_new (G_TYPE_SHEET_HETERO_COLUMN, NULL);
retval = g_object_new (G_TYPE_SHEET_HETERO_COLUMN, NULL);
- hg = G_SHEET_HETERO_COLUMN(retval);
+ hg = G_SHEET_HETERO_COLUMN
(retval);
hg->n_columns = n_columns;
hg->default_width = default_width;
hg->n_columns = n_columns;
hg->default_width = default_width;
- hg->col = g_new0(struct GSheetHeteroColumnUnit, n_columns);
+ hg->col = g_new0
(struct GSheetHeteroColumnUnit, n_columns);
- for (i = 0 ; i < hg->n_columns; ++i )
+ for (i = 0 ; i < hg->n_columns; ++i )
{
hg->col[i].button = default_button;
}
{
hg->col[i].button = default_button;
}
@@
-103,58
+104,52
@@
g_sheet_hetero_column_new (gint default_width, gint n_columns)
return retval;
}
return retval;
}
-static gint
-g_sheet_hetero_column_get_width
(const GSheetColumn *geom, gint
i)
+static gint
+g_sheet_hetero_column_get_width
(const GSheetColumn *geom, glong
i)
{
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
+ GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN (geom);
+
+ g_return_val_if_fail (i < hg->n_columns, -1);
- g_return_val_if_fail(i < hg->n_columns, -1);
-
return hg->col[i].width;
}
return hg->col[i].width;
}
-static g
int
-g_sheet_hetero_column_get_sensitivity
(const GSheetColumn *geom, gint
u)
+static g
boolean
+g_sheet_hetero_column_get_sensitivity
(const GSheetColumn *geom, glong
u)
{
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-
return TRUE;
}
return TRUE;
}
-static g
int
-g_sheet_hetero_column_get_visibility
(const GSheetColumn *geom, gint
u)
+static g
boolean
+g_sheet_hetero_column_get_visibility
(const GSheetColumn *geom, glong
u)
{
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-
return TRUE;
}
return TRUE;
}
-static
const
gchar *
-g_sheet_hetero_column_get_button_label
(const GSheetColumn *geom, gint
u)
+static gchar *
+g_sheet_hetero_column_get_button_label
(const GSheetColumn *geom, glong
u)
{
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-
- return
hg->col[u].button.label
;
+ GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN
(geom);
+
+ return
g_locale_to_utf8 (hg->col[u].button.label, -1, 0, 0, 0)
;
}
static GtkJustification
}
static GtkJustification
-g_sheet_hetero_column_get_justification
(const GSheetColumn *geom, gint
u)
+g_sheet_hetero_column_get_justification
(const GSheetColumn *geom, glong
u)
{
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
-
return GTK_JUSTIFY_FILL;
}
return GTK_JUSTIFY_FILL;
}
-static g
int
-g_sheet_hetero_column_get_column_count(const GSheetColumn *geom)
+static g
long
+g_sheet_hetero_column_get_column_count
(const GSheetColumn *geom)
{
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
+ GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN
(geom);
return hg->n_columns;
}
return hg->n_columns;
}
@@
-182,20
+177,31
@@
g_sheet_hetero_column_init (GSheetHeteroColumn *o)
{
}
{
}
-static void
+static void
g_sheet_hetero_column_finalize (GObject *object)
{
g_sheet_hetero_column_finalize (GObject *object)
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(object);
+ GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN
(object);
- g_free(hg->col);
+ g_free
(hg->col);
}
}
+static void
+hetero_column_set_width (GSheetColumn *geo, glong 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;
@@
-205,27
+211,28
@@
g_sheet_column_init (GSheetColumnIface *iface)
}
}
-void
-g_sheet_hetero_column_set_button_label(GSheetHeteroColumn *geo,
- g
int
i, const gchar *label)
+void
+g_sheet_hetero_column_set_button_label
(GSheetHeteroColumn *geo,
+ g
long
i, const gchar *label)
{
{
- g_return_if_fail(i < geo->n_columns);
+ g_return_if_fail (i < geo->n_columns);
+
+ g_free (geo->col[i].button.label);
+ geo->col[i].button.label = g_malloc (strlen (label) + 1);
- g_free(geo->col[i].button.label);
- geo->col[i].button.label = g_malloc(strlen(label) + 1);
-
- g_stpcpy(geo->col[i].button.label, label);
+ g_stpcpy (geo->col[i].button.label, label);
}
}
-void
-g_sheet_hetero_column_set_width(GSheetHeteroColumn *geo,
-
gint
i, gint size)
+
+void
+
g_sheet_hetero_column_set_width (GSheetHeteroColumn *geo, glong
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)
;
}
}
+