Added the ability to sort the working file.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 24 Jun 2006 09:08:50 +0000 (09:08 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 24 Jun 2006 09:08:50 +0000 (09:08 +0000)
16 files changed:
po/de.po
po/pspp.pot
src/ui/gui/ChangeLog
src/ui/gui/TODO
src/ui/gui/automake.mk
src/ui/gui/menu-actions.c
src/ui/gui/psppire-case-file.c
src/ui/gui/psppire-case-file.h
src/ui/gui/psppire-data-store.c
src/ui/gui/psppire-dict.c
src/ui/gui/psppire-dict.h
src/ui/gui/psppire-variable.c
src/ui/gui/psppire-variable.h
src/ui/gui/psppire.glade
src/ui/gui/sort-cases-dialog.c [new file with mode: 0644]
src/ui/gui/sort-cases-dialog.h [new file with mode: 0644]

index 719716e34b6831feeb084808e60b8070fc1c5d71..4b6cb8ce3411e24e56cbe641e8b28d515155856a 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PSPP 0.4.2\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2006-06-04 13:53+0800\n"
+"POT-Creation-Date: 2006-06-24 17:01+0800\n"
 "PO-Revision-Date: 2006-05-26 17:49+0800\n"
 "Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
 "Language-Team: German <pspp-dev@gnu.org>\n"
@@ -47,32 +47,32 @@ msgstr "Tag %d muß zwischen 0 bit 31 sein."
 msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
 msgstr ""
 
-#: src/data/casefile.c:258
+#: src/data/casefile.c:268
 #, c-format
 msgid "%s: Removing temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:424
+#: src/data/casefile.c:434
 #, c-format
 msgid "Error writing temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:573
+#: src/data/casefile.c:597
 #, c-format
 msgid "%s: Opening temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:599
+#: src/data/casefile.c:640
 #, c-format
 msgid "%s: Seeking temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:617
+#: src/data/casefile.c:659
 #, c-format
 msgid "%s: Reading temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:620
+#: src/data/casefile.c:662
 #, c-format
 msgid "%s: Temporary file ended unexpectedly."
 msgstr ""
@@ -313,21 +313,21 @@ msgstr ""
 msgid "Can't re-open %s as a %s for %s."
 msgstr ""
 
-#: src/data/file-name.c:236
+#: src/data/file-name.c:198
 #, c-format
 msgid "searching for \"%s\" in path \"%s\""
 msgstr ""
 
-#: src/data/file-name.c:263
+#: src/data/file-name.c:229
 #, c-format
 msgid "...found \"%s\""
 msgstr ""
 
-#: src/data/file-name.c:271
+#: src/data/file-name.c:236
 msgid "...not found"
 msgstr ""
 
-#: src/data/file-name.c:624
+#: src/data/file-name.c:588
 #, c-format
 msgid "Not opening pipe file `%s' because SAFER option set."
 msgstr ""
@@ -390,13 +390,13 @@ msgstr ""
 
 #: src/data/format.c:197 src/data/por-file-reader.c:481
 #: src/data/sys-file-reader.c:1265 src/data/sys-file-reader.c:1274
-#: src/ui/gui/psppire.glade:764 src/ui/gui/psppire-var-store.c:448
+#: src/ui/gui/psppire.glade:1155 src/ui/gui/psppire-var-store.c:451
 msgid "String"
 msgstr "Zeichenkette"
 
 #: src/data/format.c:197 src/data/por-file-reader.c:481
 #: src/data/sys-file-reader.c:1265 src/data/sys-file-reader.c:1274
-#: src/ui/gui/psppire.glade:625 src/ui/gui/psppire-var-store.c:441
+#: src/ui/gui/psppire.glade:1016 src/ui/gui/psppire-var-store.c:444
 msgid "Numeric"
 msgstr "Nummer"
 
@@ -1061,9 +1061,9 @@ msgstr ""
 msgid "Error executing command: %s."
 msgstr ""
 
-#: src/language/command.c:792 src/language/data-io/matrix-data.c:535
+#: src/language/command.c:792 src/language/data-io/matrix-data.c:537
 #: src/language/data-io/print.c:340 src/language/data-io/print.c:1041
-#: src/language/dictionary/vector.c:199 src/language/lexer/lexer.c:453
+#: src/language/dictionary/vector.c:199 src/language/lexer/lexer.c:452
 #: src/language/stats/autorecode.c:153 src/language/xforms/select-if.c:61
 msgid "expecting end of command"
 msgstr ""
@@ -1135,84 +1135,84 @@ msgstr ""
 msgid "Only one of FIXED, FREE, or LIST may be specified."
 msgstr ""
 
-#: src/language/data-io/data-list.c:337 src/language/data-io/print.c:301
+#: src/language/data-io/data-list.c:336 src/language/data-io/print.c:301
 #, 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:366
+#: src/language/data-io/data-list.c:365
 msgid ""
 "SPSS-like or FORTRAN-like format specification expected after variable names."
 msgstr ""
 
-#: src/language/data-io/data-list.c:377
+#: src/language/data-io/data-list.c:376
 msgid "At least one variable must be specified."
 msgstr ""
 
-#: src/language/data-io/data-list.c:382 src/language/data-io/print.c:333
+#: src/language/data-io/data-list.c:381 src/language/data-io/print.c:333
 msgid ""
 "Variables are specified on records that should not exist according to "
 "RECORDS subcommand."
 msgstr ""
 
-#: src/language/data-io/data-list.c:415 src/language/data-io/data-list.c:429
+#: src/language/data-io/data-list.c:414 src/language/data-io/data-list.c:428
 #: src/language/data-io/print.c:525 src/language/data-io/print.c:538
 msgid "Column positions for fields must be positive."
 msgstr ""
 
-#: src/language/data-io/data-list.c:434
+#: src/language/data-io/data-list.c:433
 msgid "The ending column for a field must be greater than the starting column."
 msgstr ""
 
-#: src/language/data-io/data-list.c:448
+#: src/language/data-io/data-list.c:447
 #, c-format
 msgid "The %d columns %d-%d can't be evenly divided into %d fields."
 msgstr ""
 
-#: src/language/data-io/data-list.c:468 src/language/data-io/print.c:566
+#: src/language/data-io/data-list.c:467 src/language/data-io/print.c:566
 msgid "A format specifier on this line has extra characters on the end."
 msgstr ""
 
-#: src/language/data-io/data-list.c:483 src/language/data-io/print.c:582
+#: src/language/data-io/data-list.c:482 src/language/data-io/print.c:582
 msgid "The value for number of decimal places must be at least 1."
 msgstr ""
 
-#: src/language/data-io/data-list.c:497 src/language/data-io/print.c:595
+#: src/language/data-io/data-list.c:496 src/language/data-io/print.c:595
 #, c-format
 msgid "Input format %s doesn't accept decimal places."
 msgstr ""
 
-#: src/language/data-io/data-list.c:542 src/language/data-io/data-list.c:638
-#: src/language/data-io/data-list.c:843
+#: src/language/data-io/data-list.c:541 src/language/data-io/data-list.c:637
+#: src/language/data-io/data-list.c:842
 #, c-format
 msgid "%s is a duplicate variable name."
 msgstr ""
 
-#: src/language/data-io/data-list.c:547
+#: src/language/data-io/data-list.c:546
 #, c-format
 msgid "There is already a variable %s of a different type."
 msgstr ""
 
-#: src/language/data-io/data-list.c:554
+#: src/language/data-io/data-list.c:553
 #, c-format
 msgid "There is already a string variable %s of a different width."
 msgstr ""
 
-#: src/language/data-io/data-list.c:629
+#: src/language/data-io/data-list.c:628
 msgid ""
 "The number of format specifications exceeds the given number of variable "
 "names."
 msgstr ""
 
-#: src/language/data-io/data-list.c:739 src/language/data-io/print.c:771
+#: src/language/data-io/data-list.c:738 src/language/data-io/print.c:771
 msgid ""
 "There aren't enough format specifications to match the number of variable "
 "names given."
 msgstr ""
 
-#: src/language/data-io/data-list.c:766 src/language/data-io/data-list.c:881
+#: src/language/data-io/data-list.c:765 src/language/data-io/data-list.c:880
 #: src/language/data-io/print.c:802 src/language/dictionary/split-file.c:83
 #: src/language/dictionary/sys-file-info.c:143
 #: src/language/dictionary/sys-file-info.c:377
@@ -1220,87 +1220,86 @@ msgstr ""
 msgid "Variable"
 msgstr ""
 
-#: src/language/data-io/data-list.c:767 src/language/data-io/print.c:803
+#: src/language/data-io/data-list.c:766 src/language/data-io/print.c:803
 msgid "Record"
 msgstr ""
 
-#: src/language/data-io/data-list.c:768 src/language/data-io/print.c:804
+#: src/language/data-io/data-list.c:767 src/language/data-io/print.c:804
 #: src/ui/gui/var-sheet.c:78
 msgid "Columns"
 msgstr "Spalten"
 
-#: src/language/data-io/data-list.c:769 src/language/data-io/data-list.c:882
+#: src/language/data-io/data-list.c:768 src/language/data-io/data-list.c:881
 #: src/language/data-io/print.c:805
 msgid "Format"
 msgstr ""
 
-#: src/language/data-io/data-list.c:784
+#: src/language/data-io/data-list.c:783
 #, 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:897
+#: src/language/data-io/data-list.c:896
 #, c-format
 msgid "Reading free-form data from %s."
 msgstr ""
 
-#: src/language/data-io/data-list.c:948
-#, c-format
-msgid "Quoted string missing terminating `%c'."
+#: src/language/data-io/data-list.c:942
+msgid "Quoted string extends beyond end of line."
 msgstr ""
 
-#: src/language/data-io/data-list.c:1063
+#: src/language/data-io/data-list.c:1026
 #, c-format
 msgid "Partial case of %d of %d records discarded."
 msgstr ""
 
-#: src/language/data-io/data-list.c:1116
+#: src/language/data-io/data-list.c:1074
 #, c-format
 msgid "Partial case discarded.  The first variable missing was %s."
 msgstr ""
 
-#: src/language/data-io/data-list.c:1159
+#: src/language/data-io/data-list.c:1110
 #, 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-reader.c:134
+#: src/language/data-io/data-reader.c:137
 #, c-format
 msgid "Could not open \"%s\" for reading as a data file: %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:171
+#: src/language/data-io/data-reader.c:174
 msgid ""
 "Unexpected end-of-file while reading data in BEGIN DATA.  This probably "
 "indicates a missing or misformatted END DATA command.  END DATA must appear "
 "by itself on a single line with exactly one space between words."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:202
-#: src/language/data-io/data-reader.c:219
+#: src/language/data-io/data-reader.c:205
+#: src/language/data-io/data-reader.c:217
 #, c-format
 msgid "Error reading file %s: %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:222
+#: src/language/data-io/data-reader.c:220
 #, c-format
 msgid "%s: Partial record at end of file."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:273
+#: src/language/data-io/data-reader.c:271
 #, c-format
 msgid "Attempt to read beyond end-of-file on file %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:276
+#: src/language/data-io/data-reader.c:274
 msgid "Attempt to read beyond END DATA."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:420
+#: src/language/data-io/data-reader.c:432
 msgid ""
 "This command is not valid here since the current input program does not "
 "access the inline file."
@@ -1508,183 +1507,183 @@ msgstr ""
 msgid "Line"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:214
+#: src/language/data-io/matrix-data.c:216
 msgid "VARIABLES subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:229
+#: src/language/data-io/matrix-data.c:231
 msgid "VARNAME_ cannot be explicitly specified on VARIABLES."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:290
+#: src/language/data-io/matrix-data.c:292
 msgid "in FORMAT subcommand"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:301
+#: src/language/data-io/matrix-data.c:303
 msgid "SPLIT subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:308
+#: src/language/data-io/matrix-data.c:310
 msgid "in SPLIT subcommand"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:318
+#: src/language/data-io/matrix-data.c:320
 msgid "Split variable may not be named ROWTYPE_ or VARNAME_."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:352
+#: src/language/data-io/matrix-data.c:354
 #, c-format
 msgid "Split variable %s is already another type."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:367
+#: src/language/data-io/matrix-data.c:369
 msgid "FACTORS subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:386
+#: src/language/data-io/matrix-data.c:388
 #, c-format
 msgid "Factor variable %s is already another type."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:401
+#: src/language/data-io/matrix-data.c:403
 msgid "CELLS subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:407
-#: src/language/data-io/matrix-data.c:426
+#: src/language/data-io/matrix-data.c:409
+#: src/language/data-io/matrix-data.c:428
 msgid "expecting positive integer"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:420
+#: src/language/data-io/matrix-data.c:422
 msgid "N subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:441
+#: src/language/data-io/matrix-data.c:443
 msgid "CONTENTS subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:461
+#: src/language/data-io/matrix-data.c:463
 msgid "Nested parentheses not allowed."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:471
+#: src/language/data-io/matrix-data.c:473
 msgid "Mismatched right parenthesis (`(')."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:476
+#: src/language/data-io/matrix-data.c:478
 msgid "Empty parentheses not allowed."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:489
-#: src/language/data-io/matrix-data.c:497
+#: src/language/data-io/matrix-data.c:491
+#: src/language/data-io/matrix-data.c:499
 msgid "in CONTENTS subcommand"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:504
+#: src/language/data-io/matrix-data.c:506
 #, c-format
 msgid "Content multiply specified for %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:521
+#: src/language/data-io/matrix-data.c:523
 msgid "Missing right parenthesis."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:541
+#: src/language/data-io/matrix-data.c:543
 msgid "Missing VARIABLES subcommand."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:547
+#: src/language/data-io/matrix-data.c:549
 msgid ""
 "CONTENTS subcommand not specified: assuming file contains only CORR matrix."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:557
+#: src/language/data-io/matrix-data.c:559
 msgid ""
 "Missing CELLS subcommand.  CELLS is required when ROWTYPE_ is not given in "
 "the data and factors are present."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:565
+#: src/language/data-io/matrix-data.c:567
 msgid "Split file values must be present in the data when ROWTYPE_ is present."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:618
+#: src/language/data-io/matrix-data.c:620
 msgid "No continuous variables specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:861
+#: src/language/data-io/matrix-data.c:838
 msgid "Scope of string exceeds line."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:926
+#: src/language/data-io/matrix-data.c:899
 #, c-format
 msgid "End of line expected %s while reading %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1117
+#: src/language/data-io/matrix-data.c:1090
 #, c-format
 msgid "expecting value for %s %s"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1282
+#: src/language/data-io/matrix-data.c:1255
 #, c-format
 msgid "Syntax error expecting SPLIT FILE value %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1291
+#: src/language/data-io/matrix-data.c:1264
 #, c-format
 msgid "Expecting value %g for %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1332
-#: src/language/data-io/matrix-data.c:1809
+#: src/language/data-io/matrix-data.c:1305
+#: src/language/data-io/matrix-data.c:1782
 #, c-format
 msgid "Syntax error expecting factor value %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1341
+#: src/language/data-io/matrix-data.c:1314
 #, c-format
 msgid "Syntax error expecting value %g for %s %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1585
+#: src/language/data-io/matrix-data.c:1558
 #, c-format
 msgid "Syntax error %s expecting SPLIT FILE value."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1714
+#: src/language/data-io/matrix-data.c:1687
 #, c-format
 msgid ""
 "Expected %d lines of data for %s content; actually saw %d lines.  No data "
 "will be output for this content."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1751
+#: src/language/data-io/matrix-data.c:1724
 #, c-format
 msgid "Multiply specified ROWTYPE_ %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1756
+#: src/language/data-io/matrix-data.c:1729
 #, c-format
 msgid "Syntax error %s expecting ROWTYPE_ string."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1776
+#: src/language/data-io/matrix-data.c:1749
 #, c-format
 msgid "Syntax error %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1927
+#: src/language/data-io/matrix-data.c:1900
 #, c-format
 msgid "Duplicate specification for %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1939
+#: src/language/data-io/matrix-data.c:1912
 #, c-format
 msgid "Too many rows of matrix data for %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1985
+#: src/language/data-io/matrix-data.c:1958
 #, c-format
 msgid "Syntax error expecting value for %s %s."
 msgstr ""
@@ -1930,8 +1929,8 @@ msgstr ""
 #: src/language/dictionary/sys-file-info.c:522
 #: src/language/stats/crosstabs.q:1113 src/language/stats/crosstabs.q:1140
 #: src/language/stats/crosstabs.q:1160 src/language/stats/crosstabs.q:1182
-#: src/language/stats/examine.q:1149 src/language/stats/frequencies.q:1149
-#: src/language/stats/frequencies.q:1270
+#: src/language/stats/examine.q:1149 src/language/stats/frequencies.q:1177
+#: src/language/stats/frequencies.q:1301
 msgid "Value"
 msgstr ""
 
@@ -2078,11 +2077,11 @@ msgid ""
 "s."
 msgstr ""
 
-#: src/language/dictionary/value-labels.c:157 src/language/lexer/lexer.c:590
+#: src/language/dictionary/value-labels.c:157 src/language/lexer/lexer.c:589
 msgid "expecting string"
 msgstr ""
 
-#: src/language/dictionary/value-labels.c:166 src/language/lexer/lexer.c:604
+#: src/language/dictionary/value-labels.c:166 src/language/lexer/lexer.c:603
 msgid "expecting integer"
 msgstr ""
 
@@ -2331,98 +2330,98 @@ msgstr ""
 msgid "Data format %s is not valid."
 msgstr ""
 
-#: src/language/lexer/lexer.c:264
+#: src/language/lexer/lexer.c:263
 #, c-format
 msgid "%s does not form a valid number."
 msgstr ""
 
-#: src/language/lexer/lexer.c:368
+#: src/language/lexer/lexer.c:367
 #, c-format
 msgid "Bad character in input: `%c'."
 msgstr ""
 
-#: src/language/lexer/lexer.c:370
+#: src/language/lexer/lexer.c:369
 #, c-format
 msgid "Bad character in input: `\\%o'."
 msgstr ""
 
-#: src/language/lexer/lexer.c:401
+#: src/language/lexer/lexer.c:400
 #, c-format
 msgid "Subcommand %s may only be specified once."
 msgstr ""
 
-#: src/language/lexer/lexer.c:409
+#: src/language/lexer/lexer.c:408
 #, c-format
 msgid "missing required subcommand %s"
 msgstr ""
 
-#: src/language/lexer/lexer.c:438
+#: src/language/lexer/lexer.c:437
 #, c-format
 msgid "Syntax error %s at %s."
 msgstr ""
 
-#: src/language/lexer/lexer.c:441
+#: src/language/lexer/lexer.c:440
 #, c-format
 msgid "Syntax error at %s."
 msgstr ""
 
-#: src/language/lexer/lexer.c:559 src/language/lexer/lexer.c:576
+#: src/language/lexer/lexer.c:558 src/language/lexer/lexer.c:575
 #, c-format
 msgid "expecting `%s'"
 msgstr ""
 
-#: src/language/lexer/lexer.c:618
+#: src/language/lexer/lexer.c:617
 msgid "expecting number"
 msgstr ""
 
-#: src/language/lexer/lexer.c:632
+#: src/language/lexer/lexer.c:631
 msgid "expecting identifier"
 msgstr ""
 
-#: src/language/lexer/lexer.c:861
+#: src/language/lexer/lexer.c:860
 msgid "<ERROR>"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1007
+#: src/language/lexer/lexer.c:1006
 msgid "binary"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1012
+#: src/language/lexer/lexer.c:1011
 msgid "octal"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1017
+#: src/language/lexer/lexer.c:1016
 msgid "hex"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1027
+#: src/language/lexer/lexer.c:1026
 #, c-format
 msgid "String of %s digits has %d characters, which is not a multiple of %d."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1056
+#: src/language/lexer/lexer.c:1055
 #, c-format
 msgid "`%c' is not a valid %s digit."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1087
+#: src/language/lexer/lexer.c:1086
 msgid "Unterminated string constant."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1141
+#: src/language/lexer/lexer.c:1140
 msgid "Unexpected end of file in string concatenation."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1149
+#: src/language/lexer/lexer.c:1148
 msgid "String expected following `+'."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1162
+#: src/language/lexer/lexer.c:1161
 #, c-format
 msgid "String exceeds 255 characters in length (%d characters)."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1177
+#: src/language/lexer/lexer.c:1176
 msgid ""
 "Sorry, literal strings may not contain null characters.  Replacing with "
 "spaces."
@@ -2648,33 +2647,33 @@ msgid "Cases"
 msgstr ""
 
 #: src/language/stats/crosstabs.q:817 src/language/stats/examine.q:868
-#: src/language/stats/frequencies.q:1147 src/language/stats/frequencies.q:1520
+#: src/language/stats/frequencies.q:1175 src/language/stats/frequencies.q:1551
 msgid "Valid"
 msgstr ""
 
 #: src/language/stats/crosstabs.q:818 src/language/stats/examine.q:869
-#: src/language/stats/frequencies.q:1215 src/language/stats/frequencies.q:1521
+#: src/language/stats/frequencies.q:1244 src/language/stats/frequencies.q:1552
 #: src/ui/gui/var-sheet.c:77
 msgid "Missing"
 msgstr "Löse"
 
 #: src/language/stats/crosstabs.q:819 src/language/stats/crosstabs.q:1022
 #: src/language/stats/crosstabs.q:1742 src/language/stats/examine.q:870
-#: src/language/stats/frequencies.q:1224 src/language/stats/oneway.q:317
+#: src/language/stats/frequencies.q:1253 src/language/stats/oneway.q:317
 #: src/language/stats/oneway.q:481 src/language/stats/regression.q:314
 msgid "Total"
 msgstr ""
 
 #: src/language/stats/crosstabs.q:829 src/language/stats/examine.q:946
-#: src/language/stats/frequencies.q:1519 src/language/stats/oneway.q:403
+#: src/language/stats/frequencies.q:1550 src/language/stats/oneway.q:403
 #: src/language/stats/t-test.q:687 src/language/stats/t-test.q:710
 #: src/language/stats/t-test.q:835 src/language/stats/t-test.q:1370
 msgid "N"
 msgstr ""
 
 #: src/language/stats/crosstabs.q:830 src/language/stats/examine.q:949
-#: src/language/stats/frequencies.q:1151 src/language/stats/frequencies.q:1152
-#: src/language/stats/frequencies.q:1153
+#: src/language/stats/frequencies.q:1179 src/language/stats/frequencies.q:1180
+#: src/language/stats/frequencies.q:1181
 msgid "Percent"
 msgstr "Prozent"
 
@@ -2917,7 +2916,7 @@ msgid "%s Dependent"
 msgstr ""
 
 #: src/language/stats/descriptives.c:106 src/language/stats/examine.q:1485
-#: src/language/stats/frequencies.q:121 src/language/stats/oneway.q:404
+#: src/language/stats/frequencies.q:123 src/language/stats/oneway.q:404
 #: src/language/stats/t-test.q:688 src/language/stats/t-test.q:711
 #: src/language/stats/t-test.q:834 src/language/stats/t-test.q:1171
 msgid "Mean"
@@ -2927,17 +2926,17 @@ msgstr ""
 msgid "S E Mean"
 msgstr ""
 
-#: src/language/stats/descriptives.c:108 src/language/stats/frequencies.q:125
+#: src/language/stats/descriptives.c:108 src/language/stats/frequencies.q:127
 msgid "Std Dev"
 msgstr ""
 
 #: src/language/stats/descriptives.c:109 src/language/stats/examine.q:1565
-#: src/language/stats/frequencies.q:126
+#: src/language/stats/frequencies.q:128
 msgid "Variance"
 msgstr ""
 
 #: src/language/stats/descriptives.c:110 src/language/stats/examine.q:1672
-#: src/language/stats/frequencies.q:127
+#: src/language/stats/frequencies.q:129
 msgid "Kurtosis"
 msgstr ""
 
@@ -2946,7 +2945,7 @@ msgid "S E Kurt"
 msgstr ""
 
 #: src/language/stats/descriptives.c:112 src/language/stats/examine.q:1652
-#: src/language/stats/frequencies.q:129
+#: src/language/stats/frequencies.q:131
 msgid "Skewness"
 msgstr ""
 
@@ -2955,21 +2954,21 @@ msgid "S E Skew"
 msgstr ""
 
 #: src/language/stats/descriptives.c:114 src/language/stats/examine.q:1613
-#: src/language/stats/frequencies.q:131
+#: src/language/stats/frequencies.q:133
 msgid "Range"
 msgstr ""
 
 #: src/language/stats/descriptives.c:115 src/language/stats/examine.q:1590
-#: src/language/stats/frequencies.q:132 src/language/stats/oneway.q:416
+#: src/language/stats/frequencies.q:134 src/language/stats/oneway.q:416
 msgid "Minimum"
 msgstr ""
 
 #: src/language/stats/descriptives.c:116 src/language/stats/examine.q:1601
-#: src/language/stats/frequencies.q:133 src/language/stats/oneway.q:417
+#: src/language/stats/frequencies.q:135 src/language/stats/oneway.q:417
 msgid "Maximum"
 msgstr ""
 
-#: src/language/stats/descriptives.c:117 src/language/stats/frequencies.q:134
+#: src/language/stats/descriptives.c:117 src/language/stats/frequencies.q:136
 msgid "Sum"
 msgstr ""
 
@@ -3069,7 +3068,7 @@ msgstr ""
 msgid "5%% Trimmed Mean"
 msgstr ""
 
-#: src/language/stats/examine.q:1543 src/language/stats/frequencies.q:123
+#: src/language/stats/examine.q:1543 src/language/stats/frequencies.q:125
 msgid "Median"
 msgstr ""
 
@@ -3115,7 +3114,7 @@ msgid "Dev from Normal"
 msgstr ""
 
 #: src/language/stats/examine.q:1971 src/language/stats/examine.q:1993
-#: src/language/stats/frequencies.q:1531
+#: src/language/stats/frequencies.q:1562
 msgid "Percentiles"
 msgstr ""
 
@@ -3189,87 +3188,87 @@ msgstr ""
 msgid "Unexpected end of file reading FLIP temporary file."
 msgstr ""
 
-#: src/language/stats/frequencies.q:122
+#: src/language/stats/frequencies.q:124
 msgid "S.E. Mean"
 msgstr ""
 
-#: src/language/stats/frequencies.q:124
+#: src/language/stats/frequencies.q:126
 msgid "Mode"
 msgstr ""
 
-#: src/language/stats/frequencies.q:128
+#: src/language/stats/frequencies.q:130
 msgid "S.E. Kurt"
 msgstr ""
 
-#: src/language/stats/frequencies.q:130
+#: src/language/stats/frequencies.q:132
 msgid "S.E. Skew"
 msgstr ""
 
-#: src/language/stats/frequencies.q:406
+#: src/language/stats/frequencies.q:416
 msgid ""
 "At most one of BARCHART, HISTOGRAM, or HBAR should be given.  HBAR will be "
 "assumed.  Argument values will be given precedence increasing along the "
 "order given."
 msgstr ""
 
-#: src/language/stats/frequencies.q:489
+#: src/language/stats/frequencies.q:499
 #, c-format
 msgid ""
 "MAX must be greater than or equal to MIN, if both are specified.  However, "
 "MIN was specified as %g and MAX as %g.  MIN and MAX will be ignored."
 msgstr ""
 
-#: src/language/stats/frequencies.q:814
+#: src/language/stats/frequencies.q:830
 msgid ""
 "Upper limit of integer mode value range must be greater than lower limit."
 msgstr ""
 
-#: src/language/stats/frequencies.q:827
+#: src/language/stats/frequencies.q:843
 #, c-format
 msgid "Variable %s specified multiple times on VARIABLES subcommand."
 msgstr ""
 
-#: src/language/stats/frequencies.q:833
+#: src/language/stats/frequencies.q:849
 #, c-format
 msgid "Integer mode specified, but %s is not a numeric variable."
 msgstr ""
 
-#: src/language/stats/frequencies.q:899
+#: src/language/stats/frequencies.q:922
 msgid "`)' expected after GROUPED interval list."
 msgstr ""
 
-#: src/language/stats/frequencies.q:911
+#: src/language/stats/frequencies.q:934
 #, c-format
 msgid "Variables %s specified on GROUPED but not on VARIABLES."
 msgstr ""
 
-#: src/language/stats/frequencies.q:918
+#: src/language/stats/frequencies.q:941
 #, c-format
 msgid "Variables %s specified multiple times on GROUPED subcommand."
 msgstr ""
 
-#: src/language/stats/frequencies.q:1148 src/language/stats/frequencies.q:1240
-#: src/language/stats/frequencies.q:1241 src/language/stats/frequencies.q:1273
+#: src/language/stats/frequencies.q:1176 src/language/stats/frequencies.q:1269
+#: src/language/stats/frequencies.q:1270 src/language/stats/frequencies.q:1304
 msgid "Cum"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1150 src/output/charts/plot-hist.c:129
+#: src/language/stats/frequencies.q:1178 src/output/charts/plot-hist.c:129
 msgid "Frequency"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1170
+#: src/language/stats/frequencies.q:1199
 msgid "Value Label"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1271
+#: src/language/stats/frequencies.q:1302
 msgid "Freq"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1272 src/language/stats/frequencies.q:1274
+#: src/language/stats/frequencies.q:1303 src/language/stats/frequencies.q:1305
 msgid "Pct"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1493
+#: src/language/stats/frequencies.q:1524
 #, c-format
 msgid "No valid data for variable %s; statistics not displayed."
 msgstr ""
@@ -3863,11 +3862,6 @@ msgid ""
 "each.  (PSPP workspace is currently restricted to a maximum of %d KB.)"
 msgstr ""
 
-#: src/math/time-series/innovations.c:114
-#, c-format
-msgid "Cannot compute autocovariance for a non-numeric variable %s"
-msgstr ""
-
 #: src/output/afm.c:150
 #, c-format
 msgid "opening font metrics file \"%s\""
@@ -4030,131 +4024,131 @@ msgstr ""
 msgid "output driver `%s' referenced but never defined"
 msgstr ""
 
-#: src/output/output.c:261
+#: src/output/output.c:259
 msgid "using default output driver configuration"
 msgstr ""
 
-#: src/output/output.c:293
+#: src/output/output.c:289
 msgid "cannot find output initialization file (use `-vv' to view search path)"
 msgstr ""
 
-#: src/output/output.c:301
+#: src/output/output.c:297
 #, c-format
 msgid "cannot open \"%s\""
 msgstr ""
 
-#: src/output/output.c:313
+#: src/output/output.c:309
 #, c-format
 msgid "reading \"%s\""
 msgstr ""
 
-#: src/output/output.c:335
+#: src/output/output.c:331
 msgid "syntax error"
 msgstr ""
 
-#: src/output/output.c:344
+#: src/output/output.c:340
 #, c-format
 msgid "error closing \"%s\""
 msgstr ""
 
-#: src/output/output.c:352
+#: src/output/output.c:348
 msgid "no active output drivers"
 msgstr ""
 
-#: src/output/output.c:355
+#: src/output/output.c:351
 msgid "error reading device definition file"
 msgstr ""
 
-#: src/output/output.c:472
+#: src/output/output.c:468
 #, c-format
 msgid ""
 "Driver classes:\n"
 "\t"
 msgstr ""
 
-#: src/output/output.c:504
+#: src/output/output.c:500
 #, c-format
 msgid "syntax error parsing options for \"%s\" driver"
 msgstr ""
 
-#: src/output/output.c:521
+#: src/output/output.c:516
 #, c-format
 msgid ""
 "reached end of options inside quoted string parsing options for \"%s\" driver"
 msgstr ""
 
-#: src/output/output.c:594
+#: src/output/output.c:586
 #, c-format
 msgid "syntax error in string constant parsing options for \"%s\" driver"
 msgstr ""
 
-#: src/output/output.c:639
+#: src/output/output.c:634
 #, c-format
 msgid "syntax error expecting `=' parsing options for driver \"%s\""
 msgstr ""
 
-#: src/output/output.c:692
+#: src/output/output.c:685
 #, c-format
-msgid "unknown output driver class `%s'"
+msgid "unknown output driver class `%.*s'"
 msgstr ""
 
-#: src/output/output.c:714
+#: src/output/output.c:700
 #, c-format
-msgid "unknown device type `%s'"
+msgid "unknown device type `%.*s'"
 msgstr ""
 
-#: src/output/output.c:733
+#: src/output/output.c:717
 #, c-format
 msgid "cannot initialize output driver `%s' of class `%s'"
 msgstr ""
 
-#: src/output/output.c:779
+#: src/output/output.c:763
 msgid "driver definition line missing driver name or class name"
 msgstr ""
 
-#: src/output/output.c:926
+#: src/output/output.c:909
 #, c-format
 msgid "unit \"%s\" is unknown in dimension \"%s\""
 msgstr ""
 
-#: src/output/output.c:941
+#: src/output/output.c:924
 #, c-format
 msgid "bad dimension \"%s\""
 msgstr ""
 
-#: src/output/output.c:967
+#: src/output/output.c:950
 #, c-format
 msgid "`x' expected in paper size `%s'"
 msgstr ""
 
-#: src/output/output.c:977
+#: src/output/output.c:960
 #, c-format
 msgid "trailing garbage `%s' on paper size `%s'"
 msgstr ""
 
-#: src/output/output.c:1021
+#: src/output/output.c:1004
 msgid "paper size name cannot be empty"
 msgstr ""
 
-#: src/output/output.c:1039
+#: src/output/output.c:1022
 msgid "cannot find `papersize' configuration file"
 msgstr ""
 
-#: src/output/output.c:1046
+#: src/output/output.c:1029
 #, c-format
 msgid "error opening \"%s\""
 msgstr ""
 
-#: src/output/output.c:1057
+#: src/output/output.c:1040
 #, c-format
 msgid "error reading \"%s\""
 msgstr ""
 
-#: src/output/output.c:1085
+#: src/output/output.c:1066
 msgid "syntax error in paper size definition"
 msgstr ""
 
-#: src/output/output.c:1097
+#: src/output/output.c:1078
 msgid "error reading paper size definition file"
 msgstr ""
 
@@ -4261,35 +4255,35 @@ msgstr ""
 msgid "Style of bevel around the custom entry button"
 msgstr ""
 
-#: src/ui/gui/menu-actions.c:60
+#: src/ui/gui/menu-actions.c:61
 msgid "Untitled"
 msgstr "Unbetitelt"
 
-#: src/ui/gui/menu-actions.c:62
+#: src/ui/gui/menu-actions.c:63
 msgid "PSPP Data Editor"
 msgstr "PSPP Dateiaufbereiter"
 
-#: src/ui/gui/menu-actions.c:209 src/ui/gui/psppire.glade:292
+#: src/ui/gui/menu-actions.c:220 src/ui/gui/psppire.glade:430
 msgid "Open"
 msgstr "Öffen"
 
-#: src/ui/gui/menu-actions.c:217
+#: src/ui/gui/menu-actions.c:228
 msgid "System Files (*.sav)"
 msgstr "Systemedatein (*.sav)"
 
-#: src/ui/gui/menu-actions.c:223
+#: src/ui/gui/menu-actions.c:234
 msgid "Portable Files (*.por) "
 msgstr "Tragbardatein (*.por)"
 
-#: src/ui/gui/menu-actions.c:229
+#: src/ui/gui/menu-actions.c:240
 msgid "All Files"
 msgstr "Alle Datei"
 
-#: src/ui/gui/menu-actions.c:261
+#: src/ui/gui/menu-actions.c:272
 msgid "Save Data As"
 msgstr "Speichern unter"
 
-#: src/ui/gui/menu-actions.c:534
+#: src/ui/gui/menu-actions.c:564
 msgid "Font Selection"
 msgstr "Schriftwahlung"
 
@@ -4313,88 +4307,170 @@ msgstr "Unpassend Wert für Variable"
 msgid "Incorrect range specification"
 msgstr "Falshe Spannweitebeschreibung"
 
-#: src/ui/gui/psppire.c:70
+#: src/ui/gui/psppire.c:67
 msgid "Sorry. The help system hasn't yet been implemented."
 msgstr "Es gibt noch nicht kein Helpsysteme. Schade!"
 
-#: src/ui/gui/psppire-data-store.c:665
+#: src/ui/gui/psppire-data-store.c:693
 msgid "var"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:36
+#: src/ui/gui/psppire-data-store.c:777 src/ui/gui/psppire-var-store.c:518
+#: src/ui/gui/psppire-var-store.c:528 src/ui/gui/psppire-var-store.c:538
+#: src/ui/gui/psppire-var-store.c:735
+#, c-format
+msgid "%d"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:39
 msgid "_File"
 msgstr "_Datei"
 
-#: src/ui/gui/psppire.glade:100
+#: src/ui/gui/psppire.glade:103
 msgid "_Edit"
 msgstr "_Bearbeiten"
 
-#: src/ui/gui/psppire.glade:145
+#: src/ui/gui/psppire.glade:148
 msgid "_Insert"
 msgstr "_Stecken"
 
-#: src/ui/gui/psppire.glade:158
+#: src/ui/gui/psppire.glade:161
 msgid "_View"
 msgstr "_Ansicht"
 
-#: src/ui/gui/psppire.glade:167
+#: src/ui/gui/psppire.glade:170
 msgid "Status Bar"
 msgstr "Statusleiste"
 
-#: src/ui/gui/psppire.glade:176
+#: src/ui/gui/psppire.glade:179
 msgid "Toolbars"
 msgstr "Werkzeugregal"
 
-#: src/ui/gui/psppire.glade:191
+#: src/ui/gui/psppire.glade:193
 msgid "Fonts"
 msgstr "Schrift"
 
-#: src/ui/gui/psppire.glade:200
+#: src/ui/gui/psppire.glade:202
 msgid "Grid Lines"
 msgstr "Glitten"
 
-#: src/ui/gui/psppire.glade:210 src/ui/gui/psppire.glade:1199
-#: src/ui/gui/psppire.glade:1475
+#: src/ui/gui/psppire.glade:212 src/ui/gui/psppire.glade:712
+#: src/ui/gui/psppire.glade:1590 src/ui/gui/psppire.glade:1867
 msgid "Value Labels"
 msgstr "Werten"
 
-#: src/ui/gui/psppire.glade:226
+#: src/ui/gui/psppire.glade:228
 msgid "Data"
 msgstr "Daten"
 
-#: src/ui/gui/psppire.glade:235
+#: src/ui/gui/psppire.glade:237 src/ui/gui/psppire.glade:549
 msgid "Variables"
 msgstr "Variableansicht"
 
-#: src/ui/gui/psppire.glade:248
+#: src/ui/gui/psppire.glade:250
+#, fuzzy
+msgid "_Data"
+msgstr "Daten"
+
+#: src/ui/gui/psppire.glade:260 src/ui/gui/psppire.glade:622
+#, fuzzy
+msgid "Insert Variable"
+msgstr "Variableansicht"
+
+#: src/ui/gui/psppire.glade:269
+#, fuzzy
+msgid "Insert Cases"
+msgstr "_Stecken"
+
+#: src/ui/gui/psppire.glade:277 src/ui/gui/psppire.glade:533
+#: src/ui/gui/psppire.glade:2432
+msgid "Go To Case"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:304 src/ui/gui/psppire.glade:2543
+msgid "Sort Cases"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:314
+msgid "Transpose"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:323
+msgid "Restructure"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:332
+#, fuzzy
+msgid "Merge Files"
+msgstr "Alle Datei"
+
+#: src/ui/gui/psppire.glade:341
+msgid "Aggregate"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:356 src/ui/gui/psppire.glade:651
+#, fuzzy
+msgid "Split File"
+msgstr "Alle Datei"
+
+#: src/ui/gui/psppire.glade:365 src/ui/gui/psppire.glade:683
+msgid "Select Cases"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:374 src/ui/gui/psppire.glade:667
+msgid "Weight Cases"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:386
 msgid "_Help"
 msgstr "_Hilfe"
 
-#: src/ui/gui/psppire.glade:257
+#: src/ui/gui/psppire.glade:395
 msgid "_About"
 msgstr "_Info"
 
-#: src/ui/gui/psppire.glade:310
+#: src/ui/gui/psppire.glade:446
 msgid "Save"
 msgstr "Speichen"
 
-#: src/ui/gui/psppire.glade:328
+#: src/ui/gui/psppire.glade:462
 msgid "Print"
 msgstr "Drucken"
 
-#: src/ui/gui/psppire.glade:474
+#: src/ui/gui/psppire.glade:490
+msgid "Undo"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:505
+msgid "Redo"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:578
+msgid "Find"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:606
+#, fuzzy
+msgid "Insert Case"
+msgstr "_Stecken"
+
+#: src/ui/gui/psppire.glade:731
+msgid "Use Sets"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:863
 msgid "Data View"
 msgstr "Datenansicht"
 
-#: src/ui/gui/psppire.glade:522
+#: src/ui/gui/psppire.glade:911
 msgid "Variable View"
 msgstr "Variableansicht"
 
-#: src/ui/gui/psppire.glade:568
+#: src/ui/gui/psppire.glade:957
 msgid "This is pre-alpha software.  It probably will not work."
 msgstr "Diese Software ist vor-Alpha.  Wahrscheinlich Funktioniert es nicht."
 
-#: src/ui/gui/psppire.glade:569
+#: src/ui/gui/psppire.glade:958
 msgid ""
 "    This program is free software; you can redistribute it and/or modify\n"
 "    it under the terms of the GNU General Public License as published by\n"
@@ -4412,106 +4488,128 @@ msgid ""
 "    02110-1301, USA.\n"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:593
+#: src/ui/gui/psppire.glade:983
 msgid "Variable Type"
 msgstr "Variableansicht"
 
-#: src/ui/gui/psppire.glade:644 src/ui/gui/psppire-var-store.c:442
+#: src/ui/gui/psppire.glade:1035 src/ui/gui/psppire-var-store.c:445
 msgid "Comma"
 msgstr "Komma"
 
-#: src/ui/gui/psppire.glade:664 src/ui/gui/psppire-var-store.c:443
+#: src/ui/gui/psppire.glade:1055 src/ui/gui/psppire-var-store.c:446
 msgid "Dot"
 msgstr "Punkt"
 
-#: src/ui/gui/psppire.glade:684
+#: src/ui/gui/psppire.glade:1075
 msgid "Scientific notation"
 msgstr "Wissenschaftlichnotation"
 
-#: src/ui/gui/psppire.glade:704 src/ui/gui/psppire-var-store.c:445
+#: src/ui/gui/psppire.glade:1095 src/ui/gui/psppire-var-store.c:448
 msgid "Date"
 msgstr "Datum"
 
-#: src/ui/gui/psppire.glade:724 src/ui/gui/psppire-var-store.c:446
+#: src/ui/gui/psppire.glade:1115 src/ui/gui/psppire-var-store.c:449
 msgid "Dollar"
 msgstr "Euro"
 
-#: src/ui/gui/psppire.glade:744
+#: src/ui/gui/psppire.glade:1135
 msgid "Custom currency"
 msgstr "Spezialwährung"
 
-#: src/ui/gui/psppire.glade:889
+#: src/ui/gui/psppire.glade:1280
 msgid "positive"
 msgstr "positiv"
 
-#: src/ui/gui/psppire.glade:914
+#: src/ui/gui/psppire.glade:1305
 msgid "negative"
 msgstr "negativ"
 
-#: src/ui/gui/psppire.glade:943
+#: src/ui/gui/psppire.glade:1334
 msgid "Sample"
 msgstr "Muster"
 
-#: src/ui/gui/psppire.glade:1021
+#: src/ui/gui/psppire.glade:1412
 msgid "Decimal Places:"
 msgstr "Dezimalstellen:"
 
-#: src/ui/gui/psppire.glade:1098
+#: src/ui/gui/psppire.glade:1489
 msgid "Width:"
 msgstr "Große:"
 
-#: src/ui/gui/psppire.glade:1316
+#: src/ui/gui/psppire.glade:1708
 msgid "Value:"
 msgstr "Werte:"
 
-#: src/ui/gui/psppire.glade:1344
+#: src/ui/gui/psppire.glade:1736
 msgid "Value Label:"
 msgstr "Kennsatz:"
 
-#: src/ui/gui/psppire.glade:1560
+#: src/ui/gui/psppire.glade:1952
 msgid "Missing Values"
 msgstr "Lösewerten"
 
-#: src/ui/gui/psppire.glade:1645
+#: src/ui/gui/psppire.glade:2038
 msgid "_No missing values"
 msgstr "_Kein Lösewerten"
 
-#: src/ui/gui/psppire.glade:1670
+#: src/ui/gui/psppire.glade:2063
 msgid "_Discrete missing values"
 msgstr "_Diskret Lösewerten"
 
-#: src/ui/gui/psppire.glade:1799
+#: src/ui/gui/psppire.glade:2192
 msgid "_Range plus one optional discrete missing value"
 msgstr "Wertebereich und ein optional Lösewert"
 
-#: src/ui/gui/psppire.glade:1836
+#: src/ui/gui/psppire.glade:2229
 msgid "_Low:"
 msgstr "_Tief:"
 
-#: src/ui/gui/psppire.glade:1895
+#: src/ui/gui/psppire.glade:2288
 msgid "_High:"
 msgstr "_Hoch:"
 
-#: src/ui/gui/psppire.glade:1969
+#: src/ui/gui/psppire.glade:2362
 msgid "Di_screte value:"
 msgstr "Di_skretwerte"
 
-#: src/ui/gui/psppire-var-store.c:437
+#: src/ui/gui/psppire.glade:2488
+msgid "Case Number:"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:2660 src/ui/gui/sort-cases-dialog.c:282
+msgid "Ascending"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:2679 src/ui/gui/sort-cases-dialog.c:284
+msgid "Descending"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:2700
+msgid "Sort Order"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:2737
+msgid "Sort by:"
+msgstr ""
+
+#: src/ui/gui/psppire-var-store.c:440
 msgid "None"
 msgstr "Keine"
 
-#: src/ui/gui/psppire-var-store.c:444
+#: src/ui/gui/psppire-var-store.c:447
 msgid "Scientific"
 msgstr "Wissenschäflich"
 
-#: src/ui/gui/psppire-var-store.c:447
+#: src/ui/gui/psppire-var-store.c:450
 msgid "Custom"
 msgstr "Spezial"
 
-#: src/ui/gui/psppire-var-store.c:515 src/ui/gui/psppire-var-store.c:525
-#: src/ui/gui/psppire-var-store.c:535 src/ui/gui/psppire-var-store.c:706
-#, c-format
-msgid "%d"
+#: src/ui/gui/sort-cases-dialog.c:342
+msgid "Var"
+msgstr ""
+
+#: src/ui/gui/sort-cases-dialog.c:370
+msgid "Criteria"
 msgstr ""
 
 #: src/ui/gui/var-sheet.c:71
index 6990ea0d65f433537dcbce9fceb40eff74848318..8851aa87a66b13c0a91c9c82b1cf19af8f0202f6 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2006-06-04 13:53+0800\n"
+"POT-Creation-Date: 2006-06-24 17:01+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"
@@ -46,32 +46,32 @@ msgstr ""
 msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
 msgstr ""
 
-#: src/data/casefile.c:258
+#: src/data/casefile.c:268
 #, c-format
 msgid "%s: Removing temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:424
+#: src/data/casefile.c:434
 #, c-format
 msgid "Error writing temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:573
+#: src/data/casefile.c:597
 #, c-format
 msgid "%s: Opening temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:599
+#: src/data/casefile.c:640
 #, c-format
 msgid "%s: Seeking temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:617
+#: src/data/casefile.c:659
 #, c-format
 msgid "%s: Reading temporary file: %s."
 msgstr ""
 
-#: src/data/casefile.c:620
+#: src/data/casefile.c:662
 #, c-format
 msgid "%s: Temporary file ended unexpectedly."
 msgstr ""
@@ -312,21 +312,21 @@ msgstr ""
 msgid "Can't re-open %s as a %s for %s."
 msgstr ""
 
-#: src/data/file-name.c:236
+#: src/data/file-name.c:198
 #, c-format
 msgid "searching for \"%s\" in path \"%s\""
 msgstr ""
 
-#: src/data/file-name.c:263
+#: src/data/file-name.c:229
 #, c-format
 msgid "...found \"%s\""
 msgstr ""
 
-#: src/data/file-name.c:271
+#: src/data/file-name.c:236
 msgid "...not found"
 msgstr ""
 
-#: src/data/file-name.c:624
+#: src/data/file-name.c:588
 #, c-format
 msgid "Not opening pipe file `%s' because SAFER option set."
 msgstr ""
@@ -389,13 +389,13 @@ msgstr ""
 
 #: src/data/format.c:197 src/data/por-file-reader.c:481
 #: src/data/sys-file-reader.c:1265 src/data/sys-file-reader.c:1274
-#: src/ui/gui/psppire.glade:764 src/ui/gui/psppire-var-store.c:448
+#: src/ui/gui/psppire.glade:1155 src/ui/gui/psppire-var-store.c:451
 msgid "String"
 msgstr ""
 
 #: src/data/format.c:197 src/data/por-file-reader.c:481
 #: src/data/sys-file-reader.c:1265 src/data/sys-file-reader.c:1274
-#: src/ui/gui/psppire.glade:625 src/ui/gui/psppire-var-store.c:441
+#: src/ui/gui/psppire.glade:1016 src/ui/gui/psppire-var-store.c:444
 msgid "Numeric"
 msgstr ""
 
@@ -1060,9 +1060,9 @@ msgstr ""
 msgid "Error executing command: %s."
 msgstr ""
 
-#: src/language/command.c:792 src/language/data-io/matrix-data.c:535
+#: src/language/command.c:792 src/language/data-io/matrix-data.c:537
 #: src/language/data-io/print.c:340 src/language/data-io/print.c:1041
-#: src/language/dictionary/vector.c:199 src/language/lexer/lexer.c:453
+#: src/language/dictionary/vector.c:199 src/language/lexer/lexer.c:452
 #: src/language/stats/autorecode.c:153 src/language/xforms/select-if.c:61
 msgid "expecting end of command"
 msgstr ""
@@ -1134,84 +1134,84 @@ msgstr ""
 msgid "Only one of FIXED, FREE, or LIST may be specified."
 msgstr ""
 
-#: src/language/data-io/data-list.c:337 src/language/data-io/print.c:301
+#: src/language/data-io/data-list.c:336 src/language/data-io/print.c:301
 #, 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:366
+#: src/language/data-io/data-list.c:365
 msgid ""
 "SPSS-like or FORTRAN-like format specification expected after variable names."
 msgstr ""
 
-#: src/language/data-io/data-list.c:377
+#: src/language/data-io/data-list.c:376
 msgid "At least one variable must be specified."
 msgstr ""
 
-#: src/language/data-io/data-list.c:382 src/language/data-io/print.c:333
+#: src/language/data-io/data-list.c:381 src/language/data-io/print.c:333
 msgid ""
 "Variables are specified on records that should not exist according to "
 "RECORDS subcommand."
 msgstr ""
 
-#: src/language/data-io/data-list.c:415 src/language/data-io/data-list.c:429
+#: src/language/data-io/data-list.c:414 src/language/data-io/data-list.c:428
 #: src/language/data-io/print.c:525 src/language/data-io/print.c:538
 msgid "Column positions for fields must be positive."
 msgstr ""
 
-#: src/language/data-io/data-list.c:434
+#: src/language/data-io/data-list.c:433
 msgid "The ending column for a field must be greater than the starting column."
 msgstr ""
 
-#: src/language/data-io/data-list.c:448
+#: src/language/data-io/data-list.c:447
 #, c-format
 msgid "The %d columns %d-%d can't be evenly divided into %d fields."
 msgstr ""
 
-#: src/language/data-io/data-list.c:468 src/language/data-io/print.c:566
+#: src/language/data-io/data-list.c:467 src/language/data-io/print.c:566
 msgid "A format specifier on this line has extra characters on the end."
 msgstr ""
 
-#: src/language/data-io/data-list.c:483 src/language/data-io/print.c:582
+#: src/language/data-io/data-list.c:482 src/language/data-io/print.c:582
 msgid "The value for number of decimal places must be at least 1."
 msgstr ""
 
-#: src/language/data-io/data-list.c:497 src/language/data-io/print.c:595
+#: src/language/data-io/data-list.c:496 src/language/data-io/print.c:595
 #, c-format
 msgid "Input format %s doesn't accept decimal places."
 msgstr ""
 
-#: src/language/data-io/data-list.c:542 src/language/data-io/data-list.c:638
-#: src/language/data-io/data-list.c:843
+#: src/language/data-io/data-list.c:541 src/language/data-io/data-list.c:637
+#: src/language/data-io/data-list.c:842
 #, c-format
 msgid "%s is a duplicate variable name."
 msgstr ""
 
-#: src/language/data-io/data-list.c:547
+#: src/language/data-io/data-list.c:546
 #, c-format
 msgid "There is already a variable %s of a different type."
 msgstr ""
 
-#: src/language/data-io/data-list.c:554
+#: src/language/data-io/data-list.c:553
 #, c-format
 msgid "There is already a string variable %s of a different width."
 msgstr ""
 
-#: src/language/data-io/data-list.c:629
+#: src/language/data-io/data-list.c:628
 msgid ""
 "The number of format specifications exceeds the given number of variable "
 "names."
 msgstr ""
 
-#: src/language/data-io/data-list.c:739 src/language/data-io/print.c:771
+#: src/language/data-io/data-list.c:738 src/language/data-io/print.c:771
 msgid ""
 "There aren't enough format specifications to match the number of variable "
 "names given."
 msgstr ""
 
-#: src/language/data-io/data-list.c:766 src/language/data-io/data-list.c:881
+#: src/language/data-io/data-list.c:765 src/language/data-io/data-list.c:880
 #: src/language/data-io/print.c:802 src/language/dictionary/split-file.c:83
 #: src/language/dictionary/sys-file-info.c:143
 #: src/language/dictionary/sys-file-info.c:377
@@ -1219,87 +1219,86 @@ msgstr ""
 msgid "Variable"
 msgstr ""
 
-#: src/language/data-io/data-list.c:767 src/language/data-io/print.c:803
+#: src/language/data-io/data-list.c:766 src/language/data-io/print.c:803
 msgid "Record"
 msgstr ""
 
-#: src/language/data-io/data-list.c:768 src/language/data-io/print.c:804
+#: src/language/data-io/data-list.c:767 src/language/data-io/print.c:804
 #: src/ui/gui/var-sheet.c:78
 msgid "Columns"
 msgstr ""
 
-#: src/language/data-io/data-list.c:769 src/language/data-io/data-list.c:882
+#: src/language/data-io/data-list.c:768 src/language/data-io/data-list.c:881
 #: src/language/data-io/print.c:805
 msgid "Format"
 msgstr ""
 
-#: src/language/data-io/data-list.c:784
+#: src/language/data-io/data-list.c:783
 #, 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:897
+#: src/language/data-io/data-list.c:896
 #, c-format
 msgid "Reading free-form data from %s."
 msgstr ""
 
-#: src/language/data-io/data-list.c:948
-#, c-format
-msgid "Quoted string missing terminating `%c'."
+#: src/language/data-io/data-list.c:942
+msgid "Quoted string extends beyond end of line."
 msgstr ""
 
-#: src/language/data-io/data-list.c:1063
+#: src/language/data-io/data-list.c:1026
 #, c-format
 msgid "Partial case of %d of %d records discarded."
 msgstr ""
 
-#: src/language/data-io/data-list.c:1116
+#: src/language/data-io/data-list.c:1074
 #, c-format
 msgid "Partial case discarded.  The first variable missing was %s."
 msgstr ""
 
-#: src/language/data-io/data-list.c:1159
+#: src/language/data-io/data-list.c:1110
 #, 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-reader.c:134
+#: src/language/data-io/data-reader.c:137
 #, c-format
 msgid "Could not open \"%s\" for reading as a data file: %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:171
+#: src/language/data-io/data-reader.c:174
 msgid ""
 "Unexpected end-of-file while reading data in BEGIN DATA.  This probably "
 "indicates a missing or misformatted END DATA command.  END DATA must appear "
 "by itself on a single line with exactly one space between words."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:202
-#: src/language/data-io/data-reader.c:219
+#: src/language/data-io/data-reader.c:205
+#: src/language/data-io/data-reader.c:217
 #, c-format
 msgid "Error reading file %s: %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:222
+#: src/language/data-io/data-reader.c:220
 #, c-format
 msgid "%s: Partial record at end of file."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:273
+#: src/language/data-io/data-reader.c:271
 #, c-format
 msgid "Attempt to read beyond end-of-file on file %s."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:276
+#: src/language/data-io/data-reader.c:274
 msgid "Attempt to read beyond END DATA."
 msgstr ""
 
-#: src/language/data-io/data-reader.c:420
+#: src/language/data-io/data-reader.c:432
 msgid ""
 "This command is not valid here since the current input program does not "
 "access the inline file."
@@ -1507,183 +1506,183 @@ msgstr ""
 msgid "Line"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:214
+#: src/language/data-io/matrix-data.c:216
 msgid "VARIABLES subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:229
+#: src/language/data-io/matrix-data.c:231
 msgid "VARNAME_ cannot be explicitly specified on VARIABLES."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:290
+#: src/language/data-io/matrix-data.c:292
 msgid "in FORMAT subcommand"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:301
+#: src/language/data-io/matrix-data.c:303
 msgid "SPLIT subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:308
+#: src/language/data-io/matrix-data.c:310
 msgid "in SPLIT subcommand"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:318
+#: src/language/data-io/matrix-data.c:320
 msgid "Split variable may not be named ROWTYPE_ or VARNAME_."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:352
+#: src/language/data-io/matrix-data.c:354
 #, c-format
 msgid "Split variable %s is already another type."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:367
+#: src/language/data-io/matrix-data.c:369
 msgid "FACTORS subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:386
+#: src/language/data-io/matrix-data.c:388
 #, c-format
 msgid "Factor variable %s is already another type."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:401
+#: src/language/data-io/matrix-data.c:403
 msgid "CELLS subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:407
-#: src/language/data-io/matrix-data.c:426
+#: src/language/data-io/matrix-data.c:409
+#: src/language/data-io/matrix-data.c:428
 msgid "expecting positive integer"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:420
+#: src/language/data-io/matrix-data.c:422
 msgid "N subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:441
+#: src/language/data-io/matrix-data.c:443
 msgid "CONTENTS subcommand multiply specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:461
+#: src/language/data-io/matrix-data.c:463
 msgid "Nested parentheses not allowed."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:471
+#: src/language/data-io/matrix-data.c:473
 msgid "Mismatched right parenthesis (`(')."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:476
+#: src/language/data-io/matrix-data.c:478
 msgid "Empty parentheses not allowed."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:489
-#: src/language/data-io/matrix-data.c:497
+#: src/language/data-io/matrix-data.c:491
+#: src/language/data-io/matrix-data.c:499
 msgid "in CONTENTS subcommand"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:504
+#: src/language/data-io/matrix-data.c:506
 #, c-format
 msgid "Content multiply specified for %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:521
+#: src/language/data-io/matrix-data.c:523
 msgid "Missing right parenthesis."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:541
+#: src/language/data-io/matrix-data.c:543
 msgid "Missing VARIABLES subcommand."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:547
+#: src/language/data-io/matrix-data.c:549
 msgid ""
 "CONTENTS subcommand not specified: assuming file contains only CORR matrix."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:557
+#: src/language/data-io/matrix-data.c:559
 msgid ""
 "Missing CELLS subcommand.  CELLS is required when ROWTYPE_ is not given in "
 "the data and factors are present."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:565
+#: src/language/data-io/matrix-data.c:567
 msgid "Split file values must be present in the data when ROWTYPE_ is present."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:618
+#: src/language/data-io/matrix-data.c:620
 msgid "No continuous variables specified."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:861
+#: src/language/data-io/matrix-data.c:838
 msgid "Scope of string exceeds line."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:926
+#: src/language/data-io/matrix-data.c:899
 #, c-format
 msgid "End of line expected %s while reading %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1117
+#: src/language/data-io/matrix-data.c:1090
 #, c-format
 msgid "expecting value for %s %s"
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1282
+#: src/language/data-io/matrix-data.c:1255
 #, c-format
 msgid "Syntax error expecting SPLIT FILE value %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1291
+#: src/language/data-io/matrix-data.c:1264
 #, c-format
 msgid "Expecting value %g for %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1332
-#: src/language/data-io/matrix-data.c:1809
+#: src/language/data-io/matrix-data.c:1305
+#: src/language/data-io/matrix-data.c:1782
 #, c-format
 msgid "Syntax error expecting factor value %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1341
+#: src/language/data-io/matrix-data.c:1314
 #, c-format
 msgid "Syntax error expecting value %g for %s %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1585
+#: src/language/data-io/matrix-data.c:1558
 #, c-format
 msgid "Syntax error %s expecting SPLIT FILE value."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1714
+#: src/language/data-io/matrix-data.c:1687
 #, c-format
 msgid ""
 "Expected %d lines of data for %s content; actually saw %d lines.  No data "
 "will be output for this content."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1751
+#: src/language/data-io/matrix-data.c:1724
 #, c-format
 msgid "Multiply specified ROWTYPE_ %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1756
+#: src/language/data-io/matrix-data.c:1729
 #, c-format
 msgid "Syntax error %s expecting ROWTYPE_ string."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1776
+#: src/language/data-io/matrix-data.c:1749
 #, c-format
 msgid "Syntax error %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1927
+#: src/language/data-io/matrix-data.c:1900
 #, c-format
 msgid "Duplicate specification for %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1939
+#: src/language/data-io/matrix-data.c:1912
 #, c-format
 msgid "Too many rows of matrix data for %s."
 msgstr ""
 
-#: src/language/data-io/matrix-data.c:1985
+#: src/language/data-io/matrix-data.c:1958
 #, c-format
 msgid "Syntax error expecting value for %s %s."
 msgstr ""
@@ -1929,8 +1928,8 @@ msgstr ""
 #: src/language/dictionary/sys-file-info.c:522
 #: src/language/stats/crosstabs.q:1113 src/language/stats/crosstabs.q:1140
 #: src/language/stats/crosstabs.q:1160 src/language/stats/crosstabs.q:1182
-#: src/language/stats/examine.q:1149 src/language/stats/frequencies.q:1149
-#: src/language/stats/frequencies.q:1270
+#: src/language/stats/examine.q:1149 src/language/stats/frequencies.q:1177
+#: src/language/stats/frequencies.q:1301
 msgid "Value"
 msgstr ""
 
@@ -2077,11 +2076,11 @@ msgid ""
 "s."
 msgstr ""
 
-#: src/language/dictionary/value-labels.c:157 src/language/lexer/lexer.c:590
+#: src/language/dictionary/value-labels.c:157 src/language/lexer/lexer.c:589
 msgid "expecting string"
 msgstr ""
 
-#: src/language/dictionary/value-labels.c:166 src/language/lexer/lexer.c:604
+#: src/language/dictionary/value-labels.c:166 src/language/lexer/lexer.c:603
 msgid "expecting integer"
 msgstr ""
 
@@ -2330,98 +2329,98 @@ msgstr ""
 msgid "Data format %s is not valid."
 msgstr ""
 
-#: src/language/lexer/lexer.c:264
+#: src/language/lexer/lexer.c:263
 #, c-format
 msgid "%s does not form a valid number."
 msgstr ""
 
-#: src/language/lexer/lexer.c:368
+#: src/language/lexer/lexer.c:367
 #, c-format
 msgid "Bad character in input: `%c'."
 msgstr ""
 
-#: src/language/lexer/lexer.c:370
+#: src/language/lexer/lexer.c:369
 #, c-format
 msgid "Bad character in input: `\\%o'."
 msgstr ""
 
-#: src/language/lexer/lexer.c:401
+#: src/language/lexer/lexer.c:400
 #, c-format
 msgid "Subcommand %s may only be specified once."
 msgstr ""
 
-#: src/language/lexer/lexer.c:409
+#: src/language/lexer/lexer.c:408
 #, c-format
 msgid "missing required subcommand %s"
 msgstr ""
 
-#: src/language/lexer/lexer.c:438
+#: src/language/lexer/lexer.c:437
 #, c-format
 msgid "Syntax error %s at %s."
 msgstr ""
 
-#: src/language/lexer/lexer.c:441
+#: src/language/lexer/lexer.c:440
 #, c-format
 msgid "Syntax error at %s."
 msgstr ""
 
-#: src/language/lexer/lexer.c:559 src/language/lexer/lexer.c:576
+#: src/language/lexer/lexer.c:558 src/language/lexer/lexer.c:575
 #, c-format
 msgid "expecting `%s'"
 msgstr ""
 
-#: src/language/lexer/lexer.c:618
+#: src/language/lexer/lexer.c:617
 msgid "expecting number"
 msgstr ""
 
-#: src/language/lexer/lexer.c:632
+#: src/language/lexer/lexer.c:631
 msgid "expecting identifier"
 msgstr ""
 
-#: src/language/lexer/lexer.c:861
+#: src/language/lexer/lexer.c:860
 msgid "<ERROR>"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1007
+#: src/language/lexer/lexer.c:1006
 msgid "binary"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1012
+#: src/language/lexer/lexer.c:1011
 msgid "octal"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1017
+#: src/language/lexer/lexer.c:1016
 msgid "hex"
 msgstr ""
 
-#: src/language/lexer/lexer.c:1027
+#: src/language/lexer/lexer.c:1026
 #, c-format
 msgid "String of %s digits has %d characters, which is not a multiple of %d."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1056
+#: src/language/lexer/lexer.c:1055
 #, c-format
 msgid "`%c' is not a valid %s digit."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1087
+#: src/language/lexer/lexer.c:1086
 msgid "Unterminated string constant."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1141
+#: src/language/lexer/lexer.c:1140
 msgid "Unexpected end of file in string concatenation."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1149
+#: src/language/lexer/lexer.c:1148
 msgid "String expected following `+'."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1162
+#: src/language/lexer/lexer.c:1161
 #, c-format
 msgid "String exceeds 255 characters in length (%d characters)."
 msgstr ""
 
-#: src/language/lexer/lexer.c:1177
+#: src/language/lexer/lexer.c:1176
 msgid ""
 "Sorry, literal strings may not contain null characters.  Replacing with "
 "spaces."
@@ -2647,33 +2646,33 @@ msgid "Cases"
 msgstr ""
 
 #: src/language/stats/crosstabs.q:817 src/language/stats/examine.q:868
-#: src/language/stats/frequencies.q:1147 src/language/stats/frequencies.q:1520
+#: src/language/stats/frequencies.q:1175 src/language/stats/frequencies.q:1551
 msgid "Valid"
 msgstr ""
 
 #: src/language/stats/crosstabs.q:818 src/language/stats/examine.q:869
-#: src/language/stats/frequencies.q:1215 src/language/stats/frequencies.q:1521
+#: src/language/stats/frequencies.q:1244 src/language/stats/frequencies.q:1552
 #: src/ui/gui/var-sheet.c:77
 msgid "Missing"
 msgstr ""
 
 #: src/language/stats/crosstabs.q:819 src/language/stats/crosstabs.q:1022
 #: src/language/stats/crosstabs.q:1742 src/language/stats/examine.q:870
-#: src/language/stats/frequencies.q:1224 src/language/stats/oneway.q:317
+#: src/language/stats/frequencies.q:1253 src/language/stats/oneway.q:317
 #: src/language/stats/oneway.q:481 src/language/stats/regression.q:314
 msgid "Total"
 msgstr ""
 
 #: src/language/stats/crosstabs.q:829 src/language/stats/examine.q:946
-#: src/language/stats/frequencies.q:1519 src/language/stats/oneway.q:403
+#: src/language/stats/frequencies.q:1550 src/language/stats/oneway.q:403
 #: src/language/stats/t-test.q:687 src/language/stats/t-test.q:710
 #: src/language/stats/t-test.q:835 src/language/stats/t-test.q:1370
 msgid "N"
 msgstr ""
 
 #: src/language/stats/crosstabs.q:830 src/language/stats/examine.q:949
-#: src/language/stats/frequencies.q:1151 src/language/stats/frequencies.q:1152
-#: src/language/stats/frequencies.q:1153
+#: src/language/stats/frequencies.q:1179 src/language/stats/frequencies.q:1180
+#: src/language/stats/frequencies.q:1181
 msgid "Percent"
 msgstr ""
 
@@ -2916,7 +2915,7 @@ msgid "%s Dependent"
 msgstr ""
 
 #: src/language/stats/descriptives.c:106 src/language/stats/examine.q:1485
-#: src/language/stats/frequencies.q:121 src/language/stats/oneway.q:404
+#: src/language/stats/frequencies.q:123 src/language/stats/oneway.q:404
 #: src/language/stats/t-test.q:688 src/language/stats/t-test.q:711
 #: src/language/stats/t-test.q:834 src/language/stats/t-test.q:1171
 msgid "Mean"
@@ -2926,17 +2925,17 @@ msgstr ""
 msgid "S E Mean"
 msgstr ""
 
-#: src/language/stats/descriptives.c:108 src/language/stats/frequencies.q:125
+#: src/language/stats/descriptives.c:108 src/language/stats/frequencies.q:127
 msgid "Std Dev"
 msgstr ""
 
 #: src/language/stats/descriptives.c:109 src/language/stats/examine.q:1565
-#: src/language/stats/frequencies.q:126
+#: src/language/stats/frequencies.q:128
 msgid "Variance"
 msgstr ""
 
 #: src/language/stats/descriptives.c:110 src/language/stats/examine.q:1672
-#: src/language/stats/frequencies.q:127
+#: src/language/stats/frequencies.q:129
 msgid "Kurtosis"
 msgstr ""
 
@@ -2945,7 +2944,7 @@ msgid "S E Kurt"
 msgstr ""
 
 #: src/language/stats/descriptives.c:112 src/language/stats/examine.q:1652
-#: src/language/stats/frequencies.q:129
+#: src/language/stats/frequencies.q:131
 msgid "Skewness"
 msgstr ""
 
@@ -2954,21 +2953,21 @@ msgid "S E Skew"
 msgstr ""
 
 #: src/language/stats/descriptives.c:114 src/language/stats/examine.q:1613
-#: src/language/stats/frequencies.q:131
+#: src/language/stats/frequencies.q:133
 msgid "Range"
 msgstr ""
 
 #: src/language/stats/descriptives.c:115 src/language/stats/examine.q:1590
-#: src/language/stats/frequencies.q:132 src/language/stats/oneway.q:416
+#: src/language/stats/frequencies.q:134 src/language/stats/oneway.q:416
 msgid "Minimum"
 msgstr ""
 
 #: src/language/stats/descriptives.c:116 src/language/stats/examine.q:1601
-#: src/language/stats/frequencies.q:133 src/language/stats/oneway.q:417
+#: src/language/stats/frequencies.q:135 src/language/stats/oneway.q:417
 msgid "Maximum"
 msgstr ""
 
-#: src/language/stats/descriptives.c:117 src/language/stats/frequencies.q:134
+#: src/language/stats/descriptives.c:117 src/language/stats/frequencies.q:136
 msgid "Sum"
 msgstr ""
 
@@ -3068,7 +3067,7 @@ msgstr ""
 msgid "5%% Trimmed Mean"
 msgstr ""
 
-#: src/language/stats/examine.q:1543 src/language/stats/frequencies.q:123
+#: src/language/stats/examine.q:1543 src/language/stats/frequencies.q:125
 msgid "Median"
 msgstr ""
 
@@ -3114,7 +3113,7 @@ msgid "Dev from Normal"
 msgstr ""
 
 #: src/language/stats/examine.q:1971 src/language/stats/examine.q:1993
-#: src/language/stats/frequencies.q:1531
+#: src/language/stats/frequencies.q:1562
 msgid "Percentiles"
 msgstr ""
 
@@ -3188,87 +3187,87 @@ msgstr ""
 msgid "Unexpected end of file reading FLIP temporary file."
 msgstr ""
 
-#: src/language/stats/frequencies.q:122
+#: src/language/stats/frequencies.q:124
 msgid "S.E. Mean"
 msgstr ""
 
-#: src/language/stats/frequencies.q:124
+#: src/language/stats/frequencies.q:126
 msgid "Mode"
 msgstr ""
 
-#: src/language/stats/frequencies.q:128
+#: src/language/stats/frequencies.q:130
 msgid "S.E. Kurt"
 msgstr ""
 
-#: src/language/stats/frequencies.q:130
+#: src/language/stats/frequencies.q:132
 msgid "S.E. Skew"
 msgstr ""
 
-#: src/language/stats/frequencies.q:406
+#: src/language/stats/frequencies.q:416
 msgid ""
 "At most one of BARCHART, HISTOGRAM, or HBAR should be given.  HBAR will be "
 "assumed.  Argument values will be given precedence increasing along the "
 "order given."
 msgstr ""
 
-#: src/language/stats/frequencies.q:489
+#: src/language/stats/frequencies.q:499
 #, c-format
 msgid ""
 "MAX must be greater than or equal to MIN, if both are specified.  However, "
 "MIN was specified as %g and MAX as %g.  MIN and MAX will be ignored."
 msgstr ""
 
-#: src/language/stats/frequencies.q:814
+#: src/language/stats/frequencies.q:830
 msgid ""
 "Upper limit of integer mode value range must be greater than lower limit."
 msgstr ""
 
-#: src/language/stats/frequencies.q:827
+#: src/language/stats/frequencies.q:843
 #, c-format
 msgid "Variable %s specified multiple times on VARIABLES subcommand."
 msgstr ""
 
-#: src/language/stats/frequencies.q:833
+#: src/language/stats/frequencies.q:849
 #, c-format
 msgid "Integer mode specified, but %s is not a numeric variable."
 msgstr ""
 
-#: src/language/stats/frequencies.q:899
+#: src/language/stats/frequencies.q:922
 msgid "`)' expected after GROUPED interval list."
 msgstr ""
 
-#: src/language/stats/frequencies.q:911
+#: src/language/stats/frequencies.q:934
 #, c-format
 msgid "Variables %s specified on GROUPED but not on VARIABLES."
 msgstr ""
 
-#: src/language/stats/frequencies.q:918
+#: src/language/stats/frequencies.q:941
 #, c-format
 msgid "Variables %s specified multiple times on GROUPED subcommand."
 msgstr ""
 
-#: src/language/stats/frequencies.q:1148 src/language/stats/frequencies.q:1240
-#: src/language/stats/frequencies.q:1241 src/language/stats/frequencies.q:1273
+#: src/language/stats/frequencies.q:1176 src/language/stats/frequencies.q:1269
+#: src/language/stats/frequencies.q:1270 src/language/stats/frequencies.q:1304
 msgid "Cum"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1150 src/output/charts/plot-hist.c:129
+#: src/language/stats/frequencies.q:1178 src/output/charts/plot-hist.c:129
 msgid "Frequency"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1170
+#: src/language/stats/frequencies.q:1199
 msgid "Value Label"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1271
+#: src/language/stats/frequencies.q:1302
 msgid "Freq"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1272 src/language/stats/frequencies.q:1274
+#: src/language/stats/frequencies.q:1303 src/language/stats/frequencies.q:1305
 msgid "Pct"
 msgstr ""
 
-#: src/language/stats/frequencies.q:1493
+#: src/language/stats/frequencies.q:1524
 #, c-format
 msgid "No valid data for variable %s; statistics not displayed."
 msgstr ""
@@ -3862,11 +3861,6 @@ msgid ""
 "each.  (PSPP workspace is currently restricted to a maximum of %d KB.)"
 msgstr ""
 
-#: src/math/time-series/innovations.c:114
-#, c-format
-msgid "Cannot compute autocovariance for a non-numeric variable %s"
-msgstr ""
-
 #: src/output/afm.c:150
 #, c-format
 msgid "opening font metrics file \"%s\""
@@ -4029,131 +4023,131 @@ msgstr ""
 msgid "output driver `%s' referenced but never defined"
 msgstr ""
 
-#: src/output/output.c:261
+#: src/output/output.c:259
 msgid "using default output driver configuration"
 msgstr ""
 
-#: src/output/output.c:293
+#: src/output/output.c:289
 msgid "cannot find output initialization file (use `-vv' to view search path)"
 msgstr ""
 
-#: src/output/output.c:301
+#: src/output/output.c:297
 #, c-format
 msgid "cannot open \"%s\""
 msgstr ""
 
-#: src/output/output.c:313
+#: src/output/output.c:309
 #, c-format
 msgid "reading \"%s\""
 msgstr ""
 
-#: src/output/output.c:335
+#: src/output/output.c:331
 msgid "syntax error"
 msgstr ""
 
-#: src/output/output.c:344
+#: src/output/output.c:340
 #, c-format
 msgid "error closing \"%s\""
 msgstr ""
 
-#: src/output/output.c:352
+#: src/output/output.c:348
 msgid "no active output drivers"
 msgstr ""
 
-#: src/output/output.c:355
+#: src/output/output.c:351
 msgid "error reading device definition file"
 msgstr ""
 
-#: src/output/output.c:472
+#: src/output/output.c:468
 #, c-format
 msgid ""
 "Driver classes:\n"
 "\t"
 msgstr ""
 
-#: src/output/output.c:504
+#: src/output/output.c:500
 #, c-format
 msgid "syntax error parsing options for \"%s\" driver"
 msgstr ""
 
-#: src/output/output.c:521
+#: src/output/output.c:516
 #, c-format
 msgid ""
 "reached end of options inside quoted string parsing options for \"%s\" driver"
 msgstr ""
 
-#: src/output/output.c:594
+#: src/output/output.c:586
 #, c-format
 msgid "syntax error in string constant parsing options for \"%s\" driver"
 msgstr ""
 
-#: src/output/output.c:639
+#: src/output/output.c:634
 #, c-format
 msgid "syntax error expecting `=' parsing options for driver \"%s\""
 msgstr ""
 
-#: src/output/output.c:692
+#: src/output/output.c:685
 #, c-format
-msgid "unknown output driver class `%s'"
+msgid "unknown output driver class `%.*s'"
 msgstr ""
 
-#: src/output/output.c:714
+#: src/output/output.c:700
 #, c-format
-msgid "unknown device type `%s'"
+msgid "unknown device type `%.*s'"
 msgstr ""
 
-#: src/output/output.c:733
+#: src/output/output.c:717
 #, c-format
 msgid "cannot initialize output driver `%s' of class `%s'"
 msgstr ""
 
-#: src/output/output.c:779
+#: src/output/output.c:763
 msgid "driver definition line missing driver name or class name"
 msgstr ""
 
-#: src/output/output.c:926
+#: src/output/output.c:909
 #, c-format
 msgid "unit \"%s\" is unknown in dimension \"%s\""
 msgstr ""
 
-#: src/output/output.c:941
+#: src/output/output.c:924
 #, c-format
 msgid "bad dimension \"%s\""
 msgstr ""
 
-#: src/output/output.c:967
+#: src/output/output.c:950
 #, c-format
 msgid "`x' expected in paper size `%s'"
 msgstr ""
 
-#: src/output/output.c:977
+#: src/output/output.c:960
 #, c-format
 msgid "trailing garbage `%s' on paper size `%s'"
 msgstr ""
 
-#: src/output/output.c:1021
+#: src/output/output.c:1004
 msgid "paper size name cannot be empty"
 msgstr ""
 
-#: src/output/output.c:1039
+#: src/output/output.c:1022
 msgid "cannot find `papersize' configuration file"
 msgstr ""
 
-#: src/output/output.c:1046
+#: src/output/output.c:1029
 #, c-format
 msgid "error opening \"%s\""
 msgstr ""
 
-#: src/output/output.c:1057
+#: src/output/output.c:1040
 #, c-format
 msgid "error reading \"%s\""
 msgstr ""
 
-#: src/output/output.c:1085
+#: src/output/output.c:1066
 msgid "syntax error in paper size definition"
 msgstr ""
 
-#: src/output/output.c:1097
+#: src/output/output.c:1078
 msgid "error reading paper size definition file"
 msgstr ""
 
@@ -4260,35 +4254,35 @@ msgstr ""
 msgid "Style of bevel around the custom entry button"
 msgstr ""
 
-#: src/ui/gui/menu-actions.c:60
+#: src/ui/gui/menu-actions.c:61
 msgid "Untitled"
 msgstr ""
 
-#: src/ui/gui/menu-actions.c:62
+#: src/ui/gui/menu-actions.c:63
 msgid "PSPP Data Editor"
 msgstr ""
 
-#: src/ui/gui/menu-actions.c:209 src/ui/gui/psppire.glade:292
+#: src/ui/gui/menu-actions.c:220 src/ui/gui/psppire.glade:430
 msgid "Open"
 msgstr ""
 
-#: src/ui/gui/menu-actions.c:217
+#: src/ui/gui/menu-actions.c:228
 msgid "System Files (*.sav)"
 msgstr ""
 
-#: src/ui/gui/menu-actions.c:223
+#: src/ui/gui/menu-actions.c:234
 msgid "Portable Files (*.por) "
 msgstr ""
 
-#: src/ui/gui/menu-actions.c:229
+#: src/ui/gui/menu-actions.c:240
 msgid "All Files"
 msgstr ""
 
-#: src/ui/gui/menu-actions.c:261
+#: src/ui/gui/menu-actions.c:272
 msgid "Save Data As"
 msgstr ""
 
-#: src/ui/gui/menu-actions.c:534
+#: src/ui/gui/menu-actions.c:564
 msgid "Font Selection"
 msgstr ""
 
@@ -4312,88 +4306,164 @@ msgstr ""
 msgid "Incorrect range specification"
 msgstr ""
 
-#: src/ui/gui/psppire.c:70
+#: src/ui/gui/psppire.c:67
 msgid "Sorry. The help system hasn't yet been implemented."
 msgstr ""
 
-#: src/ui/gui/psppire-data-store.c:665
+#: src/ui/gui/psppire-data-store.c:693
 msgid "var"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:36
+#: src/ui/gui/psppire-data-store.c:777 src/ui/gui/psppire-var-store.c:518
+#: src/ui/gui/psppire-var-store.c:528 src/ui/gui/psppire-var-store.c:538
+#: src/ui/gui/psppire-var-store.c:735
+#, c-format
+msgid "%d"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:39
 msgid "_File"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:100
+#: src/ui/gui/psppire.glade:103
 msgid "_Edit"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:145
+#: src/ui/gui/psppire.glade:148
 msgid "_Insert"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:158
+#: src/ui/gui/psppire.glade:161
 msgid "_View"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:167
+#: src/ui/gui/psppire.glade:170
 msgid "Status Bar"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:176
+#: src/ui/gui/psppire.glade:179
 msgid "Toolbars"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:191
+#: src/ui/gui/psppire.glade:193
 msgid "Fonts"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:200
+#: src/ui/gui/psppire.glade:202
 msgid "Grid Lines"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:210 src/ui/gui/psppire.glade:1199
-#: src/ui/gui/psppire.glade:1475
+#: src/ui/gui/psppire.glade:212 src/ui/gui/psppire.glade:712
+#: src/ui/gui/psppire.glade:1590 src/ui/gui/psppire.glade:1867
 msgid "Value Labels"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:226
+#: src/ui/gui/psppire.glade:228
 msgid "Data"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:235
+#: src/ui/gui/psppire.glade:237 src/ui/gui/psppire.glade:549
 msgid "Variables"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:248
+#: src/ui/gui/psppire.glade:250
+msgid "_Data"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:260 src/ui/gui/psppire.glade:622
+msgid "Insert Variable"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:269
+msgid "Insert Cases"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:277 src/ui/gui/psppire.glade:533
+#: src/ui/gui/psppire.glade:2432
+msgid "Go To Case"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:304 src/ui/gui/psppire.glade:2543
+msgid "Sort Cases"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:314
+msgid "Transpose"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:323
+msgid "Restructure"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:332
+msgid "Merge Files"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:341
+msgid "Aggregate"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:356 src/ui/gui/psppire.glade:651
+msgid "Split File"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:365 src/ui/gui/psppire.glade:683
+msgid "Select Cases"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:374 src/ui/gui/psppire.glade:667
+msgid "Weight Cases"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:386
 msgid "_Help"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:257
+#: src/ui/gui/psppire.glade:395
 msgid "_About"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:310
+#: src/ui/gui/psppire.glade:446
 msgid "Save"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:328
+#: src/ui/gui/psppire.glade:462
 msgid "Print"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:474
+#: src/ui/gui/psppire.glade:490
+msgid "Undo"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:505
+msgid "Redo"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:578
+msgid "Find"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:606
+msgid "Insert Case"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:731
+msgid "Use Sets"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:863
 msgid "Data View"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:522
+#: src/ui/gui/psppire.glade:911
 msgid "Variable View"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:568
+#: src/ui/gui/psppire.glade:957
 msgid "This is pre-alpha software.  It probably will not work."
 msgstr ""
 
-#: src/ui/gui/psppire.glade:569
+#: src/ui/gui/psppire.glade:958
 msgid ""
 "    This program is free software; you can redistribute it and/or modify\n"
 "    it under the terms of the GNU General Public License as published by\n"
@@ -4411,106 +4481,128 @@ msgid ""
 "    02110-1301, USA.\n"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:593
+#: src/ui/gui/psppire.glade:983
 msgid "Variable Type"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:644 src/ui/gui/psppire-var-store.c:442
+#: src/ui/gui/psppire.glade:1035 src/ui/gui/psppire-var-store.c:445
 msgid "Comma"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:664 src/ui/gui/psppire-var-store.c:443
+#: src/ui/gui/psppire.glade:1055 src/ui/gui/psppire-var-store.c:446
 msgid "Dot"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:684
+#: src/ui/gui/psppire.glade:1075
 msgid "Scientific notation"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:704 src/ui/gui/psppire-var-store.c:445
+#: src/ui/gui/psppire.glade:1095 src/ui/gui/psppire-var-store.c:448
 msgid "Date"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:724 src/ui/gui/psppire-var-store.c:446
+#: src/ui/gui/psppire.glade:1115 src/ui/gui/psppire-var-store.c:449
 msgid "Dollar"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:744
+#: src/ui/gui/psppire.glade:1135
 msgid "Custom currency"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:889
+#: src/ui/gui/psppire.glade:1280
 msgid "positive"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:914
+#: src/ui/gui/psppire.glade:1305
 msgid "negative"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:943
+#: src/ui/gui/psppire.glade:1334
 msgid "Sample"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1021
+#: src/ui/gui/psppire.glade:1412
 msgid "Decimal Places:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1098
+#: src/ui/gui/psppire.glade:1489
 msgid "Width:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1316
+#: src/ui/gui/psppire.glade:1708
 msgid "Value:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1344
+#: src/ui/gui/psppire.glade:1736
 msgid "Value Label:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1560
+#: src/ui/gui/psppire.glade:1952
 msgid "Missing Values"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1645
+#: src/ui/gui/psppire.glade:2038
 msgid "_No missing values"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1670
+#: src/ui/gui/psppire.glade:2063
 msgid "_Discrete missing values"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1799
+#: src/ui/gui/psppire.glade:2192
 msgid "_Range plus one optional discrete missing value"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1836
+#: src/ui/gui/psppire.glade:2229
 msgid "_Low:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1895
+#: src/ui/gui/psppire.glade:2288
 msgid "_High:"
 msgstr ""
 
-#: src/ui/gui/psppire.glade:1969
+#: src/ui/gui/psppire.glade:2362
 msgid "Di_screte value:"
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:437
+#: src/ui/gui/psppire.glade:2488
+msgid "Case Number:"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:2660 src/ui/gui/sort-cases-dialog.c:282
+msgid "Ascending"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:2679 src/ui/gui/sort-cases-dialog.c:284
+msgid "Descending"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:2700
+msgid "Sort Order"
+msgstr ""
+
+#: src/ui/gui/psppire.glade:2737
+msgid "Sort by:"
+msgstr ""
+
+#: src/ui/gui/psppire-var-store.c:440
 msgid "None"
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:444
+#: src/ui/gui/psppire-var-store.c:447
 msgid "Scientific"
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:447
+#: src/ui/gui/psppire-var-store.c:450
 msgid "Custom"
 msgstr ""
 
-#: src/ui/gui/psppire-var-store.c:515 src/ui/gui/psppire-var-store.c:525
-#: src/ui/gui/psppire-var-store.c:535 src/ui/gui/psppire-var-store.c:706
-#, c-format
-msgid "%d"
+#: src/ui/gui/sort-cases-dialog.c:342
+msgid "Var"
+msgstr ""
+
+#: src/ui/gui/sort-cases-dialog.c:370
+msgid "Criteria"
 msgstr ""
 
 #: src/ui/gui/var-sheet.c:71
index 3b32eda1dd468711037fff29be1c50c19b58acb6..c0eeb53840843f1f3ef1c83f49ee5cf70ae273f0 100644 (file)
@@ -1,3 +1,21 @@
+Sat Jun 24 16:56:22 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+   * menu-actions.c: Added goto case and sort cases dialogs.
+
+   * psppire-case-file.c psppire-case-file.h: Added sort function.
+
+   * psppire-data-store.c psppire-variable.c psppire-variable.h: 
+     Renamed  psppire_variable_get_index to psppire_variable_get_fv and
+     dealt with the consequences.  Added a psppire_variable_get_index
+     function which actually does what the name suggests.
+
+   * psppire-dict.c psppire-dict.h: Implemented GtkTreeModel interface,
+     which allows a dictionary to be displayed in a GtkTreeView.       
+
+   * psppire.glade: Added dialog boxes for Goto Case and Sort Case.    
+
+   * sort-cases-dialog.c sort-cases-dialog.h (new files).
+
 Mon Jun 19 18:10:53 WST 2006 John Darrington <john@darrington.wattle.id.au>
 
    * psppire-case-file.c psppire-case-file.h (new files)
index bced1fb6ab6b7da0db08114f0c15f7a88272d182..2b8d970cef50877a768843a72189b58daa8a9105 100644 (file)
@@ -21,3 +21,5 @@ Wishlist
 
 * In datasheet, add tooltips to column buttons, so that hovering over a column button displays 
   the label for that variable.
+
+* GtkSheet should implement the AtkTable interface, to allow psppire to become accessible to disabled users.
index 247548153cbe4dbccb3197387e717673997615d7..5115a6420b9b4844aac8f05c51be89aadbda40b6 100644 (file)
@@ -11,6 +11,7 @@ src_ui_gui_psppire_LDADD = \
        $(GTK_LIBS) \
        $(GLADE_LIBS) \
        $(top_builddir)/lib/gtksheet/libgtksheet.a \
+       $(top_builddir)/src/math/libpspp_math.a \
        $(top_builddir)/src/data/libdata.a \
        $(top_builddir)/src/libpspp/libpspp.a \
        $(top_builddir)/gl/libgl.a \
@@ -50,6 +51,8 @@ src_ui_gui_psppire_SOURCES = \
        src/ui/gui/psppire-variable.h \
        src/ui/gui/psppire-var-store.c \
        src/ui/gui/psppire-var-store.h \
+       src/ui/gui/sort-cases-dialog.c \
+       src/ui/gui/sort-cases-dialog.h \
        src/ui/gui/val-labs-dialog.c \
        src/ui/gui/val-labs-dialog.h \
        src/ui/gui/var-sheet.c \
index 0dc03658c0c93f6222100d13c5be3c1066658a31..c8f945c0bd660762be8dc249cf496046f6f72822 100644 (file)
@@ -1,6 +1,6 @@
 /* 
     PSPPIRE --- A Graphical User Interface for PSPP
-    Copyright (C) 2004, 2005  Free Software Foundation
+    Copyright (C) 2004, 2005, 2006  Free Software Foundation
     Written by John Darrington
 
     This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,7 @@
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
+#include <math/sort.h>
 
 #include <data/casefile.h>
 #include <data/file-handle-def.h>
@@ -45,6 +46,7 @@
 #include "psppire-var-store.h"
 #include "psppire-data-store.h"
 
+#include "sort-cases-dialog.h"
 
 
 extern GladeXML *xml;
@@ -377,7 +379,7 @@ blank_case(struct ccase *cc, gpointer _dict)
 
       const struct PsppireVariable *var = psppire_dict_get_variable(dict, i);
       
-      gint idx = psppire_variable_get_index(var);
+      gint idx = psppire_variable_get_fv(var);
 
       val = case_data_rw(cc, idx) ;
 
@@ -491,25 +493,40 @@ on_about1_activate(GtkMenuItem     *menuitem,
 }
 
 
-
+/* Set the value labels state from the toolbar's toggle button */
 void
-on_toolbars1_activate
-                     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
+on_togglebutton_value_labels_toggled(GtkToggleToolButton *toggle_tool_button,
+                                    gpointer             user_data)
 {
+  GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
+  GtkCheckMenuItem *item = 
+    GTK_CHECK_MENU_ITEM(get_widget_assert(xml, "menuitem-value-labels"));
 
+  PsppireDataStore *ds = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
 
+  gboolean show_value_labels = gtk_toggle_tool_button_get_active(toggle_tool_button);
+  
+  gtk_check_menu_item_set_active(item, show_value_labels);
+
+  psppire_data_store_show_labels(ds, show_value_labels);
 }
 
+/* Set the value labels state from the view menu */
 void
-on_value_labels1_activate(GtkCheckMenuItem     *menuitem,
+on_value_labels_activate(GtkCheckMenuItem     *menuitem,
                          gpointer         user_data)
 {
   GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
+  GtkToggleToolButton *tb = 
+   GTK_TOGGLE_TOOL_BUTTON(get_widget_assert(xml, "togglebutton-value-labels"));
+
   PsppireDataStore *ds = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-               
-  psppire_data_store_show_labels(ds, 
-                             gtk_check_menu_item_get_active(menuitem));
+
+  gboolean show_value_labels = gtk_check_menu_item_get_active(menuitem);
+
+  gtk_toggle_tool_button_set_active(tb, show_value_labels);
+
+  psppire_data_store_show_labels(ds, show_value_labels);
 }
 
 void
@@ -652,3 +669,68 @@ on_variables1_activate(GtkMenuItem     *menuitem,
   select_sheet(PAGE_VAR_SHEET);
 }
 
+
+
+void
+on_go_to_case_activate(GtkMenuItem     *menuitem,
+                      gpointer         user_data)
+{
+  GtkWidget *dialog = get_widget_assert(xml, "go_to_case_dialog");
+  GtkEntry *entry = GTK_ENTRY(get_widget_assert(xml, "entry_go_to_case"));
+  GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
+  
+  gint result = gtk_dialog_run(GTK_DIALOG(dialog));
+  
+
+  
+  switch (result)
+    {
+    case GTK_RESPONSE_OK:
+      {
+       gint row, column;
+       const gchar *text = gtk_entry_get_text(entry);
+       gint casenum = g_strtod(text, NULL);
+
+       gtk_sheet_get_active_cell(data_sheet, &row, &column);
+       if ( column < 0 ) column = 0;
+       if ( row < 0 ) row = 0;
+       
+       gtk_sheet_set_active_cell(data_sheet, casenum, column);
+      }
+      break;
+    default:
+      break;
+    }
+
+  gtk_widget_hide(dialog);
+  gtk_entry_set_text(entry, "");
+}
+
+
+
+void
+on_sort_cases_activate (GtkMenuItem     *menuitem,
+                       gpointer         user_data)
+{
+  gint response;
+  PsppireDataStore *data_store ;
+
+  struct sort_criteria criteria;
+  static struct sort_cases_dialog *dialog ;
+
+  GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
+
+  data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
+
+  if ( NULL == dialog) 
+    dialog = sort_cases_dialog_create(xml);
+
+  response = sort_cases_dialog_run(dialog, the_dictionary, &criteria);
+
+  switch ( response) 
+    {
+    case GTK_RESPONSE_OK:
+      psppire_case_file_sort(data_store->case_file, &criteria);
+      break;
+    }
+}
index 374105bd18bd252275d7222b79d284f774c4ecf2..0c8e52a93968430186eed573c37ffff0f46a8b0a 100644 (file)
@@ -31,6 +31,8 @@
 #include <data/casefile.h>
 #include <data/data-in.h>
 
+#include <math/sort.h>
+
 /* --- prototypes --- */
 static void psppire_case_file_class_init       (PsppireCaseFileClass   *class);
 static void psppire_case_file_init     (PsppireCaseFile        *case_file);
@@ -246,3 +248,17 @@ psppire_case_file_set_value(PsppireCaseFile *cf, gint casenum, gint idx,
 
   return TRUE;
 }
+
+
+void
+psppire_case_file_sort(PsppireCaseFile *cf, const struct sort_criteria *sc)
+{
+  gint c;
+  struct casereader *reader = casefile_get_reader(cf->casefile);
+  cf->casefile = sort_execute(reader, sc);
+
+  /* FIXME: Need to have a signal to change a range of cases, instead of
+     calling a signal many times */
+  for ( c = 0 ; c < casefile_get_case_cnt(cf->casefile) ; ++c ) 
+    g_signal_emit(cf, signal[CASE_CHANGED], 0, c);
+}
index 0aa44aad428956057f4c86931e9ace9c5d6d2518..652ee54106baccb28e36dd44027662251eb508e0 100644 (file)
@@ -84,6 +84,9 @@ gboolean psppire_case_file_set_value(PsppireCaseFile *cf, gint c, gint idx,
 
 void psppire_case_file_clear(PsppireCaseFile *cf);
 
+struct sort_criteria;
+void psppire_case_file_sort(PsppireCaseFile *cf, const struct sort_criteria *);
+
 
 G_END_DECLS
 
index 4471a866ca0374d5f4491a1d73e520a5a087b21c..6df379731695183763f4a39af44470d0c7e327f3 100644 (file)
@@ -402,7 +402,7 @@ psppire_data_store_get_string(const GSheetModel *model, gint row, gint column)
 
   pv = psppire_dict_get_variable(store->dict, column);
 
-  idx = psppire_variable_get_index(pv);
+  idx = psppire_variable_get_fv(pv);
 
   v = psppire_case_file_get_value(store->case_file, row, idx);
 
@@ -448,7 +448,7 @@ psppire_data_store_clear_datum(GSheetModel *model,
   union value v;
   const struct PsppireVariable *pv = psppire_dict_get_variable(store->dict, col);
 
-  const gint index = psppire_variable_get_index(pv) ;
+  const gint index = psppire_variable_get_fv(pv) ;
 
   if ( psppire_variable_get_type(pv) == NUMERIC) 
     v.f = SYSMIS;
@@ -490,7 +490,7 @@ psppire_data_store_set_string(GSheetModel *model,
 #endif
 
   {
-    const gint index = psppire_variable_get_index(pv);
+    const gint index = psppire_variable_get_fv(pv);
 
     struct data_in d_in;
     d_in.s = text;
index 2cb6894ce957d508a739ca86070c35704689f092..10de849c7b84ab20011a111ff1111a7607adeee1 100644 (file)
@@ -22,7 +22,8 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <gtksheet/gtkextra-marshal.c>
+#include <gtk/gtk.h>
+#include <gtksheet/gtkextra-marshal.h>
 
 #include "psppire-object.h"
 #include "psppire-dict.h"
@@ -40,6 +41,8 @@ static void psppire_dict_class_init   (PsppireDictClass       *class);
 static void psppire_dict_init  (PsppireDict            *dict);
 static void psppire_dict_finalize      (GObject                *object);
 
+static void dictionary_tree_model_init(GtkTreeModelIface *iface);
+
 
 /* --- variables --- */
 static GObjectClass     *parent_class = NULL;
@@ -77,8 +80,20 @@ psppire_dict_get_type (void)
        (GInstanceInitFunc) psppire_dict_init,
       };
 
-      object_type = g_type_register_static (G_TYPE_PSPPIRE_OBJECT, "PsppireDict",
+      static const GInterfaceInfo tree_model_info = {
+       (GInterfaceInitFunc) dictionary_tree_model_init, 
+       NULL, 
+       NULL
+      };
+
+      object_type = g_type_register_static (G_TYPE_PSPPIRE_OBJECT, 
+                                           "PsppireDict",
                                            &object_info, 0);
+
+      g_type_add_interface_static(object_type, GTK_TYPE_TREE_MODEL, 
+                                 &tree_model_info);
+
+
     }
 
   return object_type;
@@ -157,6 +172,8 @@ psppire_dict_init (PsppireDict *psppire_dict)
 
   psppire_dict->variables = 0; 
   psppire_dict->cache_size = 0;
+
+  psppire_dict->stamp = g_random_int();
 }
 
 /**
@@ -427,3 +444,214 @@ psppire_dict_get_next_value_idx (const PsppireDict *dict)
 {
   return dict_get_next_value_idx(dict->dict);
 }
+
+
+
+/* Tree Model Stuff */
+
+static GtkTreeModelFlags tree_model_get_flags(GtkTreeModel *model);
+
+static gint tree_model_n_columns(GtkTreeModel *model);
+
+static GType tree_model_column_type(GtkTreeModel *model, gint index);
+
+static gboolean tree_model_get_iter(GtkTreeModel *model, GtkTreeIter *iter, 
+                                   GtkTreePath *path);
+
+static gboolean tree_model_iter_next(GtkTreeModel *model, GtkTreeIter *iter);
+
+static GtkTreePath * tree_model_get_path(GtkTreeModel *model, 
+                                        GtkTreeIter *iter);
+
+static void tree_model_get_value(GtkTreeModel *model, GtkTreeIter *iter,
+                                gint column, GValue *value);
+
+static gboolean tree_model_nth_child(GtkTreeModel *model, GtkTreeIter *iter, 
+                                    GtkTreeIter *parent, gint n);
+
+
+static void
+dictionary_tree_model_init(GtkTreeModelIface *iface)
+{
+  iface->get_flags = tree_model_get_flags;
+  iface->get_n_columns = tree_model_n_columns;
+  iface->get_column_type = tree_model_column_type;
+  iface->get_iter = tree_model_get_iter;
+  iface->iter_next = tree_model_iter_next;
+  iface->get_path = tree_model_get_path;
+  iface->get_value = tree_model_get_value;
+
+  iface->iter_children = 0;
+  iface->iter_has_child =0;
+  iface->iter_n_children =0;
+  iface->iter_nth_child = tree_model_nth_child ;
+  iface->iter_parent =0;
+}
+
+static GtkTreeModelFlags
+tree_model_get_flags(GtkTreeModel *model)
+{
+  g_return_val_if_fail(G_IS_PSPPIRE_DICT(model), (GtkTreeModelFlags) 0);
+
+  return GTK_TREE_MODEL_LIST_ONLY;
+}
+
+
+static gint
+tree_model_n_columns(GtkTreeModel *model)
+{
+  return n_DICT_COLS;
+}
+
+static GType
+tree_model_column_type(GtkTreeModel *model, gint index)
+{
+ g_return_val_if_fail(G_IS_PSPPIRE_DICT(model), (GType) 0);
+
+ switch(index) 
+   {
+   case DICT_TVM_COL_NAME:
+     return G_TYPE_STRING;
+     break;
+   case DICT_TVM_COL_VAR:
+     return G_TYPE_POINTER;
+     break;
+   default:
+     g_return_val_if_reached((GType)0);
+     break;
+   }
+
+ g_assert_not_reached();
+ return ((GType)0);
+}
+
+static gboolean
+tree_model_get_iter(GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path)
+{
+  gint *indices, depth;
+  gint n;
+  struct PsppireVariable *variable;
+
+  PsppireDict *dict = PSPPIRE_DICT (model);
+
+  g_return_val_if_fail(path, FALSE);
+
+  indices = gtk_tree_path_get_indices(path);
+  depth = gtk_tree_path_get_depth(path);
+
+  g_return_val_if_fail(depth == 1, FALSE);
+
+  n = indices[0];
+
+  if ( n < 0 || n >= psppire_dict_get_var_cnt(dict)) 
+    return FALSE;
+
+  variable = psppire_dict_get_variable(dict, n);
+
+  g_assert(psppire_variable_get_index(variable) == n);
+
+  iter->stamp = dict->stamp;
+  iter->user_data = variable; 
+
+  return TRUE;
+}
+
+
+static gboolean
+tree_model_iter_next(GtkTreeModel *model, GtkTreeIter *iter)
+{
+  PsppireDict *dict = PSPPIRE_DICT (model);
+  struct PsppireVariable *variable;
+  gint idx;
+
+  g_return_val_if_fail(iter->stamp == dict->stamp, FALSE);
+
+  if ( iter == NULL || iter->user_data == NULL)
+    return FALSE;
+
+  variable = (struct PsppireVariable *) iter->user_data;
+
+  idx = psppire_variable_get_index(variable);
+  
+  if ( idx + 1 >= psppire_dict_get_var_cnt(dict))
+    return FALSE;
+
+  variable = psppire_dict_get_variable(dict, idx + 1);
+
+  g_assert(psppire_variable_get_index(variable) == idx + 1);
+  
+  iter->user_data = variable;
+
+  return TRUE;
+}
+
+static GtkTreePath *
+tree_model_get_path(GtkTreeModel *model, GtkTreeIter *iter)
+{
+  GtkTreePath *path;
+  struct PsppireVariable *variable;
+  PsppireDict *dict = PSPPIRE_DICT (model);
+
+  g_return_val_if_fail(iter->stamp == dict->stamp, FALSE);
+
+  variable = (struct PsppireVariable *) iter->user_data;
+
+  path = gtk_tree_path_new();
+  gtk_tree_path_append_index(path, psppire_variable_get_index(variable));
+
+  return path;
+}
+
+
+static void
+tree_model_get_value(GtkTreeModel *model, GtkTreeIter *iter,
+                    gint column, GValue *value)
+{
+  struct PsppireVariable *variable;
+  PsppireDict *dict = PSPPIRE_DICT (model);
+
+  g_return_if_fail(iter->stamp == dict->stamp);
+
+  variable = (struct PsppireVariable *) iter->user_data;
+
+  switch(column)
+    {
+    case DICT_TVM_COL_NAME:
+      g_value_init(value, G_TYPE_STRING);
+      g_value_set_string(value, psppire_variable_get_name(variable));
+      break;
+    case DICT_TVM_COL_VAR:
+      g_value_init(value, G_TYPE_POINTER);
+      g_value_set_pointer(value, variable);
+      break;
+    default:
+      g_return_if_reached();
+      break;
+    }
+}
+
+
+static gboolean
+tree_model_nth_child(GtkTreeModel *model, GtkTreeIter *iter, 
+                    GtkTreeIter *parent, gint n)
+{
+  PsppireDict *dict;
+  g_return_val_if_fail(G_IS_PSPPIRE_DICT(model), FALSE);
+
+  dict = PSPPIRE_DICT(model);
+
+  if ( parent ) 
+    return FALSE;
+
+  if ( n >= psppire_dict_get_var_cnt(dict) ) 
+    return FALSE;
+
+  iter->stamp = dict->stamp;
+  iter->user_data = psppire_dict_get_variable(dict, n);
+
+  if ( !iter->user_data) 
+    return FALSE;
+  
+  
+  return TRUE;
+}
index 385d0671b42239c85a94244400c68fabfad2f201..218cae0d764aebd126ae3729db1266fa3b2a5b6b 100644 (file)
@@ -47,6 +47,8 @@ G_BEGIN_DECLS
 typedef struct _PsppireDict       PsppireDict;
 typedef struct _PsppireDictClass PsppireDictClass;
 
+enum {DICT_TVM_COL_NAME=0, DICT_TVM_COL_VAR, n_DICT_COLS} ;
+
 struct _PsppireDict
 {
   GObject             parent;
@@ -56,6 +58,9 @@ struct _PsppireDict
   struct PsppireVariable **variables;
 
   gint cache_size;
+
+  /* For GtkTreeModelIface */
+  gint stamp;
 };
 
 struct _PsppireDictClass
index 1256c82f98ec47075aef2f0ba193e54866357f26..3fa71ea30b5330fe194df1e6fd8e4745f286b527 100644 (file)
@@ -346,9 +346,8 @@ psppire_variable_get_width(const struct PsppireVariable *pv)
 }
 
 
-/* FIXME: This name is misleading */
 gint
-psppire_variable_get_index(const struct PsppireVariable *pv)
+psppire_variable_get_fv(const struct PsppireVariable *pv)
 {
   g_return_val_if_fail(pv, -1);
   g_return_val_if_fail(pv->v, -1);
@@ -356,3 +355,14 @@ psppire_variable_get_index(const struct PsppireVariable *pv)
   return pv->v->fv;
 }
 
+
+
+gint
+psppire_variable_get_index(const struct PsppireVariable *pv)
+{
+  g_return_val_if_fail(pv, -1);
+  g_return_val_if_fail(pv->v, -1);
+
+  return pv->v->index;
+}
+
index 815086a64b5b10b3e16a0d7c2379e5ea00859025..248844eb84a77d4036a5bbbfb0c552797b541330 100644 (file)
@@ -82,12 +82,13 @@ gint psppire_variable_get_alignment(const struct PsppireVariable *pv);
 
 gint psppire_variable_get_measure(const struct PsppireVariable *pv);
 
-gint psppire_variable_get_index(const struct PsppireVariable *pv);
+gint psppire_variable_get_fv(const struct PsppireVariable *pv);
 
 gint psppire_variable_get_type(const struct PsppireVariable *pv);
 
 gint psppire_variable_get_width(const struct PsppireVariable *pv);
 
+gint psppire_variable_get_index(const struct PsppireVariable *pv);
 
 
 #endif /* __PSPPIRE_VARIABLE_H__ */
index e6f25b3b44eca926c80e6bf48a64333255a6b320..2124f484e05256c19a67e592f37cbbd55a65eaac 100644 (file)
@@ -5,7 +5,7 @@
 
 <widget class="GtkWindow" id="data_editor">
   <property name="visible">True</property>
-  <property name="title" translatable="no">Psppire</property>
+  <property name="title">Psppire</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
@@ -19,6 +19,7 @@
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
 
   <child>
     <widget class="GtkVBox" id="vbox1">
@@ -29,6 +30,8 @@
       <child>
        <widget class="GtkMenuBar" id="menubar1">
          <property name="visible">True</property>
+         <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
+         <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
 
          <child>
            <widget class="GtkMenuItem" id="menuitem1">
                  </child>
 
                  <child>
-                   <widget class="GtkMenuItem" id="toolbars1">
+                   <widget class="GtkMenuItem" id="toolbars">
                      <property name="label" translatable="yes">Toolbars</property>
                      <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_toolbars1_activate" last_modification_time="Thu, 24 Nov 2005 10:41:14 GMT"/>
                    </widget>
                  </child>
 
                  </child>
 
                  <child>
-                   <widget class="GtkCheckMenuItem" id="value_labels1">
+                   <widget class="GtkCheckMenuItem" id="menuitem-value-labels">
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Value Labels</property>
                      <property name="use_underline">True</property>
                      <property name="active">False</property>
-                     <signal name="activate" handler="on_value_labels1_activate" last_modification_time="Thu, 24 Nov 2005 10:42:04 GMT"/>
+                     <signal name="activate" handler="on_value_labels_activate" last_modification_time="Thu, 24 Nov 2005 10:42:04 GMT"/>
                    </widget>
                  </child>
 
          <child>
            <widget class="GtkMenuItem" id="menuitem4">
              <property name="visible">True</property>
-             <property name="label" translatable="yes">_Help</property>
+             <property name="label" translatable="yes">_Data</property>
              <property name="use_underline">True</property>
 
              <child>
                <widget class="GtkMenu" id="menuitem4_menu">
 
+                 <child>
+                   <widget class="GtkMenuItem" id="insert_variable1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Insert Variable</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="insert_cases1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Insert Cases</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="go_to_case">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Go To Case</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="on_go_to_case_activate" last_modification_time="Mon, 19 Jun 2006 10:29:37 GMT"/>
+
+                     <child internal-child="image">
+                       <widget class="GtkImage" id="image1">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-jump-to</property>
+                         <property name="icon_size">1</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separator4">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="sort_cases">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Sort Cases</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="on_sort_cases_activate" last_modification_time="Tue, 20 Jun 2006 10:27:11 GMT"/>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="transpose1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Transpose</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="restructure1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Restructure</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="merge_files1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Merge Files</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="aggregate1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Aggregate</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separator5">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="split_file1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Split File</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="select_cases1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Select Cases</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="weight_cases1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Weight Cases</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem5">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_Help</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem5_menu">
+
                  <child>
                    <widget class="GtkMenuItem" id="about1">
                      <property name="visible">True</property>
            <widget class="GtkToolbar" id="toolbar1">
              <property name="visible">True</property>
              <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
-             <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+             <property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
              <property name="tooltips">True</property>
              <property name="show_arrow">True</property>
 
                <widget class="GtkToolButton" id="buttonOpen">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Open</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
                  <property name="stock_id">gtk-open</property>
                  <property name="visible_horizontal">True</property>
                  <property name="visible_vertical">True</property>
                <widget class="GtkToolButton" id="buttonSave">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Save</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
                  <property name="stock_id">gtk-save</property>
                  <property name="visible_horizontal">True</property>
                  <property name="visible_vertical">True</property>
                <widget class="GtkToolButton" id="buttonPrint">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Print</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
                  <property name="stock_id">gtk-print</property>
                  <property name="visible_horizontal">True</property>
                  <property name="visible_vertical">True</property>
                  <property name="homogeneous">False</property>
                </packing>
              </child>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
 
-      <child>
-       <widget class="GtkNotebook" id="notebook1">
-         <property name="visible">True</property>
-         <property name="can_focus">True</property>
-         <property name="show_tabs">True</property>
-         <property name="show_border">True</property>
-         <property name="tab_pos">GTK_POS_BOTTOM</property>
-         <property name="scrollable">True</property>
-         <property name="enable_popup">True</property>
+             <child>
+               <widget class="GtkToolButton" id="toolbutton1">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Undo</property>
+                 <property name="stock_id">gtk-undo</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
 
-         <child>
-           <widget class="GtkVBox" id="vbox3">
-             <property name="visible">True</property>
-             <property name="homogeneous">False</property>
-             <property name="spacing">0</property>
+             <child>
+               <widget class="GtkToolButton" id="toolbutton2">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Redo</property>
+                 <property name="stock_id">gtk-redo</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
 
              <child>
-               <widget class="GtkTable" id="table2">
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem2">
                  <property name="visible">True</property>
-                 <property name="n_rows">1</property>
-                 <property name="n_columns">2</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
                  <property name="homogeneous">False</property>
-                 <property name="row_spacing">0</property>
-                 <property name="column_spacing">0</property>
-
-                 <child>
-                   <widget class="GtkEntry" id="entry4">
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="editable">True</property>
-                     <property name="visibility">True</property>
-                     <property name="max_length">0</property>
-                     <property name="text" translatable="yes"></property>
-                     <property name="has_frame">True</property>
-                     <property name="invisible_char">*</property>
-                     <property name="activates_default">False</property>
-                   </widget>
-                   <packing>
-                     <property name="left_attach">1</property>
-                     <property name="right_attach">2</property>
-                     <property name="top_attach">0</property>
-                     <property name="bottom_attach">1</property>
-                     <property name="y_options"></property>
-                   </packing>
-                 </child>
+               </packing>
+             </child>
 
-                 <child>
-                   <widget class="GtkEntry" id="cell_ref_entry">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="editable">False</property>
-                     <property name="visibility">True</property>
-                     <property name="max_length">0</property>
-                     <property name="text" translatable="yes"></property>
-                     <property name="has_frame">True</property>
-                     <property name="invisible_char">*</property>
-                     <property name="activates_default">False</property>
-                     <property name="width_chars">25</property>
-                   </widget>
-                   <packing>
-                     <property name="left_attach">0</property>
-                     <property name="right_attach">1</property>
-                     <property name="top_attach">0</property>
-                     <property name="bottom_attach">1</property>
-                     <property name="x_options">fill</property>
-                     <property name="y_options"></property>
-                   </packing>
-                 </child>
+             <child>
+               <widget class="GtkToolButton" id="buttonGotoCase">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Go To Case</property>
+                 <property name="stock_id">gtk-jump-to</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <signal name="clicked" handler="on_go_to_case_activate" last_modification_time="Mon, 19 Jun 2006 11:41:44 GMT"/>
                </widget>
                <packing>
-                 <property name="padding">0</property>
                  <property name="expand">False</property>
-                 <property name="fill">False</property>
+                 <property name="homogeneous">True</property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkScrolledWindow" id="scrolledwindow1">
+               <widget class="GtkToolButton" id="variables">
                  <property name="visible">True</property>
-                 <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-                 <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-                 <property name="shadow_type">GTK_SHADOW_NONE</property>
-                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                 <child>
-                   <widget class="Custom" id="data_sheet">
-                     <property name="visible">True</property>
-                     <property name="creation_function">psppire_data_sheet_create</property>
-                     <property name="int1">0</property>
-                     <property name="int2">0</property>
-                     <property name="last_modification_time">Sun, 30 Oct 2005 08:53:47 GMT</property>
-                   </widget>
-                 </child>
+                 <property name="tooltip" translatable="yes">Variables</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
                </widget>
                <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
                </packing>
              </child>
-           </widget>
-           <packing>
-             <property name="tab_expand">False</property>
-             <property name="tab_fill">True</property>
-           </packing>
-         </child>
 
-         <child>
-           <widget class="GtkLabel" id="label1">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">Data View</property>
-             <property name="use_underline">False</property>
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem5">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton3">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Find</property>
+                 <property name="stock_id">gtk-find</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem4">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="insert_case">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Insert Case</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="insert_variable">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Insert Variable</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem6">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton8">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Split File</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton9">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Weight Cases</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton10">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Select Cases</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem7">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToggleToolButton" id="togglebutton-value-labels">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Value Labels</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <property name="active">False</property>
+                 <signal name="toggled" handler="on_togglebutton_value_labels_toggled" last_modification_time="Mon, 19 Jun 2006 13:09:37 GMT"/>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton12">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Use Sets</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkNotebook" id="notebook1">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="show_tabs">True</property>
+         <property name="show_border">True</property>
+         <property name="tab_pos">GTK_POS_BOTTOM</property>
+         <property name="scrollable">True</property>
+         <property name="enable_popup">True</property>
+
+         <child>
+           <widget class="GtkVBox" id="vbox3">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkTable" id="table2">
+                 <property name="visible">True</property>
+                 <property name="n_rows">1</property>
+                 <property name="n_columns">2</property>
+                 <property name="homogeneous">False</property>
+                 <property name="row_spacing">0</property>
+                 <property name="column_spacing">0</property>
+
+                 <child>
+                   <widget class="GtkEntry" id="entry4">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="editable">True</property>
+                     <property name="visibility">True</property>
+                     <property name="max_length">0</property>
+                     <property name="text" translatable="yes"></property>
+                     <property name="has_frame">True</property>
+                     <property name="invisible_char">*</property>
+                     <property name="activates_default">False</property>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">1</property>
+                     <property name="right_attach">2</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkEntry" id="cell_ref_entry">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="editable">False</property>
+                     <property name="visibility">True</property>
+                     <property name="max_length">0</property>
+                     <property name="text" translatable="yes"></property>
+                     <property name="has_frame">True</property>
+                     <property name="invisible_char">*</property>
+                     <property name="activates_default">False</property>
+                     <property name="width_chars">25</property>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                 <property name="visible">True</property>
+                 <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                 <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                 <property name="shadow_type">GTK_SHADOW_NONE</property>
+                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                 <child>
+                   <widget class="Custom" id="data_sheet">
+                     <property name="visible">True</property>
+                     <property name="creation_function">psppire_data_sheet_create</property>
+                     <property name="int1">0</property>
+                     <property name="int2">0</property>
+                     <property name="last_modification_time">Sun, 30 Oct 2005 08:53:47 GMT</property>
+                   </widget>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label1">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Data View</property>
+             <property name="use_underline">False</property>
              <property name="use_markup">False</property>
              <property name="justify">GTK_JUSTIFY_LEFT</property>
              <property name="wrap">False</property>
 
 <widget class="GtkAboutDialog" id="aboutdialog1">
   <property name="destroy_with_parent">False</property>
-  <property name="name" translatable="no">PSPPire</property>
-  <property name="copyright" translatable="no">Free Software Foundation</property>
+  <property name="name">PSPPire</property>
+  <property name="copyright">Free Software Foundation</property>
   <property name="comments" translatable="yes">This is pre-alpha software.  It probably will not work.</property>
   <property name="license" translatable="yes">    This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     02110-1301, USA.
 </property>
+  <property name="wrap_license">False</property>
   <property name="website">http://www.gnu.org/software/pspp</property>
   <property name="authors">John Darrington</property>
   <property name="artists">Patrick Brunier</property>
-  <property name="translator_credits" translatable="no" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
+  <property name="translator_credits"></property>
   <property name="logo">pspplogo.png</property>
 </widget>
 
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
 
   <child>
     <widget class="GtkHBox" id="hbox1">
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
 
   <child>
     <widget class="GtkHBox" id="hbox3">
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
 
   <child>
     <widget class="GtkTable" id="table6">
                    </widget>
                    <packing>
                      <property name="padding">20</property>
-                     <property name="expand">True</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="left_attach">0</property>
+         <property name="right_attach">1</property>
+         <property name="top_attach">0</property>
+         <property name="bottom_attach">1</property>
+         <property name="y_options">fill</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVBox" id="vbox7">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkRadioButton" id="range_missing">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">_Range plus one optional discrete missing value</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">False</property>
+             <property name="active">False</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+             <property name="group">no_missing</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkVBox" id="vbox8">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">5</property>
+
+             <child>
+               <widget class="GtkHBox" id="hbox7">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox8">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label11">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_Low:</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="mnemonic_widget">mv-low</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">20</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkEntry" id="mv-low">
+                         <property name="width_request">75</property>
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="editable">True</property>
+                         <property name="visibility">True</property>
+                         <property name="max_length">0</property>
+                         <property name="text" translatable="yes"></property>
+                         <property name="has_frame">True</property>
+                         <property name="invisible_char">*</property>
+                         <property name="activates_default">False</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox9">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label12">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_High:</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="mnemonic_widget">mv-high</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkEntry" id="mv-high">
+                         <property name="width_request">75</property>
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="editable">True</property>
+                         <property name="visibility">True</property>
+                         <property name="max_length">0</property>
+                         <property name="text" translatable="yes"></property>
+                         <property name="has_frame">True</property>
+                         <property name="invisible_char">*</property>
+                         <property name="activates_default">False</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">5</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">20</property>
+                     <property name="expand">True</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <placeholder/>
+                 </child>
+
+                 <child>
+                   <placeholder/>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkHBox" id="hbox6">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label10">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Di_screte value:</property>
+                     <property name="use_underline">True</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                     <property name="mnemonic_widget">mv-discrete</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">20</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkEntry" id="mv-discrete">
+                     <property name="width_request">75</property>
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="editable">True</property>
+                     <property name="visibility">True</property>
+                     <property name="max_length">0</property>
+                     <property name="text" translatable="yes"></property>
+                     <property name="has_frame">True</property>
+                     <property name="invisible_char">*</property>
+                     <property name="activates_default">False</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
                      <property name="fill">True</property>
                    </packing>
                  </child>
            </widget>
            <packing>
              <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
            </packing>
          </child>
        </widget>
        <packing>
          <property name="left_attach">0</property>
-         <property name="right_attach">1</property>
-         <property name="top_attach">0</property>
-         <property name="bottom_attach">1</property>
-         <property name="y_options">fill</property>
+         <property name="right_attach">2</property>
+         <property name="top_attach">1</property>
+         <property name="bottom_attach">2</property>
+         <property name="x_options">fill</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="go_to_case_dialog">
+  <property name="title" translatable="yes">Go To Case</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+       <widget class="GtkHButtonBox" id="dialog-action_area1">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+         <child>
+           <widget class="GtkButton" id="button_go_to_case_ok">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-ok</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="response_id">-5</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">True</property>
+         <property name="pack_type">GTK_PACK_END</property>
        </packing>
       </child>
 
       <child>
-       <widget class="GtkVBox" id="vbox7">
+       <widget class="GtkHBox" id="hbox11">
          <property name="visible">True</property>
          <property name="homogeneous">False</property>
-         <property name="spacing">0</property>
+         <property name="spacing">3</property>
 
          <child>
-           <widget class="GtkRadioButton" id="range_missing">
+           <widget class="GtkLabel" id="label14">
              <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">_Range plus one optional discrete missing value</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">False</property>
-             <property name="active">False</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-             <property name="group">no_missing</property>
+             <property name="label" translatable="yes">Case Number:</property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
            </widget>
            <packing>
              <property name="padding">0</property>
          </child>
 
          <child>
-           <widget class="GtkVBox" id="vbox8">
+           <widget class="GtkEntry" id="entry_go_to_case">
+             <property name="width_request">50</property>
              <property name="visible">True</property>
-             <property name="homogeneous">False</property>
-             <property name="spacing">5</property>
+             <property name="can_focus">True</property>
+             <property name="editable">True</property>
+             <property name="visibility">True</property>
+             <property name="max_length">0</property>
+             <property name="text" translatable="yes"></property>
+             <property name="has_frame">True</property>
+             <property name="invisible_char">*</property>
+             <property name="activates_default">False</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
 
-             <child>
-               <widget class="GtkHBox" id="hbox7">
-                 <property name="visible">True</property>
-                 <property name="homogeneous">False</property>
-                 <property name="spacing">0</property>
+<widget class="GtkWindow" id="sort-cases-dialog">
+  <property name="border_width">10</property>
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">Sort Cases</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
 
-                 <child>
-                   <widget class="GtkHBox" id="hbox8">
-                     <property name="visible">True</property>
-                     <property name="homogeneous">False</property>
-                     <property name="spacing">0</property>
+  <child>
+    <widget class="GtkHBox" id="hbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">9</property>
 
-                     <child>
-                       <widget class="GtkLabel" id="label11">
-                         <property name="visible">True</property>
-                         <property name="label" translatable="yes">_Low:</property>
-                         <property name="use_underline">True</property>
-                         <property name="use_markup">False</property>
-                         <property name="justify">GTK_JUSTIFY_LEFT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                         <property name="mnemonic_widget">mv-low</property>
-                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                         <property name="width_chars">-1</property>
-                         <property name="single_line_mode">False</property>
-                         <property name="angle">0</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">20</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
-                       </packing>
-                     </child>
+      <child>
+       <widget class="GtkScrolledWindow" id="scrolledwindow6">
+         <property name="border_width">10</property>
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+         <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+         <property name="shadow_type">GTK_SHADOW_IN</property>
+         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
-                     <child>
-                       <widget class="GtkEntry" id="mv-low">
-                         <property name="width_request">75</property>
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">True</property>
-                       </packing>
-                     </child>
+         <child>
+           <widget class="GtkTreeView" id="sort-cases-treeview-dict">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="headers_visible">False</property>
+             <property name="rules_hint">False</property>
+             <property name="reorderable">True</property>
+             <property name="enable_search">True</property>
+             <property name="fixed_height_mode">True</property>
+             <property name="hover_selection">False</property>
+             <property name="hover_expand">False</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkAlignment" id="alignment3">
+         <property name="visible">True</property>
+         <property name="xalign">0.5</property>
+         <property name="yalign">0.25</property>
+         <property name="xscale">0.460000008345</property>
+         <property name="yscale">0.0799999982119</property>
+         <property name="top_padding">0</property>
+         <property name="bottom_padding">0</property>
+         <property name="left_padding">0</property>
+         <property name="right_padding">0</property>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-button">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+
+             <child>
+               <widget class="GtkArrow" id="sort-cases-arrow">
+                 <property name="visible">True</property>
+                 <property name="arrow_type">GTK_ARROW_RIGHT</property>
+                 <property name="shadow_type">GTK_SHADOW_OUT</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVBox" id="vbox11">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">4</property>
+
+         <child>
+           <widget class="GtkFrame" id="Sort Order">
+             <property name="height_request">75</property>
+             <property name="visible">True</property>
+             <property name="label_xalign">0</property>
+             <property name="label_yalign">0.5</property>
+             <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox13">
+                 <property name="border_width">12</property>
+                 <property name="height_request">66</property>
+                 <property name="visible">True</property>
+                 <property name="homogeneous">True</property>
+                 <property name="spacing">5</property>
+
+                 <child>
+                   <widget class="GtkRadioButton" id="sort-cases-button-ascending">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Ascending</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
-                     <property name="expand">True</property>
-                     <property name="fill">True</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
                    </packing>
                  </child>
 
                  <child>
-                   <widget class="GtkHBox" id="hbox9">
+                   <widget class="GtkRadioButton" id="radiobutton-descending">
                      <property name="visible">True</property>
-                     <property name="homogeneous">False</property>
-                     <property name="spacing">0</property>
-
-                     <child>
-                       <widget class="GtkLabel" id="label12">
-                         <property name="visible">True</property>
-                         <property name="label" translatable="yes">_High:</property>
-                         <property name="use_underline">True</property>
-                         <property name="use_markup">False</property>
-                         <property name="justify">GTK_JUSTIFY_LEFT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                         <property name="mnemonic_widget">mv-high</property>
-                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                         <property name="width_chars">-1</property>
-                         <property name="single_line_mode">False</property>
-                         <property name="angle">0</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkEntry" id="mv-high">
-                         <property name="width_request">75</property>
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">5</property>
-                         <property name="expand">True</property>
-                         <property name="fill">True</property>
-                       </packing>
-                     </child>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Descending</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                     <property name="group">sort-cases-button-ascending</property>
                    </widget>
                    <packing>
-                     <property name="padding">20</property>
-                     <property name="expand">True</property>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
                      <property name="fill">False</property>
                    </packing>
                  </child>
+               </widget>
+             </child>
 
-                 <child>
-                   <placeholder/>
-                 </child>
+             <child>
+               <widget class="GtkLabel" id="label15">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Sort Order</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="type">label_item</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">True</property>
+             <property name="pack_type">GTK_PACK_END</property>
+           </packing>
+         </child>
 
-                 <child>
-                   <placeholder/>
-                 </child>
+         <child>
+           <widget class="GtkVBox" id="vbox12">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkLabel" id="label16">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Sort by:</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
                </widget>
                <packing>
                  <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkHBox" id="hbox6">
+               <widget class="GtkScrolledWindow" id="scrolledwindow7">
                  <property name="visible">True</property>
-                 <property name="homogeneous">False</property>
-                 <property name="spacing">0</property>
-
-                 <child>
-                   <widget class="GtkLabel" id="label10">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Di_screte value:</property>
-                     <property name="use_underline">True</property>
-                     <property name="use_markup">False</property>
-                     <property name="justify">GTK_JUSTIFY_LEFT</property>
-                     <property name="wrap">False</property>
-                     <property name="selectable">False</property>
-                     <property name="xalign">0.5</property>
-                     <property name="yalign">0.5</property>
-                     <property name="xpad">0</property>
-                     <property name="ypad">0</property>
-                     <property name="mnemonic_widget">mv-discrete</property>
-                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                     <property name="width_chars">-1</property>
-                     <property name="single_line_mode">False</property>
-                     <property name="angle">0</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">20</property>
-                     <property name="expand">False</property>
-                     <property name="fill">False</property>
-                   </packing>
-                 </child>
+                 <property name="can_focus">True</property>
+                 <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                 <property name="shadow_type">GTK_SHADOW_IN</property>
+                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
                  <child>
-                   <widget class="GtkEntry" id="mv-discrete">
-                     <property name="width_request">75</property>
+                   <widget class="GtkTreeView" id="sort-cases-treeview-criteria">
                      <property name="visible">True</property>
                      <property name="can_focus">True</property>
-                     <property name="editable">True</property>
-                     <property name="visibility">True</property>
-                     <property name="max_length">0</property>
-                     <property name="text" translatable="yes"></property>
-                     <property name="has_frame">True</property>
-                     <property name="invisible_char">*</property>
-                     <property name="activates_default">False</property>
+                     <property name="headers_visible">False</property>
+                     <property name="rules_hint">False</property>
+                     <property name="reorderable">False</property>
+                     <property name="enable_search">True</property>
+                     <property name="fixed_height_mode">True</property>
+                     <property name="hover_selection">False</property>
+                     <property name="hover_expand">False</property>
                    </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">False</property>
-                     <property name="fill">True</property>
-                   </packing>
                  </child>
                </widget>
                <packing>
              <property name="padding">0</property>
              <property name="expand">True</property>
              <property name="fill">True</property>
+             <property name="pack_type">GTK_PACK_END</property>
            </packing>
          </child>
        </widget>
        <packing>
-         <property name="left_attach">0</property>
-         <property name="right_attach">2</property>
-         <property name="top_attach">1</property>
-         <property name="bottom_attach">2</property>
-         <property name="x_options">fill</property>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVButtonBox" id="vbuttonbox7">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-ok">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-ok</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-paste">
+             <property name="visible">True</property>
+             <property name="sensitive">False</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-paste</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-reset">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-refresh</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-cancel">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-cancel</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="help_button_sort_cases">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-help</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">6</property>
+         <property name="expand">True</property>
+         <property name="fill">False</property>
        </packing>
       </child>
     </widget>
diff --git a/src/ui/gui/sort-cases-dialog.c b/src/ui/gui/sort-cases-dialog.c
new file mode 100644 (file)
index 0000000..cdf30ca
--- /dev/null
@@ -0,0 +1,484 @@
+/* 
+    PSPPIRE --- A Graphical User Interface for PSPP
+    Copyright (C) 2006  Free Software Foundation
+    Written by John Darrington
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA. */
+
+/*  This module describes the behaviour of the Sort Cases dialog box. */
+
+
+/* This code is rather quick and dirty.  Some of the issues are:
+
+   1. Character set conversion when displaying dictionary tree view.
+
+   2. The interaction between the dictionary treeview, the criteria
+      list treeview and the button, needs to be abstracted and made
+      available as an external interface.
+
+   3. There's no destroy function for this dialog.
+
+   4. Some of the functionality might be better implemented with
+      GtkAction.
+
+   5. Double clicking the tree view rows should insert/delete them
+      from the criteria list.
+
+   6. Changing the Ascending/Descending flag ought to be possible for
+      a criteria already in the criteria tree view.
+
+   7. Variables which are in the criteria tree view should not be
+      shown in the dictionary treeview.
+
+   8. The dialog box structure itself ought to be a GtkWindow and
+      abstracted better.
+*/
+   
+
+
+#include <config.h>
+#include "helper.h"
+#include "sort-cases-dialog.h"
+#include "psppire-dict.h"
+#include <math/sort.h>
+#include "psppire-variable.h"
+
+#include <gettext.h>
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
+enum {CRIT_TVM_IDX = 0, CRIT_TVM_DIR};
+
+/* Occurs when the dictionary tree view selection changes */
+static void
+dictionary_selection_changed (GtkTreeSelection *selection,
+                             gpointer data)
+{
+  GtkTreeSelection *otherselection ;
+  struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
+
+  if ( 0 == gtk_tree_selection_count_selected_rows(selection) ) 
+    return ;
+
+  gtk_arrow_set(dialog->arrow, GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
+  dialog->button_state = VAR_SELECT;
+  
+  otherselection = gtk_tree_view_get_selection(dialog->criteria_view);
+
+  gtk_tree_selection_unselect_all(otherselection);
+}
+
+
+/* Occurs when the sort criteria tree view selection changes */
+static void
+criteria_selection_changed (GtkTreeSelection *selection,
+                           gpointer data)
+{
+  GtkTreeSelection *otherselection ;
+  struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
+
+  if ( 0 == gtk_tree_selection_count_selected_rows(selection) ) 
+    return ;
+
+  otherselection = gtk_tree_view_get_selection(dialog->dict_view);
+
+  gtk_arrow_set(dialog->arrow, GTK_ARROW_LEFT, GTK_SHADOW_OUT);
+  dialog->button_state = VAR_DESELECT;
+
+  gtk_tree_selection_unselect_all(otherselection);
+}
+
+
+/* Occurs when the dialog box is deleted (eg: closed via the title bar) */
+static gint
+delete_event_callback(GtkWidget *widget,
+                     GdkEvent  *event,
+                     gpointer   data)      
+{
+  struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
+
+  g_main_loop_quit(dialog->loop);
+
+  gtk_widget_hide_on_delete(widget);
+
+  dialog->response = GTK_RESPONSE_DELETE_EVENT;
+
+  return TRUE;
+}
+
+/* Occurs when the cancel button is clicked */
+static void
+sort_cases_cancel_callback(GObject *obj, gpointer data)
+{
+  struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
+
+  gtk_widget_hide(dialog->window);
+
+  g_main_loop_quit(dialog->loop);
+
+  dialog->response = GTK_RESPONSE_CANCEL;
+}
+
+/* Occurs when the reset button is clicked */
+static void
+sort_cases_reset_callback(GObject *obj, gpointer data)
+{
+  struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
+  
+  gtk_arrow_set(dialog->arrow, GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
+  dialog->button_state = VAR_SELECT;
+
+  gtk_list_store_clear(dialog->criteria_list);
+}
+
+
+/* Add variables currently selected in the dictionary tree view to the
+   list of criteria */
+static void
+select_criteria(GtkTreeModel *model, GtkTreePath *path,
+               GtkTreeIter *iter, gpointer data)
+{
+  GtkTreeIter new_iter;
+  gint index;
+  gint dir;
+  struct PsppireVariable *variable;
+  struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
+
+  /* Get the variable from the dictionary */
+  gtk_tree_model_get (model, iter, 
+                     DICT_TVM_COL_VAR, &variable,
+                     -1);
+       
+  index = psppire_variable_get_index(variable);
+
+  dir = gtk_toggle_button_get_active (dialog->ascending_button) ? 
+    SRT_ASCEND:SRT_DESCEND;
+
+  /* Append to the list of criteria */
+  gtk_list_store_append(dialog->criteria_list, &new_iter);
+  gtk_list_store_set(dialog->criteria_list, 
+                    &new_iter, CRIT_TVM_IDX, index, -1);
+  gtk_list_store_set(dialog->criteria_list, 
+                    &new_iter, CRIT_TVM_DIR, dir, -1);
+}
+
+/* Create a list of the RowRefs which are to be removed from the
+   criteria list */
+static void
+path_to_row_ref(GtkTreeModel *model, GtkTreePath *path,
+               GtkTreeIter *iter, gpointer data)
+{
+  GList **rrlist = data;
+  GtkTreeRowReference *rowref = gtk_tree_row_reference_new(model, path);
+
+  *rrlist = g_list_append(*rrlist, rowref);
+}
+
+
+/* Remove a row from the list of criteria */
+static void
+deselect_criteria(gpointer data, 
+                 gpointer user_data)
+{
+  GtkTreeIter iter;
+  GtkTreeRowReference *row_ref = data;
+  GtkTreePath *path;
+  struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) user_data;
+
+  path = gtk_tree_row_reference_get_path(row_ref);
+
+  gtk_tree_model_get_iter(GTK_TREE_MODEL(dialog->criteria_list), &iter, path);
+
+  gtk_list_store_remove(dialog->criteria_list, &iter);
+
+  gtk_tree_row_reference_free(row_ref);
+}
+
+
+
+/* Callback which occurs when the button to remove variables from the list
+   of criteria is clicked. */
+static void
+sort_cases_button_callback(GObject *obj, gpointer data)
+{
+  struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
+
+  if ( dialog->button_state == VAR_SELECT) /* Right facing arrow */
+    {
+      GtkTreeSelection *selection = 
+       gtk_tree_view_get_selection(dialog->dict_view);
+
+      gtk_tree_selection_selected_foreach(selection, select_criteria, dialog);
+    }
+  else   /* Left facing arrow */
+    {
+      GList *selectedRows = NULL;
+      GtkTreeSelection *selection = 
+       gtk_tree_view_get_selection(dialog->criteria_view);
+
+      /* Make a list of rows to be deleted */
+      gtk_tree_selection_selected_foreach(selection, path_to_row_ref, 
+                                         &selectedRows);
+
+      /* ... and delete them */
+      g_list_foreach(selectedRows, deselect_criteria, dialog);
+
+      g_list_free(selectedRows);
+    }
+}
+
+
+/* Callback which occurs when the OK button is clicked */
+static void
+sort_cases_ok_callback(GObject *obj, gpointer data)
+{
+  struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
+
+  gtk_widget_hide(dialog->window);
+  g_main_loop_quit(dialog->loop);
+
+  dialog->response = GTK_RESPONSE_OK;
+}
+
+
+/* This function is responsible for rendering a criterion in the
+   criteria list */
+static void
+criteria_render_func(GtkTreeViewColumn *column, GtkCellRenderer *renderer,
+                    GtkTreeModel *model, GtkTreeIter *iter,
+                    gpointer data)
+{
+  gint var_index;
+  struct PsppireVariable *variable ;
+  gint direction;
+  gchar *buf;
+  gchar *varname;
+  PsppireDict *dict  = data;
+
+  gtk_tree_model_get(model, iter, 
+                    CRIT_TVM_IDX, &var_index, 
+                    CRIT_TVM_DIR, &direction, -1);
+
+  variable = psppire_dict_get_variable(dict, var_index);
+
+  varname = pspp_locale_to_utf8(psppire_variable_get_name(variable),
+                               -1, 0);
+
+  if ( direction == SRT_ASCEND) 
+      buf = g_strdup_printf("%s: %s", varname, _("Ascending"));
+  else
+      buf = g_strdup_printf("%s: %s", varname, _("Descending"));
+  
+  g_free(varname);
+
+  g_object_set(renderer, "text", buf, NULL);
+
+  g_free(buf);
+}
+
+
+/* Create the dialog */
+struct sort_cases_dialog * 
+sort_cases_dialog_create(GladeXML *xml)
+{
+  struct sort_cases_dialog *dialog = g_malloc(sizeof(*dialog));
+
+  dialog->loop = g_main_loop_new(NULL, FALSE);
+
+  dialog->window = get_widget_assert(xml, "sort-cases-dialog");
+
+  dialog->dict_view = GTK_TREE_VIEW(get_widget_assert
+                                   (xml, "sort-cases-treeview-dict"));
+  dialog->criteria_view = GTK_TREE_VIEW(get_widget_assert
+                                 (xml, "sort-cases-treeview-criteria"));
+
+  dialog->arrow = GTK_ARROW(get_widget_assert(xml, "sort-cases-arrow"));
+  dialog->button = GTK_BUTTON(get_widget_assert(xml, "sort-cases-button"));
+  
+  dialog->ascending_button = 
+    GTK_TOGGLE_BUTTON(get_widget_assert(xml, "sort-cases-button-ascending"));
+
+  g_signal_connect(dialog->window, "delete-event",
+                  G_CALLBACK(delete_event_callback), dialog);
+
+  g_signal_connect(get_widget_assert(xml, "sort-cases-cancel"),
+                  "clicked", G_CALLBACK(sort_cases_cancel_callback), dialog);
+
+  g_signal_connect(get_widget_assert(xml, "sort-cases-ok"),
+                  "clicked", G_CALLBACK(sort_cases_ok_callback), dialog);
+
+
+  g_signal_connect(get_widget_assert(xml, "sort-cases-reset"),
+                  "clicked", G_CALLBACK(sort_cases_reset_callback), dialog);
+
+
+  g_signal_connect(get_widget_assert(xml, "sort-cases-button"),
+                  "clicked", G_CALLBACK(sort_cases_button_callback), dialog);
+
+
+  {
+  /* Set up the dictionary treeview */
+    GtkTreeViewColumn *col;
+
+    GtkTreeSelection *selection = 
+      gtk_tree_view_get_selection(dialog->dict_view);
+
+    GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
+
+    col = gtk_tree_view_column_new_with_attributes(_("Var"),
+                                                  renderer,
+                                                  "text",
+                                                  0,
+                                                  NULL);
+
+    /* FIXME: make this a value in terms of character widths */
+    g_object_set(col, "min-width",  100, NULL);
+
+    gtk_tree_view_column_set_sizing (col, GTK_TREE_VIEW_COLUMN_FIXED);
+
+    gtk_tree_view_append_column(dialog->dict_view, col);
+
+    gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
+
+    g_signal_connect(selection, "changed", 
+                    G_CALLBACK(dictionary_selection_changed), dialog);
+  }
+
+  {
+    /* Set up the variable list treeview */
+    GtkTreeSelection *selection = 
+      gtk_tree_view_get_selection(dialog->criteria_view);
+
+    gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
+
+    dialog->crit_renderer = gtk_cell_renderer_text_new();
+
+    dialog->crit_col = gtk_tree_view_column_new_with_attributes(_("Criteria"),
+                                                  dialog->crit_renderer,
+                                                  "text",
+                                                  0,
+                                                  NULL);
+
+    gtk_tree_view_column_set_sizing (dialog->crit_col, GTK_TREE_VIEW_COLUMN_FIXED);
+
+    gtk_tree_view_append_column(GTK_TREE_VIEW(dialog->criteria_view), 
+                               dialog->crit_col);
+
+    g_signal_connect(selection, "changed", 
+                    G_CALLBACK(criteria_selection_changed), dialog);
+  }
+
+  {
+    /* Create the list of criteria */
+    dialog->criteria_list = gtk_list_store_new(2, 
+                           G_TYPE_INT, /* index of the variable */
+                           G_TYPE_INT  /* Ascending/Descending */
+                           );
+
+    gtk_tree_view_set_model(dialog->criteria_view, 
+                           GTK_TREE_MODEL(dialog->criteria_list));
+  }
+
+  dialog->response = GTK_RESPONSE_NONE;
+
+  return dialog;
+}
+
+
+static void
+convert_list_store_to_criteria(GtkListStore *list,
+                              PsppireDict *dict,
+                              struct sort_criteria *criteria);
+
+
+/* Run the dialog.
+   If the return value is GTK_RESPONSE_OK, then CRITERIA gets filled
+   with a valid sort criteria which can be used to sort the data.
+   This structure and its contents must be freed by the caller. */
+gint
+sort_cases_dialog_run(struct sort_cases_dialog *dialog, 
+                     PsppireDict *dict,
+                     struct sort_criteria *criteria
+                     )
+{
+  g_assert(! g_main_loop_is_running(dialog->loop));
+
+  gtk_tree_view_set_model(GTK_TREE_VIEW(dialog->dict_view), 
+                         GTK_TREE_MODEL(dict));
+
+  
+  gtk_tree_view_column_set_cell_data_func(dialog->crit_col, 
+                                         dialog->crit_renderer, 
+                                         criteria_render_func, dict, 0);
+
+  gtk_list_store_clear(dialog->criteria_list);
+
+  gtk_arrow_set(dialog->arrow, GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
+  dialog->button_state = VAR_SELECT;
+
+  gtk_widget_show(dialog->window);
+
+  g_main_loop_run(dialog->loop);
+
+  if ( GTK_RESPONSE_OK == dialog->response) 
+    convert_list_store_to_criteria(dialog->criteria_list, 
+                                  dict, criteria);
+
+  return dialog->response;
+}
+
+
+
+/* Convert the GtkListStore to a struct sort_criteria*/
+static void
+convert_list_store_to_criteria(GtkListStore *list,
+                              PsppireDict *dict,
+                              struct sort_criteria *criteria)
+{
+  GtkTreeIter iter;
+  gboolean valid;
+  gint n = 0;
+
+  GtkTreeModel *model = GTK_TREE_MODEL(list);
+  
+  criteria->crit_cnt = gtk_tree_model_iter_n_children (model, NULL);
+
+  criteria->crits = g_malloc(sizeof(struct sort_criterion) * 
+                            criteria->crit_cnt);
+
+  for(valid = gtk_tree_model_get_iter_first(model, &iter);
+      valid;
+      valid = gtk_tree_model_iter_next(model, &iter))
+    {
+      struct PsppireVariable *variable;
+      gint index;
+      struct sort_criterion *scn = &criteria->crits[n];
+      g_assert ( n < criteria->crit_cnt);
+      n++;
+      
+      gtk_tree_model_get(model, &iter, 
+                        CRIT_TVM_IDX, &index, 
+                        CRIT_TVM_DIR, &scn->dir,
+                        -1);
+
+      variable = psppire_dict_get_variable(dict, index);
+
+      scn->fv    = psppire_variable_get_fv(variable);
+      scn->width = psppire_variable_get_width(variable);
+    }
+}
+
diff --git a/src/ui/gui/sort-cases-dialog.h b/src/ui/gui/sort-cases-dialog.h
new file mode 100644 (file)
index 0000000..abbc60e
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+    PSPPIRE --- A Graphical User Interface for PSPP
+    Copyright (C) 2006  Free Software Foundation
+    Written by John Darrington
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA. */
+
+#ifndef __SORT_CASES_DIALOG_H
+#define __SORT_CASES_DIALOG_H
+
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include "psppire-dict.h"
+
+struct sort_criteria;
+
+struct sort_cases_dialog
+{
+  GtkWidget *window;
+  GMainLoop *loop;
+
+  GtkTreeView *dict_view;
+
+  
+  GtkTreeView *criteria_view;
+  GtkTreeViewColumn *crit_col;
+  GtkCellRenderer *crit_renderer;
+
+  GtkListStore *criteria_list;
+
+  struct sort_criteria *sc;
+
+  GtkArrow *arrow;
+  GtkButton *button;
+
+  GtkToggleButton *ascending_button;
+  
+  /* FIXME: Could this be done better with a GtkToggleAction ?? */
+  enum {VAR_SELECT, VAR_DESELECT} button_state;
+
+  gint response;
+};
+
+struct sort_cases_dialog * sort_cases_dialog_create(GladeXML *xml);
+
+
+gint sort_cases_dialog_run(struct sort_cases_dialog *dialog, 
+                          PsppireDict *dict, 
+                          struct sort_criteria *criteria
+                          );
+
+#endif