g_sheet_column_get_button(const GSheetColumn *column,
gint col, const GtkSheet *sheet)
{
- g_return_val_if_fail (G_IS_SHEET_COLUMN (column), FALSE);
-
+ static GtkSheetButton button ;
GSheetColumnIface *iface = G_SHEET_COLUMN_GET_IFACE (column);
- static GtkSheetButton button ;
+ g_return_val_if_fail (G_IS_SHEET_COLUMN (column), FALSE);
+
memcpy(&button, &default_button, sizeof (button));
if ( iface->get_button_label)
inline gint
g_sheet_column_start_pixel(const GSheetColumn *geo, gint col, const GtkSheet *sheet)
{
+ gint i;
+ gint start_pixel = 0;
+
g_return_val_if_fail (G_IS_SHEET_COLUMN (geo), -1);
g_return_val_if_fail (col <
g_sheet_column_get_column_count(geo, sheet),-1);
- gint i;
- gint start_pixel = 0;
-
for ( i = 0 ; i < col ; ++i )
{
if ( g_sheet_column_get_visibility(geo, i, sheet))
GObject *
g_sheet_hetero_column_new (gint default_width, gint n_columns)
{
+ gint i;
GSheetHeteroColumn *hg;
GObject *retval;
hg->default_width = default_width;
hg->col = g_new0(struct GSheetHeteroColumnUnit, n_columns);
- gint i;
for (i = 0 ; i < hg->n_columns; ++i )
{
hg->col[i].button = default_button;
g_sheet_row_get_button(const GSheetRow *row_geo,
gint row, const GtkSheet *sheet)
{
- g_return_val_if_fail (G_IS_SHEET_ROW (row_geo), FALSE);
+ static GtkSheetButton button ;
GSheetRowIface *iface = G_SHEET_ROW_GET_IFACE (row_geo);
- static GtkSheetButton button ;
+ g_return_val_if_fail (G_IS_SHEET_ROW (row_geo), FALSE);
+
memcpy(&button, &default_button, sizeof (button));
if ( iface->get_button_label)
gint
g_sheet_row_start_pixel(const GSheetRow *geo, gint row, const GtkSheet *sheet)
{
+ gint i;
+ gint start_pixel = 0;
+
g_return_val_if_fail (G_IS_SHEET_ROW (geo), -1);
g_return_val_if_fail (row >= 0, -1);
g_return_val_if_fail (row <
g_sheet_row_get_row_count(geo, sheet),-1);
- gint i;
- gint start_pixel = 0;
-
if ( G_SHEET_ROW_GET_IFACE(geo)->top_ypixel)
return (G_SHEET_ROW_GET_IFACE(geo)->top_ypixel)(geo, row, sheet);
static const gchar *
g_sheet_uniform_column_get_button_label(const GSheetColumn *geom, gint u)
{
- GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN(geom);
-
static gchar *label;
g_free(label);
* Retrieves the datum at location ROW, COLUMN in the form of a string.
* Returns: The string representation of the datum, or NULL on error.
**/
-inline const gchar *const
+inline const gchar *
g_sheet_model_get_string (const GSheetModel *sheet_model,
gint row, gint column)
{
/* Virtual Table */
- const gchar *const (* get_string) (const GSheetModel *sheet_model,
+ const gchar * (* get_string) (const GSheetModel *sheet_model,
gint row, gint column);
gboolean (* set_string) (GSheetModel *sheet_model,
GType g_sheet_model_get_type (void) G_GNUC_CONST;
-inline const gchar *const g_sheet_model_get_string (const GSheetModel *sheet_model,
+inline const gchar * g_sheet_model_get_string (const GSheetModel *sheet_model,
gint row, gint column);
inline gboolean g_sheet_model_set_string (GSheetModel *sheet_model,
GtkJustification justification,
const gchar *text)
{
- GtkSheetRange range;
- gint text_width;
- GtkSheetCellAttr attributes;
+ GSheetModel *model ;
+ gboolean changed ;
+ const gchar *old_text ;
- g_return_if_fail (sheet != NULL);
- g_return_if_fail (GTK_IS_SHEET (sheet));
- if (col >= xxx_column_count(sheet) || row >= yyy_row_count(sheet)) return;
- if (col < 0 || row < 0) return;
+ GtkSheetRange range;
+ gint text_width;
+ GtkSheetCellAttr attributes;
- gtk_sheet_get_attributes(sheet, row, col, &attributes);
+ g_return_if_fail (sheet != NULL);
+ g_return_if_fail (GTK_IS_SHEET (sheet));
+ if (col >= xxx_column_count(sheet) || row >= yyy_row_count(sheet)) return;
+ if (col < 0 || row < 0) return;
- attributes.justification = justification;
+ gtk_sheet_get_attributes(sheet, row, col, &attributes);
- GSheetModel *model = gtk_sheet_get_model(sheet);
+ attributes.justification = justification;
- const gchar *old_text = g_sheet_model_get_string(model, row, col);
+ model = gtk_sheet_get_model(sheet);
- gboolean changed = FALSE;
+ old_text = g_sheet_model_get_string(model, row, col);
- if (0 != safe_strcmp(old_text, text))
- changed = g_sheet_model_set_string(model, text, row, col);
+ changed = FALSE;
- if(changed && attributes.is_visible){
- const gchar *s = gtk_sheet_cell_get_text(sheet, row, col);
- text_width = 0;
- if(s && strlen(s) > 0) {
- text_width = STRING_WIDTH(GTK_WIDGET(sheet), attributes.font_desc, text);
- }
+ if (0 != safe_strcmp(old_text, text))
+ changed = g_sheet_model_set_string(model, text, row, col);
- range.row0 = row;
- range.rowi = row;
- range.col0 = sheet->view.col0;
- range.coli = sheet->view.coli;
+ if(changed && attributes.is_visible)
+ {
+ const gchar *s = gtk_sheet_cell_get_text(sheet, row, col);
+ text_width = 0;
+ if(s && strlen(s) > 0) {
+ text_width = STRING_WIDTH(GTK_WIDGET(sheet),
+ attributes.font_desc, text);
+ }
+
+ range.row0 = row;
+ range.rowi = row;
+ range.col0 = sheet->view.col0;
+ range.coli = sheet->view.coli;
- if(gtk_sheet_autoresize(sheet) &&
- text_width > xxx_column_width(sheet, col) - 2*CELLOFFSET-attributes.border.width){
+ if(gtk_sheet_autoresize(sheet) &&
+ text_width > xxx_column_width(sheet, col) - 2*CELLOFFSET-attributes.border.width){
gtk_sheet_set_column_width(sheet, col, text_width+2*CELLOFFSET+attributes.border.width);
GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_REDRAW_PENDING);
- }
- else
- if(!GTK_SHEET_IS_FROZEN(sheet))
- gtk_sheet_range_draw(sheet, &range);
- }
+ }
+ else
+ if(!GTK_SHEET_IS_FROZEN(sheet))
+ gtk_sheet_range_draw(sheet, &range);
+ }
- if ( changed )
- gtk_signal_emit(GTK_OBJECT(sheet),sheet_signals[CHANGED], row, col);
+ if ( changed )
+ gtk_signal_emit(GTK_OBJECT(sheet),sheet_signals[CHANGED], row, col);
}
static void
gtk_sheet_real_cell_clear (GtkSheet *sheet, gint row, gint column, gboolean delete)
{
- const gchar *old_text;
-
- old_text = gtk_sheet_cell_get_text(sheet, row, column);
-
GSheetModel *model = gtk_sheet_get_model(sheet);
+ const gchar *old_text = gtk_sheet_cell_get_text(sheet, row, column);
+
if (old_text && strlen(old_text) > 0 )
{
g_sheet_model_datum_clear(model, row, column);
{
GtkSheet *sheet;
gint diff, value, old_value;
- gint i;
gint row, new_row;
gint y=0;
y = g_sheet_row_start_pixel(sheet->row_geometry, new_row, sheet);
if (adjustment->value > sheet->old_vadjustment && sheet->old_vadjustment > 0. &&
- yyy_row_height(sheet, i) > sheet->vadjustment->step_increment){
+ yyy_row_height(sheet, row) > sheet->vadjustment->step_increment){
/* This avoids embarrassing twitching */
if(row == new_row && row != yyy_row_count(sheet) - 1 &&
adjustment->value - sheet->old_vadjustment >=
gboolean
gtk_sheet_get_attributes(GtkSheet *sheet, gint row, gint col, GtkSheetCellAttr *attributes)
{
+ const GdkColor *fg, *bg;
+ const GtkJustification *j ;
+ const PangoFontDescription *font_desc ;
+ const GtkSheetCellBorder *border ;
+
g_return_val_if_fail (sheet != NULL, FALSE);
g_return_val_if_fail (GTK_IS_SHEET (sheet), FALSE);
attributes->is_editable = g_sheet_model_is_editable(sheet->model, row, col);
attributes->is_visible = g_sheet_model_is_visible(sheet->model, row, col);
- const GdkColor *fg = g_sheet_model_get_foreground(sheet->model, row, col);
+ fg = g_sheet_model_get_foreground(sheet->model, row, col);
if ( fg )
attributes->foreground = *fg;
- const GdkColor *bg = g_sheet_model_get_background(sheet->model, row, col);
+ bg = g_sheet_model_get_background(sheet->model, row, col);
if ( bg )
attributes->background = *bg;
- const GtkJustification *j = g_sheet_model_get_justification(sheet->model,
- row, col);
+ j = g_sheet_model_get_justification(sheet->model, row, col);
if (j) attributes->justification = *j;
- const PangoFontDescription *font_desc =
- g_sheet_model_get_font_desc(sheet->model, row, col);
+ font_desc = g_sheet_model_get_font_desc(sheet->model, row, col);
if ( font_desc ) attributes->font_desc = font_desc;
- const GtkSheetCellBorder *border =
- g_sheet_model_get_cell_border(sheet->model, row, col);
+ border = g_sheet_model_get_cell_border(sheet->model, row, col);
- if ( border ) attributes->border = *border;
+ if ( border ) attributes->border = *border;
return TRUE;
}
GtkWidget *widget,
gint row, gint col)
{
- GtkSheetButton *button;
+ GtkSheetButton *button = 0;
GtkSheetChild *child;
GtkRequisition button_requisition;
msgstr ""
"Project-Id-Version: PSPP 0.3.1\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2006-04-04 09:56+0800\n"
+"POT-Creation-Date: 2006-04-04 20:32+0800\n"
"PO-Revision-Date: 2004-01-23 13:04+0800\n"
"Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
"Language-Team: John Darrington <john@darrington.wattle.id.au>\n"
msgid "Can't re-open %s as a %s for %s."
msgstr ""
-#: src/data/filename.c:249
+#: src/data/filename.c:253
#, c-format
msgid "Searching for `%s'..."
msgstr ""
-#: src/data/filename.c:257 src/data/filename.c:289
+#: src/data/filename.c:261 src/data/filename.c:293
msgid "Search unsuccessful!"
msgstr ""
-#: src/data/filename.c:282
+#: src/data/filename.c:286
#, c-format
msgid "Found `%s'."
msgstr ""
-#: src/data/filename.c:699
+#: src/data/filename.c:703
#, c-format
msgid "Not opening pipe file `%s' because SAFER option set."
msgstr ""
#: src/data/format.c:197 src/data/por-file-reader.c:481
#: src/data/sys-file-reader.c:994 src/data/sys-file-reader.c:1003
-#: src/ui/gui/psppire-var-store.c:430
+#: src/ui/gui/psppire-var-store.c:435
msgid "String"
msgstr ""
#: src/data/format.c:197 src/data/por-file-reader.c:481
#: src/data/sys-file-reader.c:994 src/data/sys-file-reader.c:1003
-#: src/ui/gui/psppire-var-store.c:423
+#: src/ui/gui/psppire-var-store.c:428
msgid "Numeric"
msgstr ""
msgid "number"
msgstr ""
-#: src/data/variable.c:151
+#: src/data/variable.c:152
#, c-format
msgid ""
"Character `%c' (in %s), may not appear as the first character in a variable "
"name."
msgstr ""
-#: src/data/variable.c:163
+#: src/data/variable.c:164
#, c-format
msgid "Character `%c' (in %s) may not appear in a variable name."
msgstr ""
-#: src/data/variable.c:192
+#: src/data/variable.c:193
msgid "Variable name cannot be empty string."
msgstr ""
-#: src/data/variable.c:198
+#: src/data/variable.c:199
#, c-format
msgid "Variable name %s exceeds %d-character limit."
msgstr ""
-#: src/data/variable.c:206
+#: src/data/variable.c:207
#, c-format
msgid "`%s' may not be used as a variable name because it is a reserved word."
msgstr ""
-#: src/data/variable.c:301
+#: src/data/variable.c:302
msgid "Variable suffix too large."
msgstr ""
-#: src/data/variable.c:342
+#: src/data/variable.c:343
msgid "ordinary"
msgstr ""
-#: src/data/variable.c:344
+#: src/data/variable.c:345
msgid "system"
msgstr ""
-#: src/data/variable.c:346
+#: src/data/variable.c:347
msgid "scratch"
msgstr ""
"commands."
msgstr ""
-#: src/language/data-io/data-list.c:143
+#: src/language/data-io/data-list.c:145
msgid "DATA LIST must use the same file as the enclosing FILE TYPE."
msgstr ""
-#: src/language/data-io/data-list.c:162
+#: src/language/data-io/data-list.c:164
msgid "The END subcommand may only be specified once."
msgstr ""
-#: src/language/data-io/data-list.c:197
+#: src/language/data-io/data-list.c:199
msgid "Only one of FIXED, FREE, or LIST may be specified."
msgstr ""
-#: src/language/data-io/data-list.c:347 src/language/data-io/print.c:297
+#: src/language/data-io/data-list.c:349 src/language/data-io/print.c:297
#, c-format
msgid ""
"The record number specified, %ld, is before the previous record, %d. Data "
"fields must be listed in order of increasing record number."
msgstr ""
-#: src/language/data-io/data-list.c:376 src/language/data-io/data-list.c:1725
+#: src/language/data-io/data-list.c:378 src/language/data-io/data-list.c:1727
msgid ""
"SPSS-like or FORTRAN-like format specification expected after variable names."
msgstr ""
-#: src/language/data-io/data-list.c:387
+#: src/language/data-io/data-list.c:389
msgid "At least one variable must be specified."
msgstr ""
-#: src/language/data-io/data-list.c:392 src/language/data-io/print.c:329
+#: src/language/data-io/data-list.c:394 src/language/data-io/print.c:329
msgid ""
"Variables are specified on records that should not exist according to "
"RECORDS subcommand."
msgstr ""
-#: src/language/data-io/data-list.c:425 src/language/data-io/data-list.c:439
+#: src/language/data-io/data-list.c:427 src/language/data-io/data-list.c:441
#: src/language/data-io/print.c:521 src/language/data-io/print.c:534
msgid "Column positions for fields must be positive."
msgstr ""
-#: src/language/data-io/data-list.c:444
+#: src/language/data-io/data-list.c:446
msgid "The ending column for a field must be greater than the starting column."
msgstr ""
-#: src/language/data-io/data-list.c:458
+#: src/language/data-io/data-list.c:460
#, c-format
msgid "The %d columns %d-%d can't be evenly divided into %d fields."
msgstr ""
-#: src/language/data-io/data-list.c:478 src/language/data-io/print.c:562
+#: src/language/data-io/data-list.c:480 src/language/data-io/print.c:562
msgid "A format specifier on this line has extra characters on the end."
msgstr ""
-#: src/language/data-io/data-list.c:493 src/language/data-io/print.c:578
+#: src/language/data-io/data-list.c:495 src/language/data-io/print.c:578
msgid "The value for number of decimal places must be at least 1."
msgstr ""
-#: src/language/data-io/data-list.c:507 src/language/data-io/print.c:591
+#: src/language/data-io/data-list.c:509 src/language/data-io/print.c:591
#, c-format
msgid "Input format %s doesn't accept decimal places."
msgstr ""
-#: src/language/data-io/data-list.c:554 src/language/data-io/data-list.c:650
-#: src/language/data-io/data-list.c:858
+#: src/language/data-io/data-list.c:556 src/language/data-io/data-list.c:652
+#: src/language/data-io/data-list.c:860
#, c-format
msgid "%s is a duplicate variable name."
msgstr ""
-#: src/language/data-io/data-list.c:559
+#: src/language/data-io/data-list.c:561
#, c-format
msgid "There is already a variable %s of a different type."
msgstr ""
-#: src/language/data-io/data-list.c:566
+#: src/language/data-io/data-list.c:568
#, c-format
msgid "There is already a string variable %s of a different width."
msgstr ""
-#: src/language/data-io/data-list.c:641
+#: src/language/data-io/data-list.c:643
msgid ""
"The number of format specifications exceeds the given number of variable "
"names."
msgstr ""
-#: src/language/data-io/data-list.c:754 src/language/data-io/print.c:767
+#: src/language/data-io/data-list.c:756 src/language/data-io/print.c:767
msgid ""
"There aren't enough format specifications to match the number of variable "
"names given."
msgstr ""
-#: src/language/data-io/data-list.c:781 src/language/data-io/data-list.c:899
+#: src/language/data-io/data-list.c:783 src/language/data-io/data-list.c:901
#: src/language/data-io/print.c:798
#: src/language/dictionary/sys-file-info.c:139
#: src/language/dictionary/sys-file-info.c:373
msgid "Variable"
msgstr ""
-#: src/language/data-io/data-list.c:782 src/language/data-io/print.c:799
+#: src/language/data-io/data-list.c:784 src/language/data-io/print.c:799
msgid "Record"
msgstr ""
-#: src/language/data-io/data-list.c:783 src/language/data-io/print.c:800
+#: src/language/data-io/data-list.c:785 src/language/data-io/print.c:800
#: src/ui/gui/var-sheet.c:74
msgid "Columns"
msgstr ""
-#: src/language/data-io/data-list.c:784 src/language/data-io/data-list.c:900
+#: src/language/data-io/data-list.c:786 src/language/data-io/data-list.c:902
#: src/language/data-io/print.c:801
msgid "Format"
msgstr ""
-#: src/language/data-io/data-list.c:799
+#: src/language/data-io/data-list.c:801
#, c-format
msgid "Reading %d record from %s."
msgid_plural "Reading %d records from %s."
msgstr[0] ""
msgstr[1] ""
-#: src/language/data-io/data-list.c:915
+#: src/language/data-io/data-list.c:917
#, c-format
msgid "Reading free-form data from %s."
msgstr ""
-#: src/language/data-io/data-list.c:966
+#: src/language/data-io/data-list.c:968
#, c-format
msgid "Quoted string missing terminating `%c'."
msgstr ""
-#: src/language/data-io/data-list.c:1081
+#: src/language/data-io/data-list.c:1083
#, c-format
msgid "Partial case of %d of %d records discarded."
msgstr ""
-#: src/language/data-io/data-list.c:1134
+#: src/language/data-io/data-list.c:1136
#, c-format
msgid "Partial case discarded. The first variable missing was %s."
msgstr ""
-#: src/language/data-io/data-list.c:1177
+#: src/language/data-io/data-list.c:1179
#, c-format
msgid ""
"Missing value(s) for all variables from %s onward. These will be filled "
"with the system-missing value or blanks, as appropriate."
msgstr ""
-#: src/language/data-io/data-list.c:1388
+#: src/language/data-io/data-list.c:1390
msgid ""
"REPEATING DATA must use the same file as its corresponding DATA LIST or FILE "
"TYPE."
msgstr ""
-#: src/language/data-io/data-list.c:1398 src/language/data-io/data-list.c:1432
-#: src/language/data-io/data-list.c:1445 src/language/data-io/data-list.c:1458
-#: src/language/data-io/data-list.c:1492
+#: src/language/data-io/data-list.c:1400 src/language/data-io/data-list.c:1434
+#: src/language/data-io/data-list.c:1447 src/language/data-io/data-list.c:1460
+#: src/language/data-io/data-list.c:1494
#, c-format
msgid "%s subcommand given multiple times."
msgstr ""
-#: src/language/data-io/data-list.c:1421
+#: src/language/data-io/data-list.c:1423
#, c-format
msgid "STARTS beginning column (%d) exceeds STARTS ending column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1478
+#: src/language/data-io/data-list.c:1480
#, c-format
msgid "CONTINUED beginning column (%d) exceeds CONTINUED ending column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1501
+#: src/language/data-io/data-list.c:1503
#, c-format
msgid "ID beginning column (%ld) must be positive."
msgstr ""
-#: src/language/data-io/data-list.c:1516
+#: src/language/data-io/data-list.c:1518
#, c-format
msgid "ID ending column (%ld) must be positive."
msgstr ""
-#: src/language/data-io/data-list.c:1522
+#: src/language/data-io/data-list.c:1524
#, c-format
msgid "ID ending column (%ld) cannot be less than ID beginning column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1562
+#: src/language/data-io/data-list.c:1564
msgid "Missing required specification STARTS."
msgstr ""
-#: src/language/data-io/data-list.c:1564
+#: src/language/data-io/data-list.c:1566
msgid "Missing required specification OCCURS."
msgstr ""
-#: src/language/data-io/data-list.c:1571
+#: src/language/data-io/data-list.c:1573
msgid "ID specified without CONTINUED."
msgstr ""
-#: src/language/data-io/data-list.c:1582
+#: src/language/data-io/data-list.c:1584
#, c-format
msgid ""
"STARTS beginning column (%d) exceeds default STARTS ending column taken from "
"file's record width (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1595
+#: src/language/data-io/data-list.c:1597
#, c-format
msgid ""
"CONTINUED beginning column (%d) exceeds default CONTINUED ending column "
"taken from file's record width (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1674
+#: src/language/data-io/data-list.c:1676
msgid "String variable not allowed here."
msgstr ""
-#: src/language/data-io/data-list.c:1684
+#: src/language/data-io/data-list.c:1686
#, c-format
msgid "%s (%d) must be at least 1."
msgstr ""
-#: src/language/data-io/data-list.c:1690
+#: src/language/data-io/data-list.c:1692
#, c-format
msgid "Variable or integer expected for %s."
msgstr ""
-#: src/language/data-io/data-list.c:1815
+#: src/language/data-io/data-list.c:1817
#, c-format
msgid "Encountered mismatched record ID \"%s\" expecting \"%s\"."
msgstr ""
-#: src/language/data-io/data-list.c:1847
+#: src/language/data-io/data-list.c:1849
#, c-format
msgid ""
"Variable %s starting in column %d extends beyond physical record length of %"
"d."
msgstr ""
-#: src/language/data-io/data-list.c:1914
+#: src/language/data-io/data-list.c:1916
#, c-format
msgid "Invalid value %d for OCCURS."
msgstr ""
-#: src/language/data-io/data-list.c:1920
+#: src/language/data-io/data-list.c:1922
#, c-format
msgid "Beginning column for STARTS (%d) must be at least 1."
msgstr ""
-#: src/language/data-io/data-list.c:1928
+#: src/language/data-io/data-list.c:1930
#, c-format
msgid "Ending column for STARTS (%d) is less than beginning column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1936
+#: src/language/data-io/data-list.c:1938
#, c-format
msgid "Invalid value %d for LENGTH."
msgstr ""
-#: src/language/data-io/data-list.c:1943
+#: src/language/data-io/data-list.c:1945
#, c-format
msgid "Beginning column for CONTINUED (%d) must be at least 1."
msgstr ""
-#: src/language/data-io/data-list.c:1951
+#: src/language/data-io/data-list.c:1953
#, c-format
msgid "Ending column for CONTINUED (%d) is less than beginning column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1983
+#: src/language/data-io/data-list.c:1985
#, c-format
msgid ""
"Number of repetitions specified on OCCURS (%d) exceed number of repetitions "
"available in space on STARTS (%d), and CONTINUED not specified."
msgstr ""
-#: src/language/data-io/data-list.c:2001
+#: src/language/data-io/data-list.c:2003
#, c-format
msgid "Unexpected end of file with %d repetitions remaining out of %d."
msgstr ""
#: src/language/stats/crosstabs.q:817 src/language/stats/crosstabs.q:1020
#: src/language/stats/crosstabs.q:1740 src/language/stats/examine.q:859
-#: src/language/stats/frequencies.q:1221 src/language/stats/oneway.q:312
-#: src/language/stats/oneway.q:475 src/language/stats/regression.q:294
+#: src/language/stats/frequencies.q:1221 src/language/stats/oneway.q:314
+#: src/language/stats/oneway.q:478 src/language/stats/regression.q:294
msgid "Total"
msgstr ""
#: src/language/stats/crosstabs.q:827 src/language/stats/examine.q:935
-#: src/language/stats/frequencies.q:1516 src/language/stats/oneway.q:398
+#: src/language/stats/frequencies.q:1516 src/language/stats/oneway.q:400
#: src/language/stats/t-test.q:682 src/language/stats/t-test.q:705
#: src/language/stats/t-test.q:830 src/language/stats/t-test.q:1365
msgid "N"
msgid "Statistic"
msgstr ""
-#: src/language/stats/crosstabs.q:1112 src/language/stats/oneway.q:285
-#: src/language/stats/oneway.q:687 src/language/stats/regression.q:287
+#: src/language/stats/crosstabs.q:1112 src/language/stats/oneway.q:287
+#: src/language/stats/oneway.q:690 src/language/stats/regression.q:287
#: src/language/stats/t-test.q:980 src/language/stats/t-test.q:1172
#: src/language/stats/t-test.q:1264
msgid "df"
msgstr ""
#: src/language/stats/descriptives.c:103 src/language/stats/examine.q:1474
-#: src/language/stats/frequencies.q:120 src/language/stats/oneway.q:399
+#: src/language/stats/frequencies.q:120 src/language/stats/oneway.q:401
#: src/language/stats/t-test.q:683 src/language/stats/t-test.q:706
#: src/language/stats/t-test.q:829 src/language/stats/t-test.q:1166
msgid "Mean"
msgstr ""
#: src/language/stats/descriptives.c:112 src/language/stats/examine.q:1579
-#: src/language/stats/frequencies.q:131 src/language/stats/oneway.q:411
+#: src/language/stats/frequencies.q:131 src/language/stats/oneway.q:413
msgid "Minimum"
msgstr ""
#: src/language/stats/descriptives.c:113 src/language/stats/examine.q:1590
-#: src/language/stats/frequencies.q:132 src/language/stats/oneway.q:412
+#: src/language/stats/frequencies.q:132 src/language/stats/oneway.q:414
msgid "Maximum"
msgstr ""
msgid "Lowest"
msgstr ""
-#: src/language/stats/examine.q:1370 src/language/stats/oneway.q:401
-#: src/language/stats/oneway.q:685 src/language/stats/regression.q:191
+#: src/language/stats/examine.q:1370 src/language/stats/oneway.q:403
+#: src/language/stats/oneway.q:688 src/language/stats/regression.q:191
msgid "Std. Error"
msgstr ""
-#: src/language/stats/examine.q:1372 src/language/stats/oneway.q:415
+#: src/language/stats/examine.q:1372 src/language/stats/oneway.q:417
msgid "Descriptives"
msgstr ""
-#: src/language/stats/examine.q:1492 src/language/stats/oneway.q:406
+#: src/language/stats/examine.q:1492 src/language/stats/oneway.q:408
#, c-format
msgid "%g%% Confidence Interval for Mean"
msgstr ""
-#: src/language/stats/examine.q:1498 src/language/stats/oneway.q:408
+#: src/language/stats/examine.q:1498 src/language/stats/oneway.q:410
msgid "Lower Bound"
msgstr ""
-#: src/language/stats/examine.q:1509 src/language/stats/oneway.q:409
+#: src/language/stats/examine.q:1509 src/language/stats/oneway.q:411
msgid "Upper Bound"
msgstr ""
msgid "Median"
msgstr ""
-#: src/language/stats/examine.q:1566 src/language/stats/oneway.q:400
+#: src/language/stats/examine.q:1566 src/language/stats/oneway.q:402
#: src/language/stats/t-test.q:684 src/language/stats/t-test.q:707
#: src/language/stats/t-test.q:831 src/language/stats/t-test.q:1167
msgid "Std. Deviation"
msgid "TABLES subcommand may not appear more than once."
msgstr ""
-#: src/language/stats/oneway.q:175
+#: src/language/stats/oneway.q:177
msgid "Number of contrast coefficients must equal the number of groups"
msgstr ""
-#: src/language/stats/oneway.q:184
+#: src/language/stats/oneway.q:186
#, c-format
msgid "Coefficients for contrast %d do not total zero"
msgstr ""
-#: src/language/stats/oneway.q:249
+#: src/language/stats/oneway.q:251
#, c-format
msgid "`%s' is not a variable name"
msgstr ""
-#: src/language/stats/oneway.q:284 src/language/stats/regression.q:286
+#: src/language/stats/oneway.q:286 src/language/stats/regression.q:286
msgid "Sum of Squares"
msgstr ""
-#: src/language/stats/oneway.q:286 src/language/stats/regression.q:288
+#: src/language/stats/oneway.q:288 src/language/stats/regression.q:288
msgid "Mean Square"
msgstr ""
-#: src/language/stats/oneway.q:287 src/language/stats/regression.q:289
+#: src/language/stats/oneway.q:289 src/language/stats/regression.q:289
#: src/language/stats/t-test.q:977
msgid "F"
msgstr ""
-#: src/language/stats/oneway.q:288 src/language/stats/oneway.q:541
+#: src/language/stats/oneway.q:290 src/language/stats/oneway.q:544
#: src/language/stats/regression.q:194 src/language/stats/regression.q:290
msgid "Significance"
msgstr ""
-#: src/language/stats/oneway.q:310
+#: src/language/stats/oneway.q:312
msgid "Between Groups"
msgstr ""
-#: src/language/stats/oneway.q:311
+#: src/language/stats/oneway.q:313
msgid "Within Groups"
msgstr ""
-#: src/language/stats/oneway.q:358 src/language/stats/regression.q:316
+#: src/language/stats/oneway.q:360 src/language/stats/regression.q:316
msgid "ANOVA"
msgstr ""
-#: src/language/stats/oneway.q:538
+#: src/language/stats/oneway.q:541
msgid "Levene Statistic"
msgstr ""
-#: src/language/stats/oneway.q:539
+#: src/language/stats/oneway.q:542
msgid "df1"
msgstr ""
-#: src/language/stats/oneway.q:540
+#: src/language/stats/oneway.q:543
msgid "df2"
msgstr ""
-#: src/language/stats/oneway.q:544
+#: src/language/stats/oneway.q:547
msgid "Test of Homogeneity of Variances"
msgstr ""
-#: src/language/stats/oneway.q:614
+#: src/language/stats/oneway.q:617
msgid "Contrast Coefficients"
msgstr ""
-#: src/language/stats/oneway.q:616 src/language/stats/oneway.q:683
+#: src/language/stats/oneway.q:619 src/language/stats/oneway.q:686
msgid "Contrast"
msgstr ""
-#: src/language/stats/oneway.q:681
+#: src/language/stats/oneway.q:684
msgid "Contrast Tests"
msgstr ""
-#: src/language/stats/oneway.q:684
+#: src/language/stats/oneway.q:687
msgid "Value of Contrast"
msgstr ""
-#: src/language/stats/oneway.q:686 src/language/stats/regression.q:193
+#: src/language/stats/oneway.q:689 src/language/stats/regression.q:193
#: src/language/stats/t-test.q:979 src/language/stats/t-test.q:1171
#: src/language/stats/t-test.q:1263
msgid "t"
msgstr ""
-#: src/language/stats/oneway.q:688 src/language/stats/t-test.q:981
+#: src/language/stats/oneway.q:691 src/language/stats/t-test.q:981
#: src/language/stats/t-test.q:1173 src/language/stats/t-test.q:1265
msgid "Sig. (2-tailed)"
msgstr ""
-#: src/language/stats/oneway.q:732
+#: src/language/stats/oneway.q:735
msgid "Assume equal variances"
msgstr ""
-#: src/language/stats/oneway.q:736
+#: src/language/stats/oneway.q:739
msgid "Does not assume equal"
msgstr ""
-#: src/language/stats/rank.q:242
+#: src/language/stats/rank.q:244
#, c-format
msgid "Variable %s already exists."
msgstr ""
-#: src/language/stats/rank.q:247
+#: src/language/stats/rank.q:249
msgid "Too many variables in INTO clause."
msgstr ""
msgid "%s & %s"
msgstr ""
-#: src/language/tests/moments-test.c:46
+#: src/language/tests/moments-test.c:49
msgid "expecting weight value"
msgstr ""
msgid "PSPP Data Editor"
msgstr ""
-#: src/ui/gui/menu-actions.c:105
+#: src/ui/gui/menu-actions.c:108
msgid "Open"
msgstr ""
-#: src/ui/gui/menu-actions.c:114
+#: src/ui/gui/menu-actions.c:116
msgid "System Files (*.sav)"
msgstr ""
-#: src/ui/gui/menu-actions.c:120
+#: src/ui/gui/menu-actions.c:122
msgid "Portable Files (*.por) "
msgstr ""
-#: src/ui/gui/menu-actions.c:126
+#: src/ui/gui/menu-actions.c:128
msgid "All Files"
msgstr ""
-#: src/ui/gui/menu-actions.c:223
+#: src/ui/gui/menu-actions.c:232
msgid "Save Data As"
msgstr ""
-#: src/ui/gui/menu-actions.c:459
+#: src/ui/gui/menu-actions.c:474
msgid "Font Selection"
msgstr ""
-#: src/ui/gui/message-dialog.c:75
+#: src/ui/gui/message-dialog.c:78
msgid "Script Error"
msgstr ""
-#: src/ui/gui/message-dialog.c:80
+#: src/ui/gui/message-dialog.c:83
msgid "Installation Error"
msgstr ""
-#: src/ui/gui/message-dialog.c:85
+#: src/ui/gui/message-dialog.c:88
msgid "Data File Error"
msgstr ""
-#: src/ui/gui/message-dialog.c:92
+#: src/ui/gui/message-dialog.c:95
msgid "PSPP Error"
msgstr ""
-#: src/ui/gui/message-dialog.c:153
+#: src/ui/gui/message-dialog.c:155
msgid "Terminating NOW due to fatal error"
msgstr ""
-#: src/ui/gui/missing-val-dialog.c:112 src/ui/gui/missing-val-dialog.c:157
+#: src/ui/gui/missing-val-dialog.c:113 src/ui/gui/missing-val-dialog.c:158
msgid "Incorrect value for variable type"
msgstr ""
-#: src/ui/gui/missing-val-dialog.c:132 src/ui/gui/missing-val-dialog.c:139
+#: src/ui/gui/missing-val-dialog.c:134 src/ui/gui/missing-val-dialog.c:141
msgid "Incorrect range specification"
msgstr ""
-#: src/ui/gui/psppire-data-store.c:638
+#: src/ui/gui/psppire-data-store.c:653
msgid "var"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:419
+#: src/ui/gui/psppire-var-store.c:424
msgid "None"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:424
+#: src/ui/gui/psppire-var-store.c:429
msgid "Comma"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:425
+#: src/ui/gui/psppire-var-store.c:430
msgid "Dot"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:426
+#: src/ui/gui/psppire-var-store.c:431
msgid "Scientific"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:427
+#: src/ui/gui/psppire-var-store.c:432
msgid "Date"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:428
+#: src/ui/gui/psppire-var-store.c:433
msgid "Dollar"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:429
+#: src/ui/gui/psppire-var-store.c:434
msgid "Custom"
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2006-04-04 09:56+0800\n"
+"POT-Creation-Date: 2006-04-04 20:32+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Can't re-open %s as a %s for %s."
msgstr ""
-#: src/data/filename.c:249
+#: src/data/filename.c:253
#, c-format
msgid "Searching for `%s'..."
msgstr ""
-#: src/data/filename.c:257 src/data/filename.c:289
+#: src/data/filename.c:261 src/data/filename.c:293
msgid "Search unsuccessful!"
msgstr ""
-#: src/data/filename.c:282
+#: src/data/filename.c:286
#, c-format
msgid "Found `%s'."
msgstr ""
-#: src/data/filename.c:699
+#: src/data/filename.c:703
#, c-format
msgid "Not opening pipe file `%s' because SAFER option set."
msgstr ""
#: src/data/format.c:197 src/data/por-file-reader.c:481
#: src/data/sys-file-reader.c:994 src/data/sys-file-reader.c:1003
-#: src/ui/gui/psppire-var-store.c:430
+#: src/ui/gui/psppire-var-store.c:435
msgid "String"
msgstr ""
#: src/data/format.c:197 src/data/por-file-reader.c:481
#: src/data/sys-file-reader.c:994 src/data/sys-file-reader.c:1003
-#: src/ui/gui/psppire-var-store.c:423
+#: src/ui/gui/psppire-var-store.c:428
msgid "Numeric"
msgstr ""
msgid "number"
msgstr ""
-#: src/data/variable.c:151
+#: src/data/variable.c:152
#, c-format
msgid ""
"Character `%c' (in %s), may not appear as the first character in a variable "
"name."
msgstr ""
-#: src/data/variable.c:163
+#: src/data/variable.c:164
#, c-format
msgid "Character `%c' (in %s) may not appear in a variable name."
msgstr ""
-#: src/data/variable.c:192
+#: src/data/variable.c:193
msgid "Variable name cannot be empty string."
msgstr ""
-#: src/data/variable.c:198
+#: src/data/variable.c:199
#, c-format
msgid "Variable name %s exceeds %d-character limit."
msgstr ""
-#: src/data/variable.c:206
+#: src/data/variable.c:207
#, c-format
msgid "`%s' may not be used as a variable name because it is a reserved word."
msgstr ""
-#: src/data/variable.c:301
+#: src/data/variable.c:302
msgid "Variable suffix too large."
msgstr ""
-#: src/data/variable.c:342
+#: src/data/variable.c:343
msgid "ordinary"
msgstr ""
-#: src/data/variable.c:344
+#: src/data/variable.c:345
msgid "system"
msgstr ""
-#: src/data/variable.c:346
+#: src/data/variable.c:347
msgid "scratch"
msgstr ""
"commands."
msgstr ""
-#: src/language/data-io/data-list.c:143
+#: src/language/data-io/data-list.c:145
msgid "DATA LIST must use the same file as the enclosing FILE TYPE."
msgstr ""
-#: src/language/data-io/data-list.c:162
+#: src/language/data-io/data-list.c:164
msgid "The END subcommand may only be specified once."
msgstr ""
-#: src/language/data-io/data-list.c:197
+#: src/language/data-io/data-list.c:199
msgid "Only one of FIXED, FREE, or LIST may be specified."
msgstr ""
-#: src/language/data-io/data-list.c:347 src/language/data-io/print.c:297
+#: src/language/data-io/data-list.c:349 src/language/data-io/print.c:297
#, c-format
msgid ""
"The record number specified, %ld, is before the previous record, %d. Data "
"fields must be listed in order of increasing record number."
msgstr ""
-#: src/language/data-io/data-list.c:376 src/language/data-io/data-list.c:1725
+#: src/language/data-io/data-list.c:378 src/language/data-io/data-list.c:1727
msgid ""
"SPSS-like or FORTRAN-like format specification expected after variable names."
msgstr ""
-#: src/language/data-io/data-list.c:387
+#: src/language/data-io/data-list.c:389
msgid "At least one variable must be specified."
msgstr ""
-#: src/language/data-io/data-list.c:392 src/language/data-io/print.c:329
+#: src/language/data-io/data-list.c:394 src/language/data-io/print.c:329
msgid ""
"Variables are specified on records that should not exist according to "
"RECORDS subcommand."
msgstr ""
-#: src/language/data-io/data-list.c:425 src/language/data-io/data-list.c:439
+#: src/language/data-io/data-list.c:427 src/language/data-io/data-list.c:441
#: src/language/data-io/print.c:521 src/language/data-io/print.c:534
msgid "Column positions for fields must be positive."
msgstr ""
-#: src/language/data-io/data-list.c:444
+#: src/language/data-io/data-list.c:446
msgid "The ending column for a field must be greater than the starting column."
msgstr ""
-#: src/language/data-io/data-list.c:458
+#: src/language/data-io/data-list.c:460
#, c-format
msgid "The %d columns %d-%d can't be evenly divided into %d fields."
msgstr ""
-#: src/language/data-io/data-list.c:478 src/language/data-io/print.c:562
+#: src/language/data-io/data-list.c:480 src/language/data-io/print.c:562
msgid "A format specifier on this line has extra characters on the end."
msgstr ""
-#: src/language/data-io/data-list.c:493 src/language/data-io/print.c:578
+#: src/language/data-io/data-list.c:495 src/language/data-io/print.c:578
msgid "The value for number of decimal places must be at least 1."
msgstr ""
-#: src/language/data-io/data-list.c:507 src/language/data-io/print.c:591
+#: src/language/data-io/data-list.c:509 src/language/data-io/print.c:591
#, c-format
msgid "Input format %s doesn't accept decimal places."
msgstr ""
-#: src/language/data-io/data-list.c:554 src/language/data-io/data-list.c:650
-#: src/language/data-io/data-list.c:858
+#: src/language/data-io/data-list.c:556 src/language/data-io/data-list.c:652
+#: src/language/data-io/data-list.c:860
#, c-format
msgid "%s is a duplicate variable name."
msgstr ""
-#: src/language/data-io/data-list.c:559
+#: src/language/data-io/data-list.c:561
#, c-format
msgid "There is already a variable %s of a different type."
msgstr ""
-#: src/language/data-io/data-list.c:566
+#: src/language/data-io/data-list.c:568
#, c-format
msgid "There is already a string variable %s of a different width."
msgstr ""
-#: src/language/data-io/data-list.c:641
+#: src/language/data-io/data-list.c:643
msgid ""
"The number of format specifications exceeds the given number of variable "
"names."
msgstr ""
-#: src/language/data-io/data-list.c:754 src/language/data-io/print.c:767
+#: src/language/data-io/data-list.c:756 src/language/data-io/print.c:767
msgid ""
"There aren't enough format specifications to match the number of variable "
"names given."
msgstr ""
-#: src/language/data-io/data-list.c:781 src/language/data-io/data-list.c:899
+#: src/language/data-io/data-list.c:783 src/language/data-io/data-list.c:901
#: src/language/data-io/print.c:798
#: src/language/dictionary/sys-file-info.c:139
#: src/language/dictionary/sys-file-info.c:373
msgid "Variable"
msgstr ""
-#: src/language/data-io/data-list.c:782 src/language/data-io/print.c:799
+#: src/language/data-io/data-list.c:784 src/language/data-io/print.c:799
msgid "Record"
msgstr ""
-#: src/language/data-io/data-list.c:783 src/language/data-io/print.c:800
+#: src/language/data-io/data-list.c:785 src/language/data-io/print.c:800
#: src/ui/gui/var-sheet.c:74
msgid "Columns"
msgstr ""
-#: src/language/data-io/data-list.c:784 src/language/data-io/data-list.c:900
+#: src/language/data-io/data-list.c:786 src/language/data-io/data-list.c:902
#: src/language/data-io/print.c:801
msgid "Format"
msgstr ""
-#: src/language/data-io/data-list.c:799
+#: src/language/data-io/data-list.c:801
#, c-format
msgid "Reading %d record from %s."
msgid_plural "Reading %d records from %s."
msgstr[0] ""
msgstr[1] ""
-#: src/language/data-io/data-list.c:915
+#: src/language/data-io/data-list.c:917
#, c-format
msgid "Reading free-form data from %s."
msgstr ""
-#: src/language/data-io/data-list.c:966
+#: src/language/data-io/data-list.c:968
#, c-format
msgid "Quoted string missing terminating `%c'."
msgstr ""
-#: src/language/data-io/data-list.c:1081
+#: src/language/data-io/data-list.c:1083
#, c-format
msgid "Partial case of %d of %d records discarded."
msgstr ""
-#: src/language/data-io/data-list.c:1134
+#: src/language/data-io/data-list.c:1136
#, c-format
msgid "Partial case discarded. The first variable missing was %s."
msgstr ""
-#: src/language/data-io/data-list.c:1177
+#: src/language/data-io/data-list.c:1179
#, c-format
msgid ""
"Missing value(s) for all variables from %s onward. These will be filled "
"with the system-missing value or blanks, as appropriate."
msgstr ""
-#: src/language/data-io/data-list.c:1388
+#: src/language/data-io/data-list.c:1390
msgid ""
"REPEATING DATA must use the same file as its corresponding DATA LIST or FILE "
"TYPE."
msgstr ""
-#: src/language/data-io/data-list.c:1398 src/language/data-io/data-list.c:1432
-#: src/language/data-io/data-list.c:1445 src/language/data-io/data-list.c:1458
-#: src/language/data-io/data-list.c:1492
+#: src/language/data-io/data-list.c:1400 src/language/data-io/data-list.c:1434
+#: src/language/data-io/data-list.c:1447 src/language/data-io/data-list.c:1460
+#: src/language/data-io/data-list.c:1494
#, c-format
msgid "%s subcommand given multiple times."
msgstr ""
-#: src/language/data-io/data-list.c:1421
+#: src/language/data-io/data-list.c:1423
#, c-format
msgid "STARTS beginning column (%d) exceeds STARTS ending column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1478
+#: src/language/data-io/data-list.c:1480
#, c-format
msgid "CONTINUED beginning column (%d) exceeds CONTINUED ending column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1501
+#: src/language/data-io/data-list.c:1503
#, c-format
msgid "ID beginning column (%ld) must be positive."
msgstr ""
-#: src/language/data-io/data-list.c:1516
+#: src/language/data-io/data-list.c:1518
#, c-format
msgid "ID ending column (%ld) must be positive."
msgstr ""
-#: src/language/data-io/data-list.c:1522
+#: src/language/data-io/data-list.c:1524
#, c-format
msgid "ID ending column (%ld) cannot be less than ID beginning column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1562
+#: src/language/data-io/data-list.c:1564
msgid "Missing required specification STARTS."
msgstr ""
-#: src/language/data-io/data-list.c:1564
+#: src/language/data-io/data-list.c:1566
msgid "Missing required specification OCCURS."
msgstr ""
-#: src/language/data-io/data-list.c:1571
+#: src/language/data-io/data-list.c:1573
msgid "ID specified without CONTINUED."
msgstr ""
-#: src/language/data-io/data-list.c:1582
+#: src/language/data-io/data-list.c:1584
#, c-format
msgid ""
"STARTS beginning column (%d) exceeds default STARTS ending column taken from "
"file's record width (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1595
+#: src/language/data-io/data-list.c:1597
#, c-format
msgid ""
"CONTINUED beginning column (%d) exceeds default CONTINUED ending column "
"taken from file's record width (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1674
+#: src/language/data-io/data-list.c:1676
msgid "String variable not allowed here."
msgstr ""
-#: src/language/data-io/data-list.c:1684
+#: src/language/data-io/data-list.c:1686
#, c-format
msgid "%s (%d) must be at least 1."
msgstr ""
-#: src/language/data-io/data-list.c:1690
+#: src/language/data-io/data-list.c:1692
#, c-format
msgid "Variable or integer expected for %s."
msgstr ""
-#: src/language/data-io/data-list.c:1815
+#: src/language/data-io/data-list.c:1817
#, c-format
msgid "Encountered mismatched record ID \"%s\" expecting \"%s\"."
msgstr ""
-#: src/language/data-io/data-list.c:1847
+#: src/language/data-io/data-list.c:1849
#, c-format
msgid ""
"Variable %s starting in column %d extends beyond physical record length of %"
"d."
msgstr ""
-#: src/language/data-io/data-list.c:1914
+#: src/language/data-io/data-list.c:1916
#, c-format
msgid "Invalid value %d for OCCURS."
msgstr ""
-#: src/language/data-io/data-list.c:1920
+#: src/language/data-io/data-list.c:1922
#, c-format
msgid "Beginning column for STARTS (%d) must be at least 1."
msgstr ""
-#: src/language/data-io/data-list.c:1928
+#: src/language/data-io/data-list.c:1930
#, c-format
msgid "Ending column for STARTS (%d) is less than beginning column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1936
+#: src/language/data-io/data-list.c:1938
#, c-format
msgid "Invalid value %d for LENGTH."
msgstr ""
-#: src/language/data-io/data-list.c:1943
+#: src/language/data-io/data-list.c:1945
#, c-format
msgid "Beginning column for CONTINUED (%d) must be at least 1."
msgstr ""
-#: src/language/data-io/data-list.c:1951
+#: src/language/data-io/data-list.c:1953
#, c-format
msgid "Ending column for CONTINUED (%d) is less than beginning column (%d)."
msgstr ""
-#: src/language/data-io/data-list.c:1983
+#: src/language/data-io/data-list.c:1985
#, c-format
msgid ""
"Number of repetitions specified on OCCURS (%d) exceed number of repetitions "
"available in space on STARTS (%d), and CONTINUED not specified."
msgstr ""
-#: src/language/data-io/data-list.c:2001
+#: src/language/data-io/data-list.c:2003
#, c-format
msgid "Unexpected end of file with %d repetitions remaining out of %d."
msgstr ""
#: src/language/stats/crosstabs.q:817 src/language/stats/crosstabs.q:1020
#: src/language/stats/crosstabs.q:1740 src/language/stats/examine.q:859
-#: src/language/stats/frequencies.q:1221 src/language/stats/oneway.q:312
-#: src/language/stats/oneway.q:475 src/language/stats/regression.q:294
+#: src/language/stats/frequencies.q:1221 src/language/stats/oneway.q:314
+#: src/language/stats/oneway.q:478 src/language/stats/regression.q:294
msgid "Total"
msgstr ""
#: src/language/stats/crosstabs.q:827 src/language/stats/examine.q:935
-#: src/language/stats/frequencies.q:1516 src/language/stats/oneway.q:398
+#: src/language/stats/frequencies.q:1516 src/language/stats/oneway.q:400
#: src/language/stats/t-test.q:682 src/language/stats/t-test.q:705
#: src/language/stats/t-test.q:830 src/language/stats/t-test.q:1365
msgid "N"
msgid "Statistic"
msgstr ""
-#: src/language/stats/crosstabs.q:1112 src/language/stats/oneway.q:285
-#: src/language/stats/oneway.q:687 src/language/stats/regression.q:287
+#: src/language/stats/crosstabs.q:1112 src/language/stats/oneway.q:287
+#: src/language/stats/oneway.q:690 src/language/stats/regression.q:287
#: src/language/stats/t-test.q:980 src/language/stats/t-test.q:1172
#: src/language/stats/t-test.q:1264
msgid "df"
msgstr ""
#: src/language/stats/descriptives.c:103 src/language/stats/examine.q:1474
-#: src/language/stats/frequencies.q:120 src/language/stats/oneway.q:399
+#: src/language/stats/frequencies.q:120 src/language/stats/oneway.q:401
#: src/language/stats/t-test.q:683 src/language/stats/t-test.q:706
#: src/language/stats/t-test.q:829 src/language/stats/t-test.q:1166
msgid "Mean"
msgstr ""
#: src/language/stats/descriptives.c:112 src/language/stats/examine.q:1579
-#: src/language/stats/frequencies.q:131 src/language/stats/oneway.q:411
+#: src/language/stats/frequencies.q:131 src/language/stats/oneway.q:413
msgid "Minimum"
msgstr ""
#: src/language/stats/descriptives.c:113 src/language/stats/examine.q:1590
-#: src/language/stats/frequencies.q:132 src/language/stats/oneway.q:412
+#: src/language/stats/frequencies.q:132 src/language/stats/oneway.q:414
msgid "Maximum"
msgstr ""
msgid "Lowest"
msgstr ""
-#: src/language/stats/examine.q:1370 src/language/stats/oneway.q:401
-#: src/language/stats/oneway.q:685 src/language/stats/regression.q:191
+#: src/language/stats/examine.q:1370 src/language/stats/oneway.q:403
+#: src/language/stats/oneway.q:688 src/language/stats/regression.q:191
msgid "Std. Error"
msgstr ""
-#: src/language/stats/examine.q:1372 src/language/stats/oneway.q:415
+#: src/language/stats/examine.q:1372 src/language/stats/oneway.q:417
msgid "Descriptives"
msgstr ""
-#: src/language/stats/examine.q:1492 src/language/stats/oneway.q:406
+#: src/language/stats/examine.q:1492 src/language/stats/oneway.q:408
#, c-format
msgid "%g%% Confidence Interval for Mean"
msgstr ""
-#: src/language/stats/examine.q:1498 src/language/stats/oneway.q:408
+#: src/language/stats/examine.q:1498 src/language/stats/oneway.q:410
msgid "Lower Bound"
msgstr ""
-#: src/language/stats/examine.q:1509 src/language/stats/oneway.q:409
+#: src/language/stats/examine.q:1509 src/language/stats/oneway.q:411
msgid "Upper Bound"
msgstr ""
msgid "Median"
msgstr ""
-#: src/language/stats/examine.q:1566 src/language/stats/oneway.q:400
+#: src/language/stats/examine.q:1566 src/language/stats/oneway.q:402
#: src/language/stats/t-test.q:684 src/language/stats/t-test.q:707
#: src/language/stats/t-test.q:831 src/language/stats/t-test.q:1167
msgid "Std. Deviation"
msgid "TABLES subcommand may not appear more than once."
msgstr ""
-#: src/language/stats/oneway.q:175
+#: src/language/stats/oneway.q:177
msgid "Number of contrast coefficients must equal the number of groups"
msgstr ""
-#: src/language/stats/oneway.q:184
+#: src/language/stats/oneway.q:186
#, c-format
msgid "Coefficients for contrast %d do not total zero"
msgstr ""
-#: src/language/stats/oneway.q:249
+#: src/language/stats/oneway.q:251
#, c-format
msgid "`%s' is not a variable name"
msgstr ""
-#: src/language/stats/oneway.q:284 src/language/stats/regression.q:286
+#: src/language/stats/oneway.q:286 src/language/stats/regression.q:286
msgid "Sum of Squares"
msgstr ""
-#: src/language/stats/oneway.q:286 src/language/stats/regression.q:288
+#: src/language/stats/oneway.q:288 src/language/stats/regression.q:288
msgid "Mean Square"
msgstr ""
-#: src/language/stats/oneway.q:287 src/language/stats/regression.q:289
+#: src/language/stats/oneway.q:289 src/language/stats/regression.q:289
#: src/language/stats/t-test.q:977
msgid "F"
msgstr ""
-#: src/language/stats/oneway.q:288 src/language/stats/oneway.q:541
+#: src/language/stats/oneway.q:290 src/language/stats/oneway.q:544
#: src/language/stats/regression.q:194 src/language/stats/regression.q:290
msgid "Significance"
msgstr ""
-#: src/language/stats/oneway.q:310
+#: src/language/stats/oneway.q:312
msgid "Between Groups"
msgstr ""
-#: src/language/stats/oneway.q:311
+#: src/language/stats/oneway.q:313
msgid "Within Groups"
msgstr ""
-#: src/language/stats/oneway.q:358 src/language/stats/regression.q:316
+#: src/language/stats/oneway.q:360 src/language/stats/regression.q:316
msgid "ANOVA"
msgstr ""
-#: src/language/stats/oneway.q:538
+#: src/language/stats/oneway.q:541
msgid "Levene Statistic"
msgstr ""
-#: src/language/stats/oneway.q:539
+#: src/language/stats/oneway.q:542
msgid "df1"
msgstr ""
-#: src/language/stats/oneway.q:540
+#: src/language/stats/oneway.q:543
msgid "df2"
msgstr ""
-#: src/language/stats/oneway.q:544
+#: src/language/stats/oneway.q:547
msgid "Test of Homogeneity of Variances"
msgstr ""
-#: src/language/stats/oneway.q:614
+#: src/language/stats/oneway.q:617
msgid "Contrast Coefficients"
msgstr ""
-#: src/language/stats/oneway.q:616 src/language/stats/oneway.q:683
+#: src/language/stats/oneway.q:619 src/language/stats/oneway.q:686
msgid "Contrast"
msgstr ""
-#: src/language/stats/oneway.q:681
+#: src/language/stats/oneway.q:684
msgid "Contrast Tests"
msgstr ""
-#: src/language/stats/oneway.q:684
+#: src/language/stats/oneway.q:687
msgid "Value of Contrast"
msgstr ""
-#: src/language/stats/oneway.q:686 src/language/stats/regression.q:193
+#: src/language/stats/oneway.q:689 src/language/stats/regression.q:193
#: src/language/stats/t-test.q:979 src/language/stats/t-test.q:1171
#: src/language/stats/t-test.q:1263
msgid "t"
msgstr ""
-#: src/language/stats/oneway.q:688 src/language/stats/t-test.q:981
+#: src/language/stats/oneway.q:691 src/language/stats/t-test.q:981
#: src/language/stats/t-test.q:1173 src/language/stats/t-test.q:1265
msgid "Sig. (2-tailed)"
msgstr ""
-#: src/language/stats/oneway.q:732
+#: src/language/stats/oneway.q:735
msgid "Assume equal variances"
msgstr ""
-#: src/language/stats/oneway.q:736
+#: src/language/stats/oneway.q:739
msgid "Does not assume equal"
msgstr ""
-#: src/language/stats/rank.q:242
+#: src/language/stats/rank.q:244
#, c-format
msgid "Variable %s already exists."
msgstr ""
-#: src/language/stats/rank.q:247
+#: src/language/stats/rank.q:249
msgid "Too many variables in INTO clause."
msgstr ""
msgid "%s & %s"
msgstr ""
-#: src/language/tests/moments-test.c:46
+#: src/language/tests/moments-test.c:49
msgid "expecting weight value"
msgstr ""
msgid "PSPP Data Editor"
msgstr ""
-#: src/ui/gui/menu-actions.c:105
+#: src/ui/gui/menu-actions.c:108
msgid "Open"
msgstr ""
-#: src/ui/gui/menu-actions.c:114
+#: src/ui/gui/menu-actions.c:116
msgid "System Files (*.sav)"
msgstr ""
-#: src/ui/gui/menu-actions.c:120
+#: src/ui/gui/menu-actions.c:122
msgid "Portable Files (*.por) "
msgstr ""
-#: src/ui/gui/menu-actions.c:126
+#: src/ui/gui/menu-actions.c:128
msgid "All Files"
msgstr ""
-#: src/ui/gui/menu-actions.c:223
+#: src/ui/gui/menu-actions.c:232
msgid "Save Data As"
msgstr ""
-#: src/ui/gui/menu-actions.c:459
+#: src/ui/gui/menu-actions.c:474
msgid "Font Selection"
msgstr ""
-#: src/ui/gui/message-dialog.c:75
+#: src/ui/gui/message-dialog.c:78
msgid "Script Error"
msgstr ""
-#: src/ui/gui/message-dialog.c:80
+#: src/ui/gui/message-dialog.c:83
msgid "Installation Error"
msgstr ""
-#: src/ui/gui/message-dialog.c:85
+#: src/ui/gui/message-dialog.c:88
msgid "Data File Error"
msgstr ""
-#: src/ui/gui/message-dialog.c:92
+#: src/ui/gui/message-dialog.c:95
msgid "PSPP Error"
msgstr ""
-#: src/ui/gui/message-dialog.c:153
+#: src/ui/gui/message-dialog.c:155
msgid "Terminating NOW due to fatal error"
msgstr ""
-#: src/ui/gui/missing-val-dialog.c:112 src/ui/gui/missing-val-dialog.c:157
+#: src/ui/gui/missing-val-dialog.c:113 src/ui/gui/missing-val-dialog.c:158
msgid "Incorrect value for variable type"
msgstr ""
-#: src/ui/gui/missing-val-dialog.c:132 src/ui/gui/missing-val-dialog.c:139
+#: src/ui/gui/missing-val-dialog.c:134 src/ui/gui/missing-val-dialog.c:141
msgid "Incorrect range specification"
msgstr ""
-#: src/ui/gui/psppire-data-store.c:638
+#: src/ui/gui/psppire-data-store.c:653
msgid "var"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:419
+#: src/ui/gui/psppire-var-store.c:424
msgid "None"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:424
+#: src/ui/gui/psppire-var-store.c:429
msgid "Comma"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:425
+#: src/ui/gui/psppire-var-store.c:430
msgid "Dot"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:426
+#: src/ui/gui/psppire-var-store.c:431
msgid "Scientific"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:427
+#: src/ui/gui/psppire-var-store.c:432
msgid "Date"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:428
+#: src/ui/gui/psppire-var-store.c:433
msgid "Dollar"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:429
+#: src/ui/gui/psppire-var-store.c:434
msgid "Custom"
msgstr ""
bool
var_is_valid_name (const char *name, bool issue_error)
{
+ bool plausible;
size_t length, i;
assert (name != NULL);
CHARACTERS */
length = strlen (name);
- bool plausible = var_is_plausible_name(name, issue_error);
+ plausible = var_is_plausible_name(name, issue_error);
if ( ! plausible )
return false;
#include <data/variable.h>
#include <procedure.h>
+#include "data-list.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
\f
#include <math/group.h>
#include <math/levene.h>
+#include "sort-criteria.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
const char *s = var_to_string(vars[v]);
- struct group_statistics *const *gs_array = hsh_sort(gp->group_hash);
+ struct group_statistics *const *gs_array =
+ (struct group_statistics *const *) hsh_sort(gp->group_hash);
int count = 0;
tab_text (t, 0, row, TAB_LEFT | TAT_TITLE, s);
#include <math/sort.h>
#include <data/variable.h>
+#include "sort-criteria.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include <language/command.h>
#include <language/lexer/lexer.h>
#include <math/moments.h>
+#include "xalloc.h"
+#include <stdlib.h>
+#include <math.h>
#define _(msgid) gettext (msgid)
}
else
{
+ gsl_multifit_linear_workspace *wk ;
/*
Use QR decomposition via GSL.
*/
gsl_matrix_set (design, j, i + 1, tmp);
}
}
- gsl_multifit_linear_workspace *wk =
- gsl_multifit_linear_alloc (design->size1, design->size2);
+
+ wk = gsl_multifit_linear_alloc (design->size1, design->size2);
rc = gsl_multifit_linear (design, Y, param_estimates,
cache->cov, &(cache->sse), wk);
for (i = 0; i < cache->n_coeffs; i++)
};
-
-
-static void
-write_legend(struct chart *chart, const char *heading, int n);
-
-
-
-/* Write the abscissa label */
-void
-chart_write_xlabel(struct chart *ch, const char *label)
-{
- if ( ! ch )
- return ;
-
- pl_savestate_r(ch->lp);
-
- pl_move_r(ch->lp,ch->data_left, ch->abscissa_top);
- pl_alabel_r(ch->lp,0,'t',label);
-
- pl_restorestate_r(ch->lp);
-
-}
-
-
-
-/* Write the ordinate label */
-void
-chart_write_ylabel(struct chart *ch, const char *label)
-{
- if ( ! ch )
- return ;
-
- pl_savestate_r(ch->lp);
-
- pl_move_r(ch->lp, ch->data_bottom, ch->ordinate_right);
- pl_textangle_r(ch->lp, 90);
- pl_alabel_r(ch->lp, 0, 0, label);
-
- pl_restorestate_r(ch->lp);
-}
-
-
-
-static void
-write_legend(struct chart *chart, const char *heading,
- int n)
-{
- int ds;
-
- if ( ! chart )
- return ;
-
-
- pl_savestate_r(chart->lp);
-
- pl_filltype_r(chart->lp,1);
-
- pl_move_r(chart->lp, chart->legend_left,
- chart->data_bottom + chart->font_size * n * 1.5);
-
- pl_alabel_r(chart->lp,0,'b',heading);
-
- for (ds = 0 ; ds < n ; ++ds )
- {
- pl_fmove_r(chart->lp,
- chart->legend_left,
- chart->data_bottom + chart->font_size * ds * 1.5);
-
- pl_savestate_r(chart->lp);
- pl_fillcolorname_r(chart->lp,data_colour[ds]);
- pl_fboxrel_r (chart->lp,
- 0,0,
- chart->font_size, chart->font_size);
- pl_restorestate_r(chart->lp);
-
- pl_fmove_r(chart->lp,
- chart->legend_left + chart->font_size * 1.5,
- chart->data_bottom + chart->font_size * ds * 1.5);
-
- pl_alabel_r(chart->lp,'l','b',dataset[ds].label);
- }
-
-
- pl_restorestate_r(chart->lp);
-}
-
-
/* Plot a data point */
void
chart_datum(struct chart *ch, int dataset UNUSED, double x, double y)
};
-/* Write the abscissa label */
-void chart_write_xlabel(struct chart *ch, const char *label);
-
-
-/* Write the ordinate label */
-void chart_write_ylabel(struct chart *ch, const char *label);
/* Plot a data point */
void chart_datum(struct chart *ch, int dataset UNUSED, double x, double y);
#include <assert.h>
#include <math.h>
-#include <output/charts/plot-chart.h>
#include <output/charts/plot-chart.h>
#include <math/chart-geometry.h>
(y - ch->y_min) * ch->ordinate_scale, "%g", y);
}
}
+
+
+/* Write the abscissa label */
+void
+chart_write_xlabel(struct chart *ch, const char *label)
+{
+ if ( ! ch )
+ return ;
+
+ pl_savestate_r(ch->lp);
+
+ pl_move_r(ch->lp,ch->data_left, ch->abscissa_top);
+ pl_alabel_r(ch->lp,0,'t',label);
+
+ pl_restorestate_r(ch->lp);
+
+}
+
+
+
+/* Write the ordinate label */
+void
+chart_write_ylabel(struct chart *ch, const char *label)
+{
+ if ( ! ch )
+ return ;
+
+ pl_savestate_r(ch->lp);
+
+ pl_move_r(ch->lp, ch->data_bottom, ch->ordinate_right);
+ pl_textangle_r(ch->lp, 90);
+ pl_alabel_r(ch->lp, 0, 0, label);
+
+ pl_restorestate_r(ch->lp);
+}
/* Set the scale for the ordinate */
void chart_write_yscale(struct chart *ch, double smin, double smax, int ticks);
+void chart_write_xlabel(struct chart *ch, const char *label) ;
+
+/* Write the ordinate label */
+void chart_write_ylabel(struct chart *ch, const char *label);
#endif
psppire_custom_entry_expose (GtkWidget *widget,
GdkEventExpose *event)
{
+ PsppireCustomEntry *ce = PSPPIRE_CUSTOM_ENTRY(widget);
+
g_return_val_if_fail (PSPPIRE_IS_CUSTOM_ENTRY (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
- PsppireCustomEntry *ce = PSPPIRE_CUSTOM_ENTRY(widget);
-
if (GTK_WIDGET_DRAWABLE (widget))
{
GtkShadowType shadow_type;
click2column(GtkWidget *w, gint col, gpointer data)
{
gint current_row, current_column;
- select_sheet(PAGE_VAR_SHEET);
GtkWidget *var_sheet = get_widget_assert(xml, "variable_sheet");
+ select_sheet(PAGE_VAR_SHEET);
+
gtk_sheet_get_active_cell(GTK_SHEET(var_sheet),
¤t_row, ¤t_column);
static gint
update_data_ref_entry(GtkSheet *sheet, gint row, gint col)
{
+
/* The entry where the reference to the current cell is displayed */
GtkEntry *cell_ref_entry;
PsppireDataStore *data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(sheet));
+ if (data_store)
+ {
+ const struct PsppireVariable *pv =
+ psppire_dict_get_variable(data_store->dict, col);
+ gchar *text ;
- if ( !xml)
- return FALSE;
-
- const struct PsppireVariable *pv =
- psppire_dict_get_variable(data_store->dict, col);
+ if ( !xml)
+ return FALSE;
- gchar *text = g_strdup_printf("%d: %s", row,
- pv ? psppire_variable_get_name(pv) : "");
+ text = g_strdup_printf("%d: %s", row,
+ pv ? psppire_variable_get_name(pv) : "");
- cell_ref_entry = GTK_ENTRY(get_widget_assert(xml, "cell_ref_entry"));
+ cell_ref_entry = GTK_ENTRY(get_widget_assert(xml, "cell_ref_entry"));
- gtk_entry_set_text(cell_ref_entry, text);
+ gtk_entry_set_text(cell_ref_entry, text);
- g_free(text);
+ g_free(text);
+ }
return FALSE;
}
gint int1, gint int2)
{
GtkWidget *sheet;
- gint i;
const gint rows = 10046;
if ( format.type != FMT_A)
{
if ( ! text ) return FALSE;
-
- const gchar *s = text;
- while(*s)
- {
- if ( !isspace(*s))
- break;
- s++;
- }
+
+ {
+ const gchar *s = text;
+ while(*s)
+ {
+ if ( !isspace(*s))
+ break;
+ s++;
+ }
- if ( !*s) return FALSE;
+ if ( !*s) return FALSE;
+ }
}
di.s = text;
GtkWidget *
get_widget_assert(GladeXML *xml, const gchar *name)
{
+ GtkWidget *w;
g_assert(xml);
g_assert(name);
- GtkWidget * w = glade_xml_get_widget(xml, name);
+
+ w = glade_xml_get_widget(xml, name);
if ( !w )
g_warning("Widget \"%s\" could not be found\n",name);
on_open1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
+ bool finished = FALSE;
+
GtkWidget *dialog;
GtkWidget *data_editor = get_widget_assert(xml, "data_editor");
+ GtkFileFilter *filter ;
dialog = gtk_file_chooser_dialog_new (_("Open"),
GTK_WINDOW(data_editor),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
- GtkFileFilter *filter ;
filter = gtk_file_filter_new();
gtk_file_filter_set_name(filter, _("System Files (*.sav)"));
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
- bool finished = FALSE;
do {
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
{
- GtkWidget *data_sheet = get_widget_assert(xml, "data_sheet");
- g_assert(data_sheet);
+ PsppireVarStore *var_store ;
+ PsppireDataStore *data_store ;
+ struct dictionary *new_dict;
+ struct sfm_read_info ri;
+ struct sfm_reader *reader ;
+ GtkWidget *data_sheet = get_widget_assert(xml, "data_sheet");
GtkWidget *var_sheet = get_widget_assert(xml, "variable_sheet");
+ gchar *filename;
+
+ g_assert(data_sheet);
g_assert(var_sheet);
- char *filename = gtk_file_chooser_get_filename
+ filename = gtk_file_chooser_get_filename
(GTK_FILE_CHOOSER (dialog));
if ( psppire_handle )
continue;
}
- struct dictionary *new_dict;
- struct sfm_read_info ri;
- struct sfm_reader *reader ;
reader = sfm_open_reader (psppire_handle, &new_dict, &ri);
the_dictionary = psppire_dict_new_from_dict(new_dict);
- PsppireVarStore *var_store =
+ var_store =
PSPPIRE_VAR_STORE(gtk_sheet_get_model(GTK_SHEET(var_sheet)));
psppire_var_store_set_dictionary(var_store, the_dictionary);
- PsppireDataStore *data_store =
+ data_store =
PSPPIRE_DATA_STORE(gtk_sheet_get_model(GTK_SHEET(data_sheet)));
g_free (filename);
- const int ni = dict_get_next_value_idx(the_dictionary->dict);
- if ( ni == 0 )
- goto done;
+ {
+ const int ni = dict_get_next_value_idx(the_dictionary->dict);
+ gint case_num;
+ if ( ni == 0 )
+ goto done;
- gint case_num;
- for(case_num=0;;case_num++)
- {
- if (!psppire_case_array_add_case(the_cases,
- populate_case_from_reader, reader))
- break;
- }
+
+ for(case_num=0;;case_num++)
+ {
+ if (!psppire_case_array_add_case(the_cases,
+ populate_case_from_reader,
+ reader))
+ break;
+ }
+ }
sfm_close_reader(reader);
finished = TRUE;
on_save1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
+ GtkSheet *data_sheet ;
+ PsppireDataStore *data_store ;
+
if ( ! psppire_handle )
recreate_save_handle(&psppire_handle);
- GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
- PsppireDataStore *data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
+ data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
+ data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
if ( psppire_handle )
psppire_data_store_create_system_file(data_store,
on_save_as1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
+ GtkSheet *data_sheet ;
+ PsppireDataStore *data_store ;
+
recreate_save_handle(&psppire_handle);
if ( ! psppire_handle )
return ;
- GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
- PsppireDataStore *data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
+ data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
+ data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
if ( psppire_handle )
psppire_data_store_create_system_file(data_store,
gchar *msg = 0;
gchar *text = g_strdup_vprintf (fmt, args);
+ GtkWindow *parent ;
+ GtkWidget *dialog ;
+
gint message_type;
switch (klass)
break;
};
- GtkWindow *parent = GTK_WINDOW(get_widget_assert(xml, "data_editor"));
-
- GtkWidget *dialog = gtk_message_dialog_new(parent,
- GTK_DIALOG_MODAL,
- message_type,
- GTK_BUTTONS_CLOSE,
- msg);
+ parent = GTK_WINDOW(get_widget_assert(xml, "data_editor"));
+ dialog = gtk_message_dialog_new(parent,
+ GTK_DIALOG_MODAL,
+ message_type,
+ GTK_BUTTONS_CLOSE,
+ msg);
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), text);
static void
err_dialog(const gchar *msg, GtkWindow *window)
{
+ GtkWidget *hbox ;
GtkWidget *label = gtk_label_new (msg);
GtkWidget *dialog =
G_CALLBACK (gtk_widget_destroy),
dialog);
- GtkWidget *hbox = gtk_hbox_new(FALSE, 10);
+ hbox = gtk_hbox_new(FALSE, 10);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
hbox);
if (gtk_toggle_button_get_active(dialog->button_range))
{
+ gchar *discrete_text ;
union value low_val ;
union value high_val;
return;
}
- gchar *discrete_text =
+ discrete_text =
g_strdup(gtk_entry_get_text(GTK_ENTRY(dialog->discrete)));
-
mv_set_type(&dialog->mvl, MV_NONE);
mv_add_num_range(&dialog->mvl, low_val.f, high_val.f);
void
missing_val_dialog_show(struct missing_val_dialog *dialog)
{
+ const struct fmt_spec *write_spec ;
+
gint i;
g_return_if_fail(dialog);
g_return_if_fail(dialog->pv);
mv_copy (&dialog->mvl, psppire_variable_get_missing(dialog->pv));
- const struct fmt_spec *write_spec = psppire_variable_get_write_spec(dialog->pv);
+ write_spec = psppire_variable_get_write_spec(dialog->pv);
/* Blank all entry boxes and make them insensitive */
gtk_entry_set_text(GTK_ENTRY(dialog->low), "");
{
if ( i < n)
{
+ gchar *text ;
union value value;
mv_peek_value(&dialog->mvl, &value, i);
- gchar *text = value_to_text(value, *write_spec);
+ text = value_to_text(value, *write_spec);
gtk_entry_set_text(GTK_ENTRY(dialog->mv[i]), text);
g_free(text);
}
void
psppire_case_array_insert_case(PsppireCaseArray *ca, gint posn)
{
+ gint i;
+
g_return_if_fail(posn >= 0);
g_return_if_fail(posn <= ca->size);
g_assert(ca->size + 1 <= ca->capacity);
- gint i;
for(i = ca->size; i > posn ; --i)
case_move(&ca->cases[i], &ca->cases[i - 1]);
void
psppire_case_array_delete_cases(PsppireCaseArray *ca, gint first, gint n_cases)
{
+ gint i;
+
g_return_if_fail(n_cases > 0);
g_return_if_fail(first >= 0);
g_return_if_fail(first + n_cases < ca->size);
- gint i;
/* FIXME: Is this right ?? */
for ( i = first; i < first + n_cases ; ++i )
value_fill_func_t ff,
gpointer data)
{
+ struct ccase *cc ;
+ union value *val ;
+ gboolean changed ;
+
g_return_if_fail(c < ca->size);
- struct ccase *cc = &ca->cases[c];
+ cc = &ca->cases[c];
- union value *val = case_data_rw(cc, idx);
+ val = case_data_rw(cc, idx);
- gboolean changed = ff(val, data);
+ changed = ff(val, data);
case_unshare(cc);
static void
delete_cases_callback(GtkWidget *w, gint first, gint n_cases, gpointer data)
{
+ PsppireDataStore *store ;
+
g_return_if_fail (data);
- PsppireDataStore *store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE(data);
g_assert(first >= 0);
static void
insert_case_callback(GtkWidget *w, gint casenum, gpointer data)
{
+ PsppireDataStore *store ;
g_return_if_fail (data);
- PsppireDataStore *store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE(data);
g_sheet_model_range_changed (G_SHEET_MODEL(store),
casenum, -1,
static void
changed_case_callback(GtkWidget *w, gint casenum, gpointer data)
{
+ PsppireDataStore *store ;
g_return_if_fail (data);
- PsppireDataStore *store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE(data);
-
g_sheet_model_range_changed (G_SHEET_MODEL(store),
casenum, -1,
casenum, -1);
static void
delete_variables_callback(GtkWidget *w, gint var_num, gint n_vars, gpointer data)
{
+ PsppireDataStore *store ;
+
g_return_if_fail (data);
- PsppireDataStore *store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE(data);
g_sheet_column_columns_deleted(G_SHEET_COLUMN(store),
var_num, n_vars);
static void
insert_variable_callback(GtkWidget *w, gint var_num, gpointer data)
{
+ PsppireDataStore *store;
+
g_return_if_fail (data);
- PsppireDataStore *store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE(data);
/*
g_sheet_model_range_changed (G_SHEET_MODEL(store),
static const gchar *const
psppire_data_store_get_string(GSheetModel *model, gint row, gint column)
{
+ const struct fmt_spec *fp ;
+ const struct PsppireVariable *pv ;
+ const union value *v ;
static gchar s[255];
PsppireDataStore *store = PSPPIRE_DATA_STORE(model);
if ( row >= psppire_case_array_get_n_cases(store->cases))
return NULL;
- const struct PsppireVariable *pv = psppire_dict_get_variable(store->dict, column);
-
+ pv = psppire_dict_get_variable(store->dict, column);
- const union value *v =
- psppire_case_array_get_value(store->cases, row,
+ v = psppire_case_array_get_value(store->cases, row,
psppire_variable_get_index(pv));
-
if ( store->show_labels)
{
const struct val_labs * vl = psppire_variable_get_value_labels(pv);
}
}
- const struct fmt_spec *fp = psppire_variable_get_write_spec(pv);
+ fp = psppire_variable_get_write_spec(pv);
if ( psppire_variable_get_type(pv) == NUMERIC )
{
s[len] = '\0';
}
- static gchar buf[255];
- GError *err = NULL;
- gchar *text = g_locale_to_utf8(s, fp->w, 0, 0, &err);
- if ( !err )
- {
- g_snprintf(buf, 255, text);
- g_free(text);
- }
- else
- {
- g_warning("Cannot convert string \"%s\" to utf-8: %s\n", s, err->message);
- g_error_free(err);
- return NULL;
- }
+ {
+ static gchar buf[255];
+ GError *err = NULL;
+ gchar *text = g_locale_to_utf8(s, fp->w, 0, 0, &err);
+ if ( !err )
+ {
+ g_snprintf(buf, 255, text);
+ g_free(text);
+ }
+ else
+ {
+ g_warning("Cannot convert string \"%s\" to utf-8: %s\n", s, err->message);
+ g_error_free(err);
+ return NULL;
+ }
return buf ;
+ }
}
psppire_data_store_clear_datum(model, r, c);
}
- const gint index = psppire_variable_get_index(pv);
+ {
+ const gint index = psppire_variable_get_index(pv);
- struct data_in d_in;
- d_in.s = text;
- d_in.e = text + strlen(text);
- d_in.v = 0;
- d_in.f1 = d_in.f2 = 0;
- d_in.format = * psppire_variable_get_write_spec(pv);
- d_in.flags = 0;
+ struct data_in d_in;
+ d_in.s = text;
+ d_in.e = text + strlen(text);
+ d_in.v = 0;
+ d_in.f1 = d_in.f2 = 0;
+ d_in.format = * psppire_variable_get_write_spec(pv);
+ d_in.flags = 0;
- psppire_case_array_set_value(store->cases, row, index, fillit, &d_in);
+ psppire_case_array_set_value(store->cases, row, index, fillit, &d_in);
+ }
return TRUE;
}
psppire_data_store_create_system_file(PsppireDataStore *store,
struct file_handle *handle)
{
- g_assert(handle);
-
const struct sfm_write_options wo = {
true, /* writeable */
false, /* dont compress */
3 /* version */
};
- struct sfm_writer *writer = sfm_open_writer(handle, store->dict->dict, wo);
+ struct sfm_writer *writer ;
+
+ g_assert(handle);
+
+ writer = sfm_open_writer(handle, store->dict->dict, wo);
if ( ! writer)
return;
M_width(GtkSheet *sheet, gint row, gint col)
{
GtkSheetCellAttr attributes;
-
- gtk_sheet_get_attributes(sheet, row, col, &attributes);
-
PangoRectangle rect;
/* FIXME: make this a member of the data store */
static PangoLayout *layout = 0;
+
+ gtk_sheet_get_attributes(sheet, row, col, &attributes);
+
if (! layout )
layout = gtk_widget_create_pango_layout (GTK_WIDGET(sheet), "M");
static gint
geometry_get_width(const GSheetColumn *geom, gint unit, GtkSheet *sheet)
{
+ const struct PsppireVariable *pv ;
PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
if ( unit >= psppire_dict_get_var_cnt(ds->dict) )
return 75;
/* FIXME: We can optimise this by caching the widths until they're resized */
- const struct PsppireVariable *pv = psppire_dict_get_variable(ds->dict, unit);
+ pv = psppire_dict_get_variable(ds->dict, unit);
return columnWidthToPixels(sheet, unit, psppire_variable_get_columns(pv));
}
geometry_get_justification(const GSheetColumn *geom, gint unit)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ const struct PsppireVariable *pv ;
if ( unit >= psppire_dict_get_var_cnt(ds->dict) )
return GTK_JUSTIFY_LEFT;
- const struct PsppireVariable *pv = psppire_dict_get_variable(ds->dict, unit);
+ pv = psppire_dict_get_variable(ds->dict, unit);
/* Kludge: Happily GtkJustification is defined similarly
to enum alignment from pspp/variable.h */
static const gchar *
geometry_get_button_label(const GSheetColumn *geom, gint unit)
{
+ struct PsppireVariable *pv ;
PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
if ( unit >= psppire_dict_get_var_cnt(ds->dict) )
return null_var_name;
- struct PsppireVariable *pv = psppire_dict_get_variable(ds->dict, unit);
+ pv = psppire_dict_get_variable(ds->dict, unit);
return psppire_variable_get_name(pv);
}
void
psppire_dict_insert_variable(PsppireDict *d, gint idx, const gchar *name)
{
+ struct variable *var ;
gint i;
g_return_if_fail(d);
g_return_if_fail(G_IS_PSPPIRE_DICT(d));
if ( ! name )
name = auto_generate_var_name(d);
- struct variable *var =
- dict_create_var(d->dict, name, 0);
+ var = dict_create_var(d->dict, name, 0);
dict_reorder_var(d->dict, var, idx);
-
d->variables[idx] = g_malloc(sizeof (struct PsppireVariable));
d->variables[idx]->v = var;
d->variables[idx]->dict = d;
struct PsppireVariable *
psppire_dict_get_variable(PsppireDict *d, gint idx)
{
+ struct PsppireVariable *var ;
g_return_val_if_fail(d, NULL);
g_return_val_if_fail(d->dict, NULL);
g_return_val_if_fail(d->variables, NULL);
if (idx < 0 || idx >= psppire_dict_get_var_cnt(d))
return NULL;
- struct PsppireVariable *var = d->variables[idx] ;
+ var = d->variables[idx] ;
if (! var )
{
g_return_if_fail(d);
g_return_if_fail(d->dict);
- const gint n_vars = dict_get_var_cnt(d->dict);
- gint i;
+ {
+ const gint n_vars = dict_get_var_cnt(d->dict);
+ gint i;
- dict_clear(d->dict);
+ dict_clear(d->dict);
- /* Invalidate the entire cache */
- for ( i = 0 ; i < d->cache_size ; ++i )
- {
- g_free(d->variables[i]);
- d->variables[i] = 0;
- }
+ /* Invalidate the entire cache */
+ for ( i = 0 ; i < d->cache_size ; ++i )
+ {
+ g_free(d->variables[i]);
+ d->variables[i] = 0;
+ }
- g_signal_emit(d, signal[VARIABLES_DELETED], 0, 0, n_vars );
+ g_signal_emit(d, signal[VARIABLES_DELETED], 0, 0, n_vars );
+ }
}
static void
psppire_var_store_init (PsppireVarStore *var_store)
{
+ GdkColormap *colormap = gdk_colormap_get_system();
g_assert(gdk_color_parse("gray", &var_store->disabled));
- GdkColormap *colormap = gdk_colormap_get_system();
-
gdk_colormap_alloc_color (colormap, &var_store->disabled, FALSE, TRUE);
var_store->dict = 0;
static gboolean
psppire_var_store_item_editable(PsppireVarStore *var_store, gint row, gint column)
{
+ const struct fmt_spec *write_spec ;
struct PsppireVariable *pv = psppire_var_store_get_variable(var_store, row);
if ( ALPHA == psppire_variable_get_type(pv) && column == COL_DECIMALS )
return FALSE;
- const struct fmt_spec *write_spec = psppire_variable_get_write_spec(pv);
+ write_spec = psppire_variable_get_write_spec(pv);
switch ( write_spec->type )
{
static const gchar *const
psppire_var_store_get_string(GSheetModel *model, gint row, gint column)
{
+ const gchar *s ;
+
PsppireVarStore *store = PSPPIRE_VAR_STORE(model);
struct PsppireVariable *pv;
pv = psppire_dict_get_variable (store->dict, row);
- const gchar *s = text_for_column(pv, column);
+ s = text_for_column(pv, column);
return s;
}
static gboolean
psppire_var_store_clear(GSheetModel *model, gint row, gint col)
{
+ struct PsppireVariable *pv ;
+
PsppireVarStore *var_store = PSPPIRE_VAR_STORE(model);
if ( row >= psppire_dict_get_var_cnt(var_store->dict))
return FALSE;
- struct PsppireVariable *pv = psppire_var_store_get_variable(var_store, row);
+ pv = psppire_var_store_get_variable(var_store, row);
if ( !pv )
return FALSE;
psppire_var_store_set_string(GSheetModel *model,
const gchar *text, gint row, gint col)
{
+ struct PsppireVariable *pv ;
+
PsppireVarStore *var_store = PSPPIRE_VAR_STORE(model);
if ( row >= psppire_dict_get_var_cnt(var_store->dict))
return FALSE;
- struct PsppireVariable *pv = psppire_var_store_get_variable(var_store, row);
-
+ pv = psppire_var_store_get_variable(var_store, row);
if ( !pv )
return FALSE;
g_assert(vl);
- gchar *const vstr = value_to_text(vl->value, *write_spec);
-
- g_snprintf(buf, MAX_CELL_TEXT_LEN, "{%s,\"%s\"}_", vstr, vl->label);
+ {
+ gchar *const vstr = value_to_text(vl->value, *write_spec);
- g_free(vstr);
+ g_snprintf(buf, MAX_CELL_TEXT_LEN, "{%s,\"%s\"}_", vstr, vl->label);
+ g_free(vstr);
+ }
val_labs_done(&ip);
gboolean
psppire_variable_set_decimals(struct PsppireVariable *pv, gint decimals)
{
+ struct fmt_spec fmt;
+
g_return_val_if_fail(pv, FALSE);
g_return_val_if_fail(pv->dict, FALSE);
g_return_val_if_fail(pv->v, FALSE);
- struct fmt_spec fmt = pv->v->write;
+ fmt = pv->v->write;
fmt.d = decimals;
gboolean
psppire_variable_set_width(struct PsppireVariable *pv, gint width)
{
+ struct fmt_spec fmt ;
g_return_val_if_fail(pv, FALSE);
g_return_val_if_fail(pv->dict, FALSE);
g_return_val_if_fail(pv->v, FALSE);
- struct fmt_spec fmt = pv->v->write;
+ fmt = pv->v->write;
fmt.w = width;
int
main(int argc, char *argv[])
{
+ PsppireVarStore *var_store ;
+ GtkWidget *data_editor ;
+ GtkSheet *var_sheet ;
+ GtkSheet *data_sheet ;
+
if ( ! parse_command_line(&argc, &argv) )
return 0;
the_dictionary = psppire_dict_new();
/* Create the model for the var_sheet */
- PsppireVarStore *var_store = psppire_var_store_new(the_dictionary);
+ var_store = psppire_var_store_new(the_dictionary);
/* Create the model for the data sheet */
the_cases = psppire_case_array_new(100, 20);
if ( !xml ) return 1;
- GtkWidget *data_editor = get_widget_assert(xml, "data_editor");
+ data_editor = get_widget_assert(xml, "data_editor");
gtk_window_set_icon_from_file(GTK_WINDOW(data_editor),
PKGDATADIR "/psppicon.png",0);
/* connect the signals in the interface */
glade_xml_signal_autoconnect(xml);
- GtkSheet *var_sheet = GTK_SHEET(get_widget_assert(xml, "variable_sheet"));
- GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
+ var_sheet = GTK_SHEET(get_widget_assert(xml, "variable_sheet"));
+ data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
gtk_sheet_set_model(var_sheet, G_SHEET_MODEL(var_store));
static void
on_label_entry_change(GtkEntry *entry, gpointer data)
{
+ union value v;
+ const gchar *text ;
struct val_labs_dialog *dialog = data;
g_assert(dialog->labs);
- union value v;
- const gchar *text = gtk_entry_get_text(GTK_ENTRY(dialog->value_entry));
+ text = gtk_entry_get_text(GTK_ENTRY(dialog->value_entry));
text_to_value(text, &v,
*psppire_variable_get_write_spec(dialog->pv));
static void
select_treeview_from_value(GtkTreeView *treeview, union value *val)
{
+ GtkTreePath *path ;
+
/*
We do this with a linear search through the model --- hardly
efficient, but the list is short ... */
success;
success = gtk_tree_model_iter_next(model, &iter))
{
+ union value v;
GValue gvalue = {0};
gtk_tree_model_get_value(model, &iter, 1, &gvalue);
- union value v;
v.f = g_value_get_double(&gvalue);
if ( 0 == memcmp(&v, val, sizeof (union value)))
}
}
- GtkTreePath *path = gtk_tree_model_get_path(model, &iter);
+ path = gtk_tree_model_get_path(model, &iter);
if ( path )
{
gtk_tree_view_set_cursor(treeview, path, 0, 0);
static void
on_value_entry_change(GtkEntry *entry, gpointer data)
{
+ char *s;
+
struct val_labs_dialog *dialog = data;
const gchar *text = gtk_entry_get_text(GTK_ENTRY(dialog->value_entry));
gtk_entry_set_text(GTK_ENTRY(dialog->label_entry),"");
- char *s;
if ( (s = val_labs_find (dialog->labs, v)) )
{
gtk_entry_set_text(GTK_ENTRY(dialog->label_entry), s);
struct val_labs_dialog *
val_labs_dialog_create(GladeXML *xml)
{
+ GtkTreeViewColumn *column;
+
+ GtkCellRenderer *renderer ;
+
struct val_labs_dialog *dialog = g_malloc(sizeof(*dialog));
dialog->window = get_widget_assert(xml,"val_labs_dialog");
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(dialog->treeview), FALSE);
- GtkTreeViewColumn *column;
-
- GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
+ renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes ("Title",
renderer,
click2row(GtkWidget *w, gint row, gpointer data)
{
gint current_row, current_column;
+ GtkWidget *data_sheet = get_widget_assert(xml, "data_sheet");
select_sheet(PAGE_DATA_SHEET);
- GtkWidget *data_sheet = get_widget_assert(xml, "data_sheet");
gtk_sheet_get_active_cell(GTK_SHEET(data_sheet),
¤t_row, ¤t_column);
static GtkListStore *
create_label_list(const gchar **labels)
{
+ const gchar *s;
gint i = 0;
GtkTreeIter iter;
GtkListStore *list_store;
list_store = gtk_list_store_new (1, G_TYPE_STRING);
- const gchar *s;
+
while ( (s = labels[i++]))
{
gtk_list_store_append (list_store, &iter);
var_sheet_cell_change_entry (GtkSheet * sheet, gint row, gint column,
gpointer leaving)
{
+ GtkSheetCellAttr attributes;
+ PsppireVarStore *var_store ;
+ struct PsppireVariable *pv ;
+
g_return_val_if_fail(sheet != NULL, FALSE);
- PsppireVarStore *var_store = PSPPIRE_VAR_STORE(gtk_sheet_get_model(sheet));
+ var_store = PSPPIRE_VAR_STORE(gtk_sheet_get_model(sheet));
if ( row >= psppire_var_store_get_var_cnt(var_store))
return TRUE;
return TRUE;
}
- GtkSheetCellAttr attributes;
+
gtk_sheet_get_attributes(sheet, row, column, &attributes);
- struct PsppireVariable *pv = psppire_var_store_get_variable(var_store, row);
+ pv = psppire_var_store_get_variable(var_store, row);
switch (column)
{
if (!s)
return FALSE;
- const gint current_value = atoi(s);
-
- const struct fmt_spec *fmt = psppire_variable_get_write_spec(pv);
- switch (column)
- {
- case COL_WIDTH:
- r_min = fmt->d + 1;
- r_max = (psppire_variable_get_type(pv) == ALPHA) ? 255 : 40;
- break;
- case COL_DECIMALS:
- r_min = 0 ;
- r_max = min(fmt->w - 1, 16);
- break;
- case COL_COLUMNS:
- r_min = 1;
- r_max = 255 ; /* Is this a sensible value ? */
- break;
- default:
- g_assert_not_reached();
- }
-
- GtkObject *adj =
- gtk_adjustment_new(current_value,
- r_min, r_max,
- 1.0, 1.0, 1.0 /* steps */
- );
-
- gtk_sheet_change_entry(sheet, GTK_TYPE_SPIN_BUTTON);
-
- GtkSpinButton *spinButton =
- GTK_SPIN_BUTTON(gtk_sheet_get_entry(sheet));
-
- gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(adj));
- gtk_spin_button_set_digits(spinButton, 0);
+ {
+ GtkSpinButton *spinButton ;
+ const gint current_value = atoi(s);
+ GtkObject *adj ;
+
+ const struct fmt_spec *fmt = psppire_variable_get_write_spec(pv);
+ switch (column)
+ {
+ case COL_WIDTH:
+ r_min = fmt->d + 1;
+ r_max = (psppire_variable_get_type(pv) == ALPHA) ? 255 : 40;
+ break;
+ case COL_DECIMALS:
+ r_min = 0 ;
+ r_max = min(fmt->w - 1, 16);
+ break;
+ case COL_COLUMNS:
+ r_min = 1;
+ r_max = 255 ; /* Is this a sensible value ? */
+ break;
+ default:
+ g_assert_not_reached();
+ }
+
+ adj = gtk_adjustment_new(current_value,
+ r_min, r_max,
+ 1.0, 1.0, 1.0 /* steps */
+ );
+
+ gtk_sheet_change_entry(sheet, GTK_TYPE_SPIN_BUTTON);
+
+ spinButton =
+ GTK_SPIN_BUTTON(gtk_sheet_get_entry(sheet));
+
+ gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(adj));
+ gtk_spin_button_set_digits(spinButton, 0);
+ }
}
}
break;
static gchar buf[LEN];
g_assert( fmt->type == FMT_DOLLAR);
- gint int_part = fmt->w - fmt->d;
- if ( fmt->d > 0 ) --int_part;
- g_assert(int_part > 0);
+ {
+ gint c ;
+ gint int_part = fmt->w - fmt->d;
+ if ( fmt->d > 0 ) --int_part;
+ g_assert(int_part > 0);
- g_strlcpy(buf, "$", LEN);
+ g_strlcpy(buf, "$", LEN);
- gint c = int_part - 1;
- while(c > 0)
- {
- g_strlcat(buf, "#", LEN);
- if(--c % 4 == 0 && c > 0 )
+ c = int_part - 1;
+ while(c > 0)
{
- g_strlcat(buf, ",", LEN);
- --c;
- }
- }
- if ( fmt->d > 0 )
- {
- g_strlcat(buf, ".", LEN);
- for ( c = 0 ; c < fmt->d ; ++c )
g_strlcat(buf, "#", LEN);
- }
+ if(--c % 4 == 0 && c > 0 )
+ {
+ g_strlcat(buf, ",", LEN);
+ --c;
+ }
+ }
+ if ( fmt->d > 0 )
+ {
+ g_strlcat(buf, ".", LEN);
+ for ( c = 0 ; c < fmt->d ; ++c )
+ g_strlcat(buf, "#", LEN);
+ }
+ }
return buf;
}
static void
update_width_decimals(const struct var_type_dialog *dialog)
{
+ gchar *text;
g_assert(dialog);
- gchar *text = g_strdup_printf("%d", dialog->fmt_l.w);
+ text = g_strdup_printf("%d", dialog->fmt_l.w);
gtk_entry_set_text(GTK_ENTRY(dialog->entry_width), text);
g_free(text);
static void
preview_custom(GtkWidget *w, gpointer data)
{
+ const gchar *text ;
+
struct var_type_dialog *dialog = data;
if ( dialog->active_button != BUTTON_CUSTOM )
return;
- const gchar *text = gtk_entry_get_text(GTK_ENTRY(dialog->entry_decimals));
+ text = gtk_entry_get_text(GTK_ENTRY(dialog->entry_decimals));
dialog->fmt_l.d = atoi(text);
text = gtk_entry_get_text(GTK_ENTRY(dialog->entry_width));
var_type_dialog_create(GladeXML *xml)
{
gint i;
- g_assert(xml);
-
struct var_type_dialog *dialog = g_malloc(sizeof(struct var_type_dialog));
+ g_assert(xml);
+
dialog->window = get_widget_assert(xml,"var_type_dialog");
gtk_window_set_transient_for(GTK_WINDOW(dialog->window),
dialog->ok = get_widget_assert(xml,"var_type_ok");
+ {
+ GtkTreeIter iter;
+ GtkListStore *list_store ;
+
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *renderer ;
+
+ static struct tgs tgs[num_BUTTONS];
/* The "middle_box" is a vbox with serveral children.
However only one child is ever shown at a time.
We need to make sure that they all have the same width, to avoid
upleasant resizing effects */
GtkSizeGroup *sizeGroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+
gtk_container_foreach(GTK_CONTAINER(get_widget_assert(xml, "middle_box")),
add_to_group, sizeGroup);
-
- static struct tgs tgs[num_BUTTONS];
+
for (i = 0 ; i < num_BUTTONS; ++i )
{
tgs[i].dialog = dialog;
dialog->date_format_treeview = GTK_TREE_VIEW(get_widget_assert(xml,
"date_format_list_view"));
- GtkTreeViewColumn *column;
-
- GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
+ renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes ("Title",
renderer,
column);
- GtkTreeIter iter;
- GtkListStore *list_store = gtk_list_store_new (2, G_TYPE_STRING,
- G_TYPE_POINTER);
+ list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
for ( i = 0 ; i < sizeof(format_option) / sizeof(format_option[0]) ; ++i )
{
g_signal_connect(dialog->ok, "clicked", G_CALLBACK(on_var_type_ok_clicked),
dialog);
+
+ }
+
return dialog;
}
static void
select_treeview_from_format(GtkTreeView *treeview, const struct fmt_spec *fmt)
{
+ GtkTreePath *path ;
+
/*
We do this with a linear search through the model --- hardly
efficient, but the list is short ... */
success;
success = gtk_tree_model_iter_next(model, &iter))
{
+ const struct fmt_spec *spec;
+
GValue value = {0};
gtk_tree_model_get_value(model, &iter, 1, &value);
- const struct fmt_spec *spec = g_value_get_pointer(&value);
+ spec = g_value_get_pointer(&value);
if ( 0 == memcmp(spec, fmt, sizeof (struct fmt_spec)))
{
}
}
- GtkTreePath *path = gtk_tree_model_get_path(model, &iter);
+ path = gtk_tree_model_get_path(model, &iter);
if ( path )
{
gtk_tree_view_set_cursor(treeview, path, 0, 0);
select_treeview_from_format_type(GtkTreeView *treeview,
const int fmt_type)
{
- /*
+ GtkTreePath *path ;
+
+ /*
We do this with a linear search through the model --- hardly
efficient, but the list is short ... */
GtkTreeIter iter;
success;
success = gtk_tree_model_iter_next(model, &iter))
{
+ int spec ;
+
GValue value = {0};
gtk_tree_model_get_value(model, &iter, 1, &value);
- const int spec = * ((int *) g_value_get_pointer(&value));
+ spec = * ((int *) g_value_get_pointer(&value));
if ( spec == fmt_type)
break;
}
- GtkTreePath *path = gtk_tree_model_get_path(model, &iter);
+ path = gtk_tree_model_get_path(model, &iter);
if ( path )
{
gtk_tree_view_set_cursor(treeview, path, 0, 0);
static void
var_type_dialog_set_state(struct var_type_dialog *dialog)
{
+ const struct fmt_spec *write_spec ;
+ GString *str = g_string_new("");
+
g_assert(dialog);
g_assert(dialog->pv);
/* Populate width and decimals */
- const struct fmt_spec *write_spec = psppire_variable_get_write_spec(dialog->pv);
+ write_spec = psppire_variable_get_write_spec(dialog->pv);
- GString *str = g_string_new("");
-
g_string_printf(str, "%d", write_spec->d);
gtk_entry_set_text(GTK_ENTRY(dialog->entry_decimals),
g_assert(dialog);
g_assert(dialog->pv);
- gint width = atoi(gtk_entry_get_text
- (GTK_ENTRY(dialog->entry_width)));
+ {
+ gint width = atoi(gtk_entry_get_text
+ (GTK_ENTRY(dialog->entry_width)));
- gint decimals = atoi(gtk_entry_get_text
- (GTK_ENTRY(dialog->entry_decimals)));
+ gint decimals = atoi(gtk_entry_get_text
+ (GTK_ENTRY(dialog->entry_decimals)));
- gint new_type = NUMERIC;
- gint new_width = 0;
- bool result = false;
- struct fmt_spec spec;
- switch (dialog->active_button)
- {
- case BUTTON_STRING:
- new_type = ALPHA;
- new_width = width;
- result = make_output_format_try(&spec, FMT_A, width, 0);
- break;
- case BUTTON_NUMERIC:
- result = make_output_format_try(&spec, FMT_F, width, decimals);
- break;
- case BUTTON_COMMA:
- result = make_output_format_try(&spec, FMT_COMMA, width, decimals);
- break;
- case BUTTON_DOT:
- result = make_output_format_try(&spec, FMT_DOT, width, decimals);
- break;
- case BUTTON_SCIENTIFIC:
- result = make_output_format_try(&spec, FMT_E, width, decimals);
- break;
- case BUTTON_DATE:
- case BUTTON_CUSTOM:
- g_assert(check_output_specifier(&dialog->fmt_l, TRUE));
- result = memcpy(&spec, &dialog->fmt_l, sizeof(struct fmt_spec));
- break;
- case BUTTON_DOLLAR:
- result = make_output_format_try(&spec, FMT_DOLLAR, width, decimals);
- break;
- default:
- g_print("Unknown variable type: %d\n", dialog->active_button) ;
- result = false;
- break;
- }
+ gint new_type = NUMERIC;
+ gint new_width = 0;
+ bool result = false;
+ struct fmt_spec spec;
+ switch (dialog->active_button)
+ {
+ case BUTTON_STRING:
+ new_type = ALPHA;
+ new_width = width;
+ result = make_output_format_try(&spec, FMT_A, width, 0);
+ break;
+ case BUTTON_NUMERIC:
+ result = make_output_format_try(&spec, FMT_F, width, decimals);
+ break;
+ case BUTTON_COMMA:
+ result = make_output_format_try(&spec, FMT_COMMA, width, decimals);
+ break;
+ case BUTTON_DOT:
+ result = make_output_format_try(&spec, FMT_DOT, width, decimals);
+ break;
+ case BUTTON_SCIENTIFIC:
+ result = make_output_format_try(&spec, FMT_E, width, decimals);
+ break;
+ case BUTTON_DATE:
+ case BUTTON_CUSTOM:
+ g_assert(check_output_specifier(&dialog->fmt_l, TRUE));
+ result = memcpy(&spec, &dialog->fmt_l, sizeof(struct fmt_spec));
+ break;
+ case BUTTON_DOLLAR:
+ result = make_output_format_try(&spec, FMT_DOLLAR, width, decimals);
+ break;
+ default:
+ g_print("Unknown variable type: %d\n", dialog->active_button) ;
+ result = false;
+ break;
+ }
- if ( result == true )
- {
- psppire_variable_set_type(dialog->pv, new_type);
- psppire_variable_set_width(dialog->pv, new_width);
- psppire_variable_set_write_spec(dialog->pv, spec);
- psppire_variable_set_print_spec(dialog->pv, spec);
- }
+ if ( result == true )
+ {
+ psppire_variable_set_type(dialog->pv, new_type);
+ psppire_variable_set_width(dialog->pv, new_width);
+ psppire_variable_set_write_spec(dialog->pv, spec);
+ psppire_variable_set_print_spec(dialog->pv, spec);
+ }
+ }
gtk_widget_hide(dialog->window);
return FALSE;