Implemented the recode dialogs.
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 23 Nov 2007 10:34:53 +0000 (10:34 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 23 Nov 2007 10:34:53 +0000 (10:34 +0000)
21 files changed:
po/de.po
po/en_GB.po
src/ui/gui/ChangeLog
src/ui/gui/automake.mk
src/ui/gui/data-editor.c
src/ui/gui/data-editor.glade
src/ui/gui/data-editor.h
src/ui/gui/dialog-common.c
src/ui/gui/dialog-common.h
src/ui/gui/helper.c
src/ui/gui/helper.h
src/ui/gui/oneway-anova-dialog.c
src/ui/gui/psppire-acr.c
src/ui/gui/psppire-acr.h
src/ui/gui/psppire-dialog.c
src/ui/gui/psppire-dialog.h
src/ui/gui/psppire-selector.c
src/ui/gui/psppire-selector.h
src/ui/gui/recode-dialog.c [new file with mode: 0644]
src/ui/gui/recode-dialog.h [new file with mode: 0644]
src/ui/gui/recode.glade [new file with mode: 0644]

index 757763b51ebcbf9b07ada5f3d83d80455bb590f8..ced867fc117562d8bb46a704a49dde422172a216 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PSPP 0.4.3\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2007-11-21 20:50+0900\n"
+"POT-Creation-Date: 2007-11-21 21:01+0900\n"
 "PO-Revision-Date: 2006-07-28 19:32+0800\n"
 "Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
 "Language-Team: German <pspp-dev@gnu.org>\n"
@@ -320,13 +320,13 @@ msgid "%s variables are not compatible with %s format %s."
 msgstr ""
 
 #: src/data/format.c:318 src/data/sys-file-reader.c:639
-#: src/ui/gui/data-editor.glade:1285 src/ui/gui/psppire.glade:2176
+#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire.glade:2176
 #: src/ui/gui/psppire-var-store.c:493
 msgid "String"
 msgstr "Zeichenkette"
 
 #: src/data/format.c:318 src/data/sys-file-reader.c:639
-#: src/ui/gui/data-editor.glade:1174 src/ui/gui/psppire.glade:2131
+#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire.glade:2131
 #: src/ui/gui/psppire-var-store.c:486
 msgid "Numeric"
 msgstr "Nummer"
@@ -1765,6 +1765,7 @@ msgid "File:"
 msgstr "Datei:"
 
 #: src/language/dictionary/sys-file-info.c:112 src/ui/gui/psppire.glade:2052
+#: src/ui/gui/recode.glade:841
 msgid "Label:"
 msgstr "Kennsatz:"
 
@@ -1818,7 +1819,7 @@ msgid "IBM 390 Hex Long."
 msgstr ""
 
 #: src/language/dictionary/sys-file-info.c:135
-#: src/ui/gui/descriptives-dialog.glade:79
+#: src/ui/gui/descriptives-dialog.glade:79 src/ui/gui/recode.glade:940
 msgid "Variables:"
 msgstr ""
 
@@ -4396,267 +4397,286 @@ msgstr "Spalten"
 msgid "Style of bevel around the custom entry button"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:162
+#: src/ui/gui/data-editor.c:163
 msgid "Transformations Pending"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:424
+#: src/ui/gui/data-editor.c:425
 #, fuzzy
 msgid "Labels"
 msgstr "Kennsatz"
 
-#: src/ui/gui/data-editor.c:425
+#: src/ui/gui/data-editor.c:426
 msgid "Show/hide value labels"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:443 src/ui/gui/data-editor.c:460
-#: src/ui/gui/data-editor.c:1799 src/ui/gui/data-editor.c:1852
+#: src/ui/gui/data-editor.c:444 src/ui/gui/data-editor.c:461
+#: src/ui/gui/data-editor.c:1830 src/ui/gui/data-editor.c:1883
 msgid "Clear"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:444
+#: src/ui/gui/data-editor.c:445
 msgid "Delete the cases at the selected position(s)"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:461
+#: src/ui/gui/data-editor.c:462
 msgid "Delete the variables at the selected position(s)"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:475 src/ui/gui/data-editor.c:1796
-#: src/ui/gui/data-editor.glade:137 src/ui/gui/data-editor.glade:789
+#: src/ui/gui/data-editor.c:476 src/ui/gui/data-editor.c:1827
+#: src/ui/gui/data-editor.glade:137 src/ui/gui/data-editor.glade:808
 #, fuzzy
 msgid "Insert Variable"
 msgstr "Variableansicht"
 
-#: src/ui/gui/data-editor.c:476
+#: src/ui/gui/data-editor.c:477
 msgid "Create a new variable at the current position"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:494 src/ui/gui/data-editor.c:1849
-#: src/ui/gui/data-editor.glade:777
+#: src/ui/gui/data-editor.c:495 src/ui/gui/data-editor.c:1880
+#: src/ui/gui/data-editor.glade:796
 #, fuzzy
 msgid "Insert Case"
 msgstr "_Stecken"
 
-#: src/ui/gui/data-editor.c:495
+#: src/ui/gui/data-editor.c:496
 msgid "Create a new case at the current position"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:515
+#: src/ui/gui/data-editor.c:516
 #, fuzzy
 msgid "Goto Case"
 msgstr "_Stecken"
 
-#: src/ui/gui/data-editor.c:516
+#: src/ui/gui/data-editor.c:517
 msgid "Jump to a Case in the Data Sheet"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:535
+#: src/ui/gui/data-editor.c:536
 #, fuzzy
 msgid "Weights"
 msgstr "Rechts"
 
-#: src/ui/gui/data-editor.c:536
+#: src/ui/gui/data-editor.c:537
 msgid "Weight cases by variable"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:545 src/ui/gui/data-editor.glade:312
+#: src/ui/gui/data-editor.c:546 src/ui/gui/data-editor.glade:312
 msgid "Transpose"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:546
+#: src/ui/gui/data-editor.c:547
 msgid "Transpose the cases with the variables"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:557
+#: src/ui/gui/data-editor.c:558
 #, fuzzy
 msgid "Split"
 msgstr "Alle Datei"
 
-#: src/ui/gui/data-editor.c:558
+#: src/ui/gui/data-editor.c:559
 msgid "Split the active file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:568
+#: src/ui/gui/data-editor.c:569
 msgid "Sort"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:569
+#: src/ui/gui/data-editor.c:570
 msgid "Sort cases in the active file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:577 src/ui/gui/data-editor.glade:347
-#: src/ui/gui/data-editor.glade:832
+#: src/ui/gui/data-editor.c:578 src/ui/gui/data-editor.glade:347
+#: src/ui/gui/data-editor.glade:851
 msgid "Select Cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:578
+#: src/ui/gui/data-editor.c:579
 msgid "Select cases from the active file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:587
+#: src/ui/gui/data-editor.c:588
 msgid "Compute"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:588
+#: src/ui/gui/data-editor.c:589
 #, fuzzy
 msgid "Compute new values for a variable"
 msgstr "Unpassend Wert für Variable"
 
-#: src/ui/gui/data-editor.c:596
+#: src/ui/gui/data-editor.c:597
 msgid "Oneway _ANOVA"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:597
+#: src/ui/gui/data-editor.c:598
 msgid "Perform one way analysis of variance"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:605 src/ui/gui/data-editor.glade:484
+#: src/ui/gui/data-editor.c:606 src/ui/gui/data-editor.glade:503
 msgid "_Independent Samples T Test"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:606
+#: src/ui/gui/data-editor.c:607
 msgid "Calculate T Test for samples from independent groups"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:615
+#: src/ui/gui/data-editor.c:616
 #, fuzzy
 msgid "Data File Comments"
 msgstr "Datei Fehler"
 
-#: src/ui/gui/data-editor.c:616
+#: src/ui/gui/data-editor.c:617
 msgid "Commentary text for the data file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:624 src/ui/gui/data-editor.glade:757
+#: src/ui/gui/data-editor.c:625 src/ui/gui/data-editor.glade:776
 msgid "Find"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:625
+#: src/ui/gui/data-editor.c:626
 #, fuzzy
 msgid "Find Case"
 msgstr "_Stecken"
 
-#: src/ui/gui/data-editor.c:634 src/ui/gui/data-editor.glade:384
+#: src/ui/gui/data-editor.c:635 src/ui/gui/data-editor.glade:384
 #, fuzzy
 msgid "Ran_k Cases"
 msgstr "_Stecken"
 
-#: src/ui/gui/data-editor.c:635
+#: src/ui/gui/data-editor.c:636
 #, fuzzy
 msgid "Rank Cases"
 msgstr "_Stecken"
 
-#: src/ui/gui/data-editor.c:644 src/ui/gui/data-editor.glade:286
-#: src/ui/gui/data-editor.glade:736
+#: src/ui/gui/data-editor.c:645 src/ui/gui/data-editor.glade:396
+#, fuzzy
+msgid "Recode into _Same Variables"
+msgstr "Variableansicht"
+
+#: src/ui/gui/data-editor.c:646
+#, fuzzy
+msgid "Recode values into the same Variables"
+msgstr "Unpassend Wert für Variable"
+
+#: src/ui/gui/data-editor.c:655 src/ui/gui/data-editor.glade:403
+msgid "Recode into _Different Variables"
+msgstr ""
+
+#: src/ui/gui/data-editor.c:656
+msgid "Recode values into different Variables"
+msgstr ""
+
+#: src/ui/gui/data-editor.c:665 src/ui/gui/data-editor.glade:286
+#: src/ui/gui/data-editor.glade:755
 msgid "Variables"
 msgstr "Variableansicht"
 
-#: src/ui/gui/data-editor.c:645
+#: src/ui/gui/data-editor.c:666
 #, fuzzy
 msgid "Jump to Variable"
 msgstr "Variableansicht"
 
-#: src/ui/gui/data-editor.c:653 src/ui/gui/data-editor.glade:438
+#: src/ui/gui/data-editor.c:674 src/ui/gui/data-editor.glade:457
 #: src/ui/gui/oneway.glade:179
 msgid "_Descriptives"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:654
+#: src/ui/gui/data-editor.c:675
 msgid "Calculate descriptive statistics (mean, variance, ...)"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1077
+#: src/ui/gui/data-editor.c:1108
 msgid "Font Selection"
 msgstr "Schriftwahlung"
 
-#: src/ui/gui/data-editor.c:1284
+#: src/ui/gui/data-editor.c:1315
 msgid "No Split"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1293
+#: src/ui/gui/data-editor.c:1324
 #, fuzzy
 msgid "Split by "
 msgstr "Alle Datei"
 
-#: src/ui/gui/data-editor.c:1318
+#: src/ui/gui/data-editor.c:1349
 msgid "Filter off"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1331
+#: src/ui/gui/data-editor.c:1362
 #, c-format
 msgid "Filter by %s"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1349
+#: src/ui/gui/data-editor.c:1380
 msgid "Weights off"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1362
+#: src/ui/gui/data-editor.c:1393
 #, c-format
 msgid "Weight by %s"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1385 src/ui/gui/data-editor.c:1619
-#: src/ui/gui/data-editor.glade:648
+#: src/ui/gui/data-editor.c:1416 src/ui/gui/data-editor.c:1650
+#: src/ui/gui/data-editor.glade:667
 msgid "Open"
 msgstr "Öffen"
 
-#: src/ui/gui/data-editor.c:1386
+#: src/ui/gui/data-editor.c:1417
 msgid "Open a data file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1394 src/ui/gui/data-editor.c:1501
-#: src/ui/gui/data-editor.glade:658
+#: src/ui/gui/data-editor.c:1425 src/ui/gui/data-editor.c:1532
+#: src/ui/gui/data-editor.glade:677
 msgid "Save"
 msgstr "Speichen"
 
-#: src/ui/gui/data-editor.c:1395 src/ui/gui/data-editor.c:1405
+#: src/ui/gui/data-editor.c:1426 src/ui/gui/data-editor.c:1436
 #, fuzzy
 msgid "Save data to file"
 msgstr "Speichern unter"
 
-#: src/ui/gui/data-editor.c:1404
+#: src/ui/gui/data-editor.c:1435
 #, fuzzy
 msgid "Save As"
 msgstr "Speichern unter"
 
-#: src/ui/gui/data-editor.c:1413
+#: src/ui/gui/data-editor.c:1444 src/ui/gui/recode-dialog.c:906
+#: src/ui/gui/recode-dialog.c:997
 msgid "New"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1414
+#: src/ui/gui/data-editor.c:1445
 msgid "New data file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1509 src/ui/gui/data-editor.c:1627
+#: src/ui/gui/data-editor.c:1540 src/ui/gui/data-editor.c:1658
 msgid "System Files (*.sav)"
 msgstr "Systemedatein (*.sav)"
 
-#: src/ui/gui/data-editor.c:1515 src/ui/gui/data-editor.c:1633
+#: src/ui/gui/data-editor.c:1546 src/ui/gui/data-editor.c:1664
 msgid "Portable Files (*.por) "
 msgstr "Tragbardatein (*.por)"
 
-#: src/ui/gui/data-editor.c:1521 src/ui/gui/data-editor.c:1639
+#: src/ui/gui/data-editor.c:1552 src/ui/gui/data-editor.c:1670
 #: src/ui/gui/syntax-editor.c:138 src/ui/gui/syntax-editor.c:522
 msgid "All Files"
 msgstr "Alle Datei"
 
-#: src/ui/gui/data-editor.c:1529
+#: src/ui/gui/data-editor.c:1560
 #, fuzzy
 msgid "System File"
 msgstr "Systemedatein (*.sav)"
 
-#: src/ui/gui/data-editor.c:1534
+#: src/ui/gui/data-editor.c:1565
 #, fuzzy
 msgid "Portable File"
 msgstr "Tragbardatein (*.por)"
 
-#: src/ui/gui/data-editor.c:1789
+#: src/ui/gui/data-editor.c:1820
 msgid "Sort Ascending"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1792
+#: src/ui/gui/data-editor.c:1823
 msgid "Sort Descending"
 msgstr ""
 
@@ -4695,7 +4715,7 @@ msgstr "_Bearbeiten"
 msgid "Insert Cases"
 msgstr "_Stecken"
 
-#: src/ui/gui/data-editor.glade:153 src/ui/gui/data-editor.glade:726
+#: src/ui/gui/data-editor.glade:153 src/ui/gui/data-editor.glade:745
 msgid "Go To Case"
 msgstr ""
 
@@ -4734,8 +4754,8 @@ msgstr "Schrift"
 msgid "Grid Lines"
 msgstr "Glitten"
 
-#: src/ui/gui/data-editor.glade:267 src/ui/gui/data-editor.glade:852
-#: src/ui/gui/data-editor.glade:1547 src/ui/gui/data-editor.glade:1728
+#: src/ui/gui/data-editor.glade:267 src/ui/gui/data-editor.glade:871
+#: src/ui/gui/data-editor.glade:1566 src/ui/gui/data-editor.glade:1747
 msgid "Value Labels"
 msgstr "Werten"
 
@@ -4756,12 +4776,12 @@ msgstr "Alle Datei"
 msgid "Aggregate"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:339 src/ui/gui/data-editor.glade:809
+#: src/ui/gui/data-editor.glade:339 src/ui/gui/data-editor.glade:828
 #, fuzzy
 msgid "Split File"
 msgstr "Alle Datei"
 
-#: src/ui/gui/data-editor.glade:354 src/ui/gui/data-editor.glade:820
+#: src/ui/gui/data-editor.glade:354 src/ui/gui/data-editor.glade:839
 msgid "Weight Cases"
 msgstr ""
 
@@ -4773,245 +4793,246 @@ msgstr ""
 msgid "_Compute"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:397
+#: src/ui/gui/data-editor.glade:416
 msgid "_Run Pending Transforms"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:410
+#: src/ui/gui/data-editor.glade:429
 msgid "_Analyze"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:420
+#: src/ui/gui/data-editor.glade:439
 msgid "_Descriptive Statistics"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:430
+#: src/ui/gui/data-editor.glade:449
 #, fuzzy
 msgid "_Frequencies"
 msgstr "Variableansicht"
 
-#: src/ui/gui/data-editor.glade:446
+#: src/ui/gui/data-editor.glade:465
 msgid "_Explore"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:454
+#: src/ui/gui/data-editor.glade:473
 msgid "_Crosstabs"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:466
+#: src/ui/gui/data-editor.glade:485
 msgid "Compare _Means"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:476
+#: src/ui/gui/data-editor.glade:495
 msgid "_One Sample T Test"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:492
+#: src/ui/gui/data-editor.glade:511
 msgid "_Paired Samples T Test"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:500
+#: src/ui/gui/data-editor.glade:519
 msgid "One Way _ANOVA"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:512
+#: src/ui/gui/data-editor.glade:531
 msgid "Bivariate _Correlation"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:520
+#: src/ui/gui/data-editor.glade:539
 msgid "Linear _Regression"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:528
+#: src/ui/gui/data-editor.glade:547
 msgid "_Non-Parametric Statistics"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:538
+#: src/ui/gui/data-editor.glade:557
 msgid "_Chi-Square"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:546
+#: src/ui/gui/data-editor.glade:565
 #, fuzzy
 msgid "_Binomial"
 msgstr "Nominalwert"
 
-#: src/ui/gui/data-editor.glade:562
+#: src/ui/gui/data-editor.glade:581
 msgid "_Utilities"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:572
+#: src/ui/gui/data-editor.glade:591
 #, fuzzy
 msgid "_Variables"
 msgstr "Variableansicht"
 
-#: src/ui/gui/data-editor.glade:581
+#: src/ui/gui/data-editor.glade:600
 #, fuzzy
 msgid "Data File _Comments"
 msgstr "Datei Fehler"
 
-#: src/ui/gui/data-editor.glade:592 src/ui/gui/output-viewer.glade:78
+#: src/ui/gui/data-editor.glade:611 src/ui/gui/output-viewer.glade:78
 #: src/ui/gui/syntax-editor.glade:234
 #, fuzzy
 msgid "_Windows"
 msgstr "_Datei"
 
-#: src/ui/gui/data-editor.glade:599 src/ui/gui/output-viewer.glade:88
+#: src/ui/gui/data-editor.glade:618 src/ui/gui/output-viewer.glade:88
 #: src/ui/gui/syntax-editor.glade:243
 msgid "_Minimize All Windows"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:610 src/ui/gui/output-viewer.glade:99
+#: src/ui/gui/data-editor.glade:629 src/ui/gui/output-viewer.glade:99
 #: src/ui/gui/syntax-editor.glade:254
 msgid "_Help"
 msgstr "_Hilfe"
 
-#: src/ui/gui/data-editor.glade:617 src/ui/gui/output-viewer.glade:106
+#: src/ui/gui/data-editor.glade:636 src/ui/gui/output-viewer.glade:106
 #: src/ui/gui/syntax-editor.glade:262
 msgid "_Reference Manual"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:624 src/ui/gui/output-viewer.glade:113
+#: src/ui/gui/data-editor.glade:643 src/ui/gui/output-viewer.glade:113
 #: src/ui/gui/syntax-editor.glade:269
 msgid "_About"
 msgstr "_Info"
 
-#: src/ui/gui/data-editor.glade:668
+#: src/ui/gui/data-editor.glade:687
 msgid "Print"
 msgstr "Drucken"
 
-#: src/ui/gui/data-editor.glade:678
+#: src/ui/gui/data-editor.glade:697
 msgid "Recall"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:696
+#: src/ui/gui/data-editor.glade:715
 msgid "Undo"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:706
+#: src/ui/gui/data-editor.glade:725
 msgid "Redo"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:863
+#: src/ui/gui/data-editor.glade:882
 msgid "Use Sets"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:945
+#: src/ui/gui/data-editor.glade:964
 msgid "Data View"
 msgstr "Datenansicht"
 
-#: src/ui/gui/data-editor.glade:972
+#: src/ui/gui/data-editor.glade:991
 msgid "Variable View"
 msgstr "Variableansicht"
 
-#: src/ui/gui/data-editor.glade:1002
+#: src/ui/gui/data-editor.glade:1021
 msgid "Information Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1021
+#: src/ui/gui/data-editor.glade:1040
 msgid "Processor Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1046
+#: src/ui/gui/data-editor.glade:1065
 msgid "Case Counter Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1071
+#: src/ui/gui/data-editor.glade:1090
 msgid "Filter Use Status Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1097
+#: src/ui/gui/data-editor.glade:1116
 msgid "Weight Status Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1123
+#: src/ui/gui/data-editor.glade:1142
 #, fuzzy
 msgid "Split File Status Area"
 msgstr "Alle Datei"
 
-#: src/ui/gui/data-editor.glade:1153
+#: src/ui/gui/data-editor.glade:1172
 msgid "Variable Type"
 msgstr "Variableansicht"
 
-#: src/ui/gui/data-editor.glade:1189 src/ui/gui/psppire-var-store.c:487
+#: src/ui/gui/data-editor.glade:1208 src/ui/gui/psppire-var-store.c:487
 msgid "Comma"
 msgstr "Komma"
 
-#: src/ui/gui/data-editor.glade:1205 src/ui/gui/psppire-var-store.c:488
+#: src/ui/gui/data-editor.glade:1224 src/ui/gui/psppire-var-store.c:488
 msgid "Dot"
 msgstr "Punkt"
 
-#: src/ui/gui/data-editor.glade:1221
+#: src/ui/gui/data-editor.glade:1240
 msgid "Scientific notation"
 msgstr "Wissenschaftlichnotation"
 
-#: src/ui/gui/data-editor.glade:1237 src/ui/gui/psppire-var-store.c:490
+#: src/ui/gui/data-editor.glade:1256 src/ui/gui/psppire-var-store.c:490
 msgid "Date"
 msgstr "Datum"
 
-#: src/ui/gui/data-editor.glade:1253 src/ui/gui/psppire-var-store.c:491
+#: src/ui/gui/data-editor.glade:1272 src/ui/gui/psppire-var-store.c:491
 msgid "Dollar"
 msgstr "Euro"
 
-#: src/ui/gui/data-editor.glade:1269
+#: src/ui/gui/data-editor.glade:1288
 msgid "Custom currency"
 msgstr "Spezialwährung"
 
-#: src/ui/gui/data-editor.glade:1363
+#: src/ui/gui/data-editor.glade:1382
 msgid "positive"
 msgstr "positiv"
 
-#: src/ui/gui/data-editor.glade:1369
+#: src/ui/gui/data-editor.glade:1388
 msgid "negative"
 msgstr "negativ"
 
-#: src/ui/gui/data-editor.glade:1382
+#: src/ui/gui/data-editor.glade:1401
 msgid "Sample"
 msgstr "Muster"
 
-#: src/ui/gui/data-editor.glade:1430
-msgid "Decimal Places:"
-msgstr "Dezimalstellen:"
-
-#: src/ui/gui/data-editor.glade:1471
+#: src/ui/gui/data-editor.glade:1451
 msgid "Width:"
 msgstr "Große:"
 
-#: src/ui/gui/data-editor.glade:1634 src/ui/gui/psppire.glade:2544
-msgid "Value:"
-msgstr "Werte:"
+#: src/ui/gui/data-editor.glade:1495
+msgid "Decimal Places:"
+msgstr "Dezimalstellen:"
 
-#: src/ui/gui/data-editor.glade:1645
+#: src/ui/gui/data-editor.glade:1664
 msgid "Value Label:"
 msgstr "Kennsatz:"
 
-#: src/ui/gui/data-editor.glade:1795 src/ui/gui/t-test.glade:370
+#: src/ui/gui/data-editor.glade:1677 src/ui/gui/psppire.glade:2544
+#: src/ui/gui/recode.glade:185
+msgid "Value:"
+msgstr "Werte:"
+
+#: src/ui/gui/data-editor.glade:1814 src/ui/gui/t-test.glade:370
 msgid "Missing Values"
 msgstr "Lösewerten"
 
-#: src/ui/gui/data-editor.glade:1862
-msgid "_No missing values"
-msgstr "_Kein Lösewerten"
-
-#: src/ui/gui/data-editor.glade:1880
-msgid "_Discrete missing values"
-msgstr "_Diskret Lösewerten"
-
-#: src/ui/gui/data-editor.glade:1965
+#: src/ui/gui/data-editor.glade:1832
 msgid "_Range plus one optional discrete missing value"
 msgstr "Wertebereich und ein optional Lösewert"
 
-#: src/ui/gui/data-editor.glade:1990
+#: src/ui/gui/data-editor.glade:1857
 msgid "_Low:"
 msgstr "_Tief:"
 
-#: src/ui/gui/data-editor.glade:2019
+#: src/ui/gui/data-editor.glade:1886
 msgid "_High:"
 msgstr "_Hoch:"
 
-#: src/ui/gui/data-editor.glade:2060
+#: src/ui/gui/data-editor.glade:1927
 msgid "Di_screte value:"
 msgstr "Di_skretwerte"
 
+#: src/ui/gui/data-editor.glade:1974
+msgid "_No missing values"
+msgstr "_Kein Lösewerten"
+
+#: src/ui/gui/data-editor.glade:1992
+msgid "_Discrete missing values"
+msgstr "_Diskret Lösewerten"
+
 #: src/ui/gui/descriptives-dialog.c:53
 msgid "Standard deviation"
 msgstr ""
@@ -5332,6 +5353,7 @@ msgid "Functions:"
 msgstr ""
 
 #: src/ui/gui/psppire.glade:1107 src/ui/gui/psppire.glade:1253
+#: src/ui/gui/recode.glade:731
 msgid "If..."
 msgstr ""
 
@@ -5595,6 +5617,115 @@ msgstr ""
 msgid "Rank Assigned to Ties"
 msgstr ""
 
+#: src/ui/gui/recode-dialog.c:857
+msgid "Recode into Different Variables"
+msgstr ""
+
+#: src/ui/gui/recode-dialog.c:860
+#, fuzzy
+msgid "Recode into Same Variables"
+msgstr "Variableansicht"
+
+#: src/ui/gui/recode-dialog.c:891 src/ui/gui/recode-dialog.c:989
+msgid "Old"
+msgstr ""
+
+#: src/ui/gui/recode-dialog.c:1246
+msgid "Recode into Different Variables: Old and New Values "
+msgstr ""
+
+#: src/ui/gui/recode-dialog.c:1247
+msgid "Recode into Same Variables: Old and New Values"
+msgstr ""
+
+#: src/ui/gui/recode.glade:197
+#, fuzzy
+msgid "System-Missing"
+msgstr "Löse"
+
+#: src/ui/gui/recode.glade:211
+msgid "System-or user-missing"
+msgstr ""
+
+#: src/ui/gui/recode.glade:245
+msgid "through"
+msgstr ""
+
+#: src/ui/gui/recode.glade:283
+msgid "Range, LOWEST thru value"
+msgstr ""
+
+#: src/ui/gui/recode.glade:297
+msgid "Range, value thru HIGHEST"
+msgstr ""
+
+#: src/ui/gui/recode.glade:327
+msgid "All other values"
+msgstr ""
+
+#: src/ui/gui/recode.glade:363
+msgid "Range:"
+msgstr ""
+
+#: src/ui/gui/recode.glade:380
+#, fuzzy
+msgid "Old Value"
+msgstr "Werte:"
+
+#: src/ui/gui/recode.glade:462
+#, fuzzy
+msgid "System Missing"
+msgstr "Löse"
+
+#: src/ui/gui/recode.glade:476
+msgid "Copy old values"
+msgstr ""
+
+#: src/ui/gui/recode.glade:500
+#, fuzzy
+msgid "Value: "
+msgstr "Werte:"
+
+#: src/ui/gui/recode.glade:530
+#, fuzzy
+msgid "New Value"
+msgstr "Werte:"
+
+#: src/ui/gui/recode.glade:590
+msgid "Convert numeric strings to numbers ('5' -> 5)"
+msgstr ""
+
+#: src/ui/gui/recode.glade:608
+msgid "Output variables are strings"
+msgstr ""
+
+#: src/ui/gui/recode.glade:620
+#, fuzzy
+msgid "Width: "
+msgstr "Große:"
+
+#: src/ui/gui/recode.glade:743
+msgid "(optional case selection condition)"
+msgstr ""
+
+#: src/ui/gui/recode.glade:823
+#, fuzzy
+msgid "Name:"
+msgstr "Name"
+
+#: src/ui/gui/recode.glade:867
+msgid "Change"
+msgstr ""
+
+#: src/ui/gui/recode.glade:885
+#, fuzzy
+msgid "Output Variable"
+msgstr "Variableansicht"
+
+#: src/ui/gui/recode.glade:965
+msgid "Old and New Values"
+msgstr ""
+
 #: src/ui/gui/select-cases-dialog.c:85
 #, c-format
 msgid "Approximately %3d%% of all cases."
index d5ce8006fb01c3355ca56eab34613255fcc1988e..75c363dc06c5b8958714724c6867e457f1ff239e 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PSPP 0.4.3\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2007-11-21 20:50+0900\n"
+"POT-Creation-Date: 2007-11-21 21:01+0900\n"
 "PO-Revision-Date: 2007-09-15 08:29+0800\n"
 "Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
 "Language-Team: John Darrington <john@darrington.wattle.id.au>\n"
@@ -315,13 +315,13 @@ msgid "%s variables are not compatible with %s format %s."
 msgstr ""
 
 #: src/data/format.c:318 src/data/sys-file-reader.c:639
-#: src/ui/gui/data-editor.glade:1285 src/ui/gui/psppire.glade:2176
+#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire.glade:2176
 #: src/ui/gui/psppire-var-store.c:493
 msgid "String"
 msgstr ""
 
 #: src/data/format.c:318 src/data/sys-file-reader.c:639
-#: src/ui/gui/data-editor.glade:1174 src/ui/gui/psppire.glade:2131
+#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire.glade:2131
 #: src/ui/gui/psppire-var-store.c:486
 msgid "Numeric"
 msgstr ""
@@ -1756,6 +1756,7 @@ msgid "File:"
 msgstr ""
 
 #: src/language/dictionary/sys-file-info.c:112 src/ui/gui/psppire.glade:2052
+#: src/ui/gui/recode.glade:841
 msgid "Label:"
 msgstr ""
 
@@ -1809,7 +1810,7 @@ msgid "IBM 390 Hex Long."
 msgstr ""
 
 #: src/language/dictionary/sys-file-info.c:135
-#: src/ui/gui/descriptives-dialog.glade:79
+#: src/ui/gui/descriptives-dialog.glade:79 src/ui/gui/recode.glade:940
 msgid "Variables:"
 msgstr ""
 
@@ -4387,250 +4388,267 @@ msgstr ""
 msgid "Style of bevel around the custom entry button"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:162
+#: src/ui/gui/data-editor.c:163
 msgid "Transformations Pending"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:424
+#: src/ui/gui/data-editor.c:425
 msgid "Labels"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:425
+#: src/ui/gui/data-editor.c:426
 msgid "Show/hide value labels"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:443 src/ui/gui/data-editor.c:460
-#: src/ui/gui/data-editor.c:1799 src/ui/gui/data-editor.c:1852
+#: src/ui/gui/data-editor.c:444 src/ui/gui/data-editor.c:461
+#: src/ui/gui/data-editor.c:1830 src/ui/gui/data-editor.c:1883
 msgid "Clear"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:444
+#: src/ui/gui/data-editor.c:445
 msgid "Delete the cases at the selected position(s)"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:461
+#: src/ui/gui/data-editor.c:462
 msgid "Delete the variables at the selected position(s)"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:475 src/ui/gui/data-editor.c:1796
-#: src/ui/gui/data-editor.glade:137 src/ui/gui/data-editor.glade:789
+#: src/ui/gui/data-editor.c:476 src/ui/gui/data-editor.c:1827
+#: src/ui/gui/data-editor.glade:137 src/ui/gui/data-editor.glade:808
 msgid "Insert Variable"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:476
+#: src/ui/gui/data-editor.c:477
 msgid "Create a new variable at the current position"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:494 src/ui/gui/data-editor.c:1849
-#: src/ui/gui/data-editor.glade:777
+#: src/ui/gui/data-editor.c:495 src/ui/gui/data-editor.c:1880
+#: src/ui/gui/data-editor.glade:796
 msgid "Insert Case"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:495
+#: src/ui/gui/data-editor.c:496
 msgid "Create a new case at the current position"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:515
+#: src/ui/gui/data-editor.c:516
 msgid "Goto Case"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:516
+#: src/ui/gui/data-editor.c:517
 msgid "Jump to a Case in the Data Sheet"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:535
+#: src/ui/gui/data-editor.c:536
 msgid "Weights"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:536
+#: src/ui/gui/data-editor.c:537
 msgid "Weight cases by variable"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:545 src/ui/gui/data-editor.glade:312
+#: src/ui/gui/data-editor.c:546 src/ui/gui/data-editor.glade:312
 msgid "Transpose"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:546
+#: src/ui/gui/data-editor.c:547
 msgid "Transpose the cases with the variables"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:557
+#: src/ui/gui/data-editor.c:558
 msgid "Split"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:558
+#: src/ui/gui/data-editor.c:559
 msgid "Split the active file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:568
+#: src/ui/gui/data-editor.c:569
 msgid "Sort"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:569
+#: src/ui/gui/data-editor.c:570
 msgid "Sort cases in the active file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:577 src/ui/gui/data-editor.glade:347
-#: src/ui/gui/data-editor.glade:832
+#: src/ui/gui/data-editor.c:578 src/ui/gui/data-editor.glade:347
+#: src/ui/gui/data-editor.glade:851
 msgid "Select Cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:578
+#: src/ui/gui/data-editor.c:579
 msgid "Select cases from the active file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:587
+#: src/ui/gui/data-editor.c:588
 msgid "Compute"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:588
+#: src/ui/gui/data-editor.c:589
 msgid "Compute new values for a variable"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:596
+#: src/ui/gui/data-editor.c:597
 msgid "Oneway _ANOVA"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:597
+#: src/ui/gui/data-editor.c:598
 msgid "Perform one way analysis of variance"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:605 src/ui/gui/data-editor.glade:484
+#: src/ui/gui/data-editor.c:606 src/ui/gui/data-editor.glade:503
 msgid "_Independent Samples T Test"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:606
+#: src/ui/gui/data-editor.c:607
 msgid "Calculate T Test for samples from independent groups"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:615
+#: src/ui/gui/data-editor.c:616
 msgid "Data File Comments"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:616
+#: src/ui/gui/data-editor.c:617
 msgid "Commentary text for the data file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:624 src/ui/gui/data-editor.glade:757
+#: src/ui/gui/data-editor.c:625 src/ui/gui/data-editor.glade:776
 msgid "Find"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:625
+#: src/ui/gui/data-editor.c:626
 msgid "Find Case"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:634 src/ui/gui/data-editor.glade:384
+#: src/ui/gui/data-editor.c:635 src/ui/gui/data-editor.glade:384
 msgid "Ran_k Cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:635
+#: src/ui/gui/data-editor.c:636
 msgid "Rank Cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:644 src/ui/gui/data-editor.glade:286
-#: src/ui/gui/data-editor.glade:736
+#: src/ui/gui/data-editor.c:645 src/ui/gui/data-editor.glade:396
+msgid "Recode into _Same Variables"
+msgstr ""
+
+#: src/ui/gui/data-editor.c:646
+msgid "Recode values into the same Variables"
+msgstr ""
+
+#: src/ui/gui/data-editor.c:655 src/ui/gui/data-editor.glade:403
+msgid "Recode into _Different Variables"
+msgstr ""
+
+#: src/ui/gui/data-editor.c:656
+msgid "Recode values into different Variables"
+msgstr ""
+
+#: src/ui/gui/data-editor.c:665 src/ui/gui/data-editor.glade:286
+#: src/ui/gui/data-editor.glade:755
 msgid "Variables"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:645
+#: src/ui/gui/data-editor.c:666
 msgid "Jump to Variable"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:653 src/ui/gui/data-editor.glade:438
+#: src/ui/gui/data-editor.c:674 src/ui/gui/data-editor.glade:457
 #: src/ui/gui/oneway.glade:179
 msgid "_Descriptives"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:654
+#: src/ui/gui/data-editor.c:675
 msgid "Calculate descriptive statistics (mean, variance, ...)"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1077
+#: src/ui/gui/data-editor.c:1108
 msgid "Font Selection"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1284
+#: src/ui/gui/data-editor.c:1315
 msgid "No Split"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1293
+#: src/ui/gui/data-editor.c:1324
 msgid "Split by "
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1318
+#: src/ui/gui/data-editor.c:1349
 msgid "Filter off"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1331
+#: src/ui/gui/data-editor.c:1362
 #, c-format
 msgid "Filter by %s"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1349
+#: src/ui/gui/data-editor.c:1380
 msgid "Weights off"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1362
+#: src/ui/gui/data-editor.c:1393
 #, c-format
 msgid "Weight by %s"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1385 src/ui/gui/data-editor.c:1619
-#: src/ui/gui/data-editor.glade:648
+#: src/ui/gui/data-editor.c:1416 src/ui/gui/data-editor.c:1650
+#: src/ui/gui/data-editor.glade:667
 msgid "Open"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1386
+#: src/ui/gui/data-editor.c:1417
 msgid "Open a data file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1394 src/ui/gui/data-editor.c:1501
-#: src/ui/gui/data-editor.glade:658
+#: src/ui/gui/data-editor.c:1425 src/ui/gui/data-editor.c:1532
+#: src/ui/gui/data-editor.glade:677
 msgid "Save"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1395 src/ui/gui/data-editor.c:1405
+#: src/ui/gui/data-editor.c:1426 src/ui/gui/data-editor.c:1436
 msgid "Save data to file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1404
+#: src/ui/gui/data-editor.c:1435
 msgid "Save As"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1413
+#: src/ui/gui/data-editor.c:1444 src/ui/gui/recode-dialog.c:906
+#: src/ui/gui/recode-dialog.c:997
 msgid "New"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1414
+#: src/ui/gui/data-editor.c:1445
 msgid "New data file"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1509 src/ui/gui/data-editor.c:1627
+#: src/ui/gui/data-editor.c:1540 src/ui/gui/data-editor.c:1658
 msgid "System Files (*.sav)"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1515 src/ui/gui/data-editor.c:1633
+#: src/ui/gui/data-editor.c:1546 src/ui/gui/data-editor.c:1664
 msgid "Portable Files (*.por) "
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1521 src/ui/gui/data-editor.c:1639
+#: src/ui/gui/data-editor.c:1552 src/ui/gui/data-editor.c:1670
 #: src/ui/gui/syntax-editor.c:138 src/ui/gui/syntax-editor.c:522
 msgid "All Files"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1529
+#: src/ui/gui/data-editor.c:1560
 msgid "System File"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1534
+#: src/ui/gui/data-editor.c:1565
 msgid "Portable File"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1789
+#: src/ui/gui/data-editor.c:1820
 msgid "Sort Ascending"
 msgstr ""
 
-#: src/ui/gui/data-editor.c:1792
+#: src/ui/gui/data-editor.c:1823
 msgid "Sort Descending"
 msgstr ""
 
@@ -4667,7 +4685,7 @@ msgstr ""
 msgid "Insert Cases"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:153 src/ui/gui/data-editor.glade:726
+#: src/ui/gui/data-editor.glade:153 src/ui/gui/data-editor.glade:745
 msgid "Go To Case"
 msgstr ""
 
@@ -4703,8 +4721,8 @@ msgstr ""
 msgid "Grid Lines"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:267 src/ui/gui/data-editor.glade:852
-#: src/ui/gui/data-editor.glade:1547 src/ui/gui/data-editor.glade:1728
+#: src/ui/gui/data-editor.glade:267 src/ui/gui/data-editor.glade:871
+#: src/ui/gui/data-editor.glade:1566 src/ui/gui/data-editor.glade:1747
 msgid "Value Labels"
 msgstr ""
 
@@ -4724,11 +4742,11 @@ msgstr ""
 msgid "Aggregate"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:339 src/ui/gui/data-editor.glade:809
+#: src/ui/gui/data-editor.glade:339 src/ui/gui/data-editor.glade:828
 msgid "Split File"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:354 src/ui/gui/data-editor.glade:820
+#: src/ui/gui/data-editor.glade:354 src/ui/gui/data-editor.glade:839
 msgid "Weight Cases"
 msgstr ""
 
@@ -4740,239 +4758,240 @@ msgstr ""
 msgid "_Compute"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:397
+#: src/ui/gui/data-editor.glade:416
 msgid "_Run Pending Transforms"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:410
+#: src/ui/gui/data-editor.glade:429
 msgid "_Analyze"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:420
+#: src/ui/gui/data-editor.glade:439
 msgid "_Descriptive Statistics"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:430
+#: src/ui/gui/data-editor.glade:449
 msgid "_Frequencies"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:446
+#: src/ui/gui/data-editor.glade:465
 msgid "_Explore"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:454
+#: src/ui/gui/data-editor.glade:473
 msgid "_Crosstabs"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:466
+#: src/ui/gui/data-editor.glade:485
 msgid "Compare _Means"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:476
+#: src/ui/gui/data-editor.glade:495
 msgid "_One Sample T Test"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:492
+#: src/ui/gui/data-editor.glade:511
 msgid "_Paired Samples T Test"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:500
+#: src/ui/gui/data-editor.glade:519
 msgid "One Way _ANOVA"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:512
+#: src/ui/gui/data-editor.glade:531
 msgid "Bivariate _Correlation"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:520
+#: src/ui/gui/data-editor.glade:539
 msgid "Linear _Regression"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:528
+#: src/ui/gui/data-editor.glade:547
 msgid "_Non-Parametric Statistics"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:538
+#: src/ui/gui/data-editor.glade:557
 msgid "_Chi-Square"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:546
+#: src/ui/gui/data-editor.glade:565
 msgid "_Binomial"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:562
+#: src/ui/gui/data-editor.glade:581
 msgid "_Utilities"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:572
+#: src/ui/gui/data-editor.glade:591
 msgid "_Variables"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:581
+#: src/ui/gui/data-editor.glade:600
 msgid "Data File _Comments"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:592 src/ui/gui/output-viewer.glade:78
+#: src/ui/gui/data-editor.glade:611 src/ui/gui/output-viewer.glade:78
 #: src/ui/gui/syntax-editor.glade:234
 msgid "_Windows"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:599 src/ui/gui/output-viewer.glade:88
+#: src/ui/gui/data-editor.glade:618 src/ui/gui/output-viewer.glade:88
 #: src/ui/gui/syntax-editor.glade:243
 msgid "_Minimize All Windows"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:610 src/ui/gui/output-viewer.glade:99
+#: src/ui/gui/data-editor.glade:629 src/ui/gui/output-viewer.glade:99
 #: src/ui/gui/syntax-editor.glade:254
 msgid "_Help"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:617 src/ui/gui/output-viewer.glade:106
+#: src/ui/gui/data-editor.glade:636 src/ui/gui/output-viewer.glade:106
 #: src/ui/gui/syntax-editor.glade:262
 msgid "_Reference Manual"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:624 src/ui/gui/output-viewer.glade:113
+#: src/ui/gui/data-editor.glade:643 src/ui/gui/output-viewer.glade:113
 #: src/ui/gui/syntax-editor.glade:269
 msgid "_About"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:668
+#: src/ui/gui/data-editor.glade:687
 msgid "Print"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:678
+#: src/ui/gui/data-editor.glade:697
 msgid "Recall"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:696
+#: src/ui/gui/data-editor.glade:715
 msgid "Undo"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:706
+#: src/ui/gui/data-editor.glade:725
 msgid "Redo"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:863
+#: src/ui/gui/data-editor.glade:882
 msgid "Use Sets"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:945
+#: src/ui/gui/data-editor.glade:964
 msgid "Data View"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:972
+#: src/ui/gui/data-editor.glade:991
 msgid "Variable View"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1002
+#: src/ui/gui/data-editor.glade:1021
 msgid "Information Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1021
+#: src/ui/gui/data-editor.glade:1040
 msgid "Processor Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1046
+#: src/ui/gui/data-editor.glade:1065
 msgid "Case Counter Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1071
+#: src/ui/gui/data-editor.glade:1090
 msgid "Filter Use Status Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1097
+#: src/ui/gui/data-editor.glade:1116
 msgid "Weight Status Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1123
+#: src/ui/gui/data-editor.glade:1142
 msgid "Split File Status Area"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1153
+#: src/ui/gui/data-editor.glade:1172
 msgid "Variable Type"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1189 src/ui/gui/psppire-var-store.c:487
+#: src/ui/gui/data-editor.glade:1208 src/ui/gui/psppire-var-store.c:487
 msgid "Comma"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1205 src/ui/gui/psppire-var-store.c:488
+#: src/ui/gui/data-editor.glade:1224 src/ui/gui/psppire-var-store.c:488
 msgid "Dot"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1221
+#: src/ui/gui/data-editor.glade:1240
 msgid "Scientific notation"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1237 src/ui/gui/psppire-var-store.c:490
+#: src/ui/gui/data-editor.glade:1256 src/ui/gui/psppire-var-store.c:490
 msgid "Date"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1253 src/ui/gui/psppire-var-store.c:491
+#: src/ui/gui/data-editor.glade:1272 src/ui/gui/psppire-var-store.c:491
 msgid "Dollar"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1269
+#: src/ui/gui/data-editor.glade:1288
 msgid "Custom currency"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1363
+#: src/ui/gui/data-editor.glade:1382
 msgid "positive"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1369
+#: src/ui/gui/data-editor.glade:1388
 msgid "negative"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1382
+#: src/ui/gui/data-editor.glade:1401
 msgid "Sample"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1430
-msgid "Decimal Places:"
-msgstr ""
-
-#: src/ui/gui/data-editor.glade:1471
+#: src/ui/gui/data-editor.glade:1451
 msgid "Width:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1634 src/ui/gui/psppire.glade:2544
-msgid "Value:"
+#: src/ui/gui/data-editor.glade:1495
+msgid "Decimal Places:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1645
+#: src/ui/gui/data-editor.glade:1664
 msgid "Value Label:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1795 src/ui/gui/t-test.glade:370
-msgid "Missing Values"
-msgstr ""
-
-#: src/ui/gui/data-editor.glade:1862
-msgid "_No missing values"
+#: src/ui/gui/data-editor.glade:1677 src/ui/gui/psppire.glade:2544
+#: src/ui/gui/recode.glade:185
+msgid "Value:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1880
-msgid "_Discrete missing values"
+#: src/ui/gui/data-editor.glade:1814 src/ui/gui/t-test.glade:370
+msgid "Missing Values"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1965
+#: src/ui/gui/data-editor.glade:1832
 msgid "_Range plus one optional discrete missing value"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:1990
+#: src/ui/gui/data-editor.glade:1857
 msgid "_Low:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:2019
+#: src/ui/gui/data-editor.glade:1886
 msgid "_High:"
 msgstr ""
 
-#: src/ui/gui/data-editor.glade:2060
+#: src/ui/gui/data-editor.glade:1927
 msgid "Di_screte value:"
 msgstr ""
 
+#: src/ui/gui/data-editor.glade:1974
+msgid "_No missing values"
+msgstr ""
+
+#: src/ui/gui/data-editor.glade:1992
+msgid "_Discrete missing values"
+msgstr ""
+
 #: src/ui/gui/descriptives-dialog.c:53
 msgid "Standard deviation"
 msgstr ""
@@ -5278,6 +5297,7 @@ msgid "Functions:"
 msgstr ""
 
 #: src/ui/gui/psppire.glade:1107 src/ui/gui/psppire.glade:1253
+#: src/ui/gui/recode.glade:731
 msgid "If..."
 msgstr ""
 
@@ -5525,6 +5545,106 @@ msgstr ""
 msgid "Rank Assigned to Ties"
 msgstr ""
 
+#: src/ui/gui/recode-dialog.c:857
+msgid "Recode into Different Variables"
+msgstr ""
+
+#: src/ui/gui/recode-dialog.c:860
+msgid "Recode into Same Variables"
+msgstr ""
+
+#: src/ui/gui/recode-dialog.c:891 src/ui/gui/recode-dialog.c:989
+msgid "Old"
+msgstr ""
+
+#: src/ui/gui/recode-dialog.c:1246
+msgid "Recode into Different Variables: Old and New Values "
+msgstr ""
+
+#: src/ui/gui/recode-dialog.c:1247
+msgid "Recode into Same Variables: Old and New Values"
+msgstr ""
+
+#: src/ui/gui/recode.glade:197
+msgid "System-Missing"
+msgstr ""
+
+#: src/ui/gui/recode.glade:211
+msgid "System-or user-missing"
+msgstr ""
+
+#: src/ui/gui/recode.glade:245
+msgid "through"
+msgstr ""
+
+#: src/ui/gui/recode.glade:283
+msgid "Range, LOWEST thru value"
+msgstr ""
+
+#: src/ui/gui/recode.glade:297
+msgid "Range, value thru HIGHEST"
+msgstr ""
+
+#: src/ui/gui/recode.glade:327
+msgid "All other values"
+msgstr ""
+
+#: src/ui/gui/recode.glade:363
+msgid "Range:"
+msgstr ""
+
+#: src/ui/gui/recode.glade:380
+msgid "Old Value"
+msgstr ""
+
+#: src/ui/gui/recode.glade:462
+msgid "System Missing"
+msgstr ""
+
+#: src/ui/gui/recode.glade:476
+msgid "Copy old values"
+msgstr ""
+
+#: src/ui/gui/recode.glade:500
+msgid "Value: "
+msgstr ""
+
+#: src/ui/gui/recode.glade:530
+msgid "New Value"
+msgstr ""
+
+#: src/ui/gui/recode.glade:590
+msgid "Convert numeric strings to numbers ('5' -> 5)"
+msgstr ""
+
+#: src/ui/gui/recode.glade:608
+msgid "Output variables are strings"
+msgstr ""
+
+#: src/ui/gui/recode.glade:620
+msgid "Width: "
+msgstr ""
+
+#: src/ui/gui/recode.glade:743
+msgid "(optional case selection condition)"
+msgstr ""
+
+#: src/ui/gui/recode.glade:823
+msgid "Name:"
+msgstr ""
+
+#: src/ui/gui/recode.glade:867
+msgid "Change"
+msgstr ""
+
+#: src/ui/gui/recode.glade:885
+msgid "Output Variable"
+msgstr ""
+
+#: src/ui/gui/recode.glade:965
+msgid "Old and New Values"
+msgstr ""
+
 #: src/ui/gui/select-cases-dialog.c:85
 #, c-format
 msgid "Approximately %3d%% of all cases."
index 62b8d162a46617d3542fd1113018504c1db03318..45058669a21f557ccc529e6733e517012ef465ef 100644 (file)
@@ -1,3 +1,27 @@
+2007-11-23  John Darrington <john@darrington.wattle.id.au>
+
+       * psppire-acr.c psppire-acr.h: Generalised the external widget
+       somewhat. It can now be anything, not necessarily a GTK_ENTRY.
+
+       * helper.c helper.h (clone_list_store): New function.
+
+       * oneway-anova-dialog.c : Used the clone_list_store function
+       instead of writing it ourselves.
+       
+       * psppire-dialog.c psppire-dialog.h: Added a tabular orientation
+       in addition to the horizontal/vertical options.
+       
+       * recode-dialog.c recode-dialog.h recode.glade (new files).
+
+       * psppire-selector.c psppire-selector.h: Added a function to
+       allow the prohibition of items based on a predicate.
+
+       * dialog-common.h dialog-common.c (homogeneous_types): New function.
+
+       * data-editor.c data-editor.glade data-editor.h: Enabled the
+       recode dialog options.
+
+
 2007-11-23  John Darrington <john@darrington.wattle.id.au>
 
        * compute-dialog.c (generate_syntax): Append "EXECUTE." to the 
index 5fbc856484f7bf4977372d6cfc3b1b24ab573bd6..ee2b5c8264eab247cb213bfd0b064f37c36fa8f0 100644 (file)
@@ -53,6 +53,7 @@ dist_src_ui_gui_psppire_DATA = \
        $(top_srcdir)/src/ui/gui/output-viewer.glade \
        $(top_srcdir)/src/ui/gui/psppire.glade \
        $(top_srcdir)/src/ui/gui/rank.glade \
+       $(top_srcdir)/src/ui/gui/recode.glade \
        $(top_srcdir)/src/ui/gui/syntax-editor.glade \
        $(top_srcdir)/src/ui/gui/t-test.glade \
        $(top_srcdir)/src/ui/gui/psppicon.png \
@@ -135,6 +136,8 @@ src_ui_gui_psppire_SOURCES = \
        src/ui/gui/psppire-var-store.h \
        src/ui/gui/rank-dialog.c \
        src/ui/gui/rank-dialog.h \
+       src/ui/gui/recode-dialog.c \
+       src/ui/gui/recode-dialog.h \
        src/ui/gui/select-cases-dialog.c \
        src/ui/gui/select-cases-dialog.h \
        src/ui/gui/sort-cases-dialog.c \
index 818cbd07b5ef29e9810a5b886e229791d1f82411..f1848621b45e68c6af4a670fc82cce0f2e417483 100644 (file)
@@ -38,6 +38,7 @@
 #include "goto-case-dialog.h"
 #include "find-dialog.h"
 #include "rank-dialog.h"
+#include "recode-dialog.h"
 #include "comments-dialog.h"
 #include "variable-info-dialog.h"
 #include "descriptives-dialog.h"
@@ -639,6 +640,26 @@ new_data_editor (void)
                    G_CALLBACK (rank_dialog), de);
 
 
+  de->invoke_recode_same_dialog  =
+    gtk_action_new ("recode-same-dialog",
+                   _("Recode into _Same Variables"),
+                   _("Recode values into the same Variables"),
+                   "pspp-recode-same");
+
+  g_signal_connect (de->invoke_recode_same_dialog, "activate",
+                   G_CALLBACK (recode_same_dialog), de);
+
+
+  de->invoke_recode_different_dialog  =
+    gtk_action_new ("recode-different-dialog",
+                   _("Recode into _Different Variables"),
+                   _("Recode values into different Variables"),
+                   "pspp-recode-different");
+
+  g_signal_connect (de->invoke_recode_different_dialog, "activate",
+                   G_CALLBACK (recode_different_dialog), de);
+
+
   de->invoke_variable_info_dialog  =
     gtk_action_new ("variable-info-dialog",
                    _("Variables"),
@@ -745,6 +766,16 @@ new_data_editor (void)
                            get_widget_assert (de->xml, "transform_rank")
                            );
 
+  gtk_action_connect_proxy (de->invoke_recode_same_dialog,
+                           get_widget_assert (de->xml,
+                                              "transform_recode-same")
+                           );
+
+  gtk_action_connect_proxy (de->invoke_recode_different_dialog,
+                           get_widget_assert (de->xml,
+                                              "transform_recode-different")
+                           );
+
   gtk_action_connect_proxy (de->invoke_weight_cases_dialog,
                            get_widget_assert (de->xml, "data_weight-cases")
                            );
index 7779a06095e6ee4ef0877ea9b30334945bf22b17..7a34a31fa787d9bd2b7f0e6dcf57bdcb29804847 100644 (file)
                         <property name="use_underline">True</property>
                       </widget>
                     </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separator8">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkMenuItem" id="transform_recode-same">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Recode into _Same Variables</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkMenuItem" id="transform_recode-different">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Recode into _Different Variables</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                    </child>
                     <child>
                       <widget class="GtkSeparatorMenuItem" id="separator7">
                         <property name="visible">True</property>
                   <widget class="GtkToolButton" id="button-recent">
                     <property name="sensitive">False</property>
                     <property name="tooltip" translatable="yes">Recall</property>
-                    <property name="stock_id">pspp-recent-dialogs</property>
+                    <property name="stock_id">gtk-missing-image</property>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="visible">True</property>
                     <property name="tooltip" translatable="yes">Variables</property>
                     <property name="use_underline">True</property>
-                    <property name="stock_id">pspp-goto-variable</property>
+                    <property name="stock_id">gtk-missing-image</property>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="sensitive">False</property>
                     <property name="tooltip" translatable="yes">Insert Case</property>
                     <property name="use_underline">True</property>
-                    <property name="stock_id">pspp-insert-case</property>
+                    <property name="stock_id">gtk-missing-image</property>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="sensitive">False</property>
                     <property name="tooltip" translatable="yes">Insert Variable</property>
                     <property name="use_underline">True</property>
-                    <property name="stock_id">pspp-insert-variable</property>
+                    <property name="stock_id">gtk-missing-image</property>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="visible">True</property>
                     <property name="tooltip" translatable="yes">Split File</property>
                     <property name="use_underline">True</property>
-                    <property name="stock_id">pspp-split-file</property>
+                    <property name="stock_id">gtk-missing-image</property>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="visible">True</property>
                     <property name="tooltip" translatable="yes">Weight Cases</property>
                     <property name="use_underline">True</property>
-                    <property name="stock_id">pspp-weight-cases</property>
+                    <property name="stock_id">gtk-missing-image</property>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="sensitive">False</property>
                     <property name="tooltip" translatable="yes">Select Cases</property>
                     <property name="use_underline">True</property>
-                    <property name="stock_id">pspp-select-cases</property>
+                    <property name="stock_id">gtk-missing-image</property>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="visible">True</property>
                     <property name="tooltip" translatable="yes">Value Labels</property>
                     <property name="use_underline">True</property>
-                    <property name="stock_id">pspp-value-labels</property>
+                    <property name="stock_id">gtk-missing-image</property>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="n_rows">1</property>
                     <property name="n_columns">2</property>
                     <child>
-                      <widget class="GtkEntry" id="cell_ref_entry">
+                      <widget class="GtkEntry" id="datum_entry">
                         <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="editable">False</property>
-                        <property name="width_chars">25</property>
+                        <property name="can_focus">True</property>
                       </widget>
                       <packing>
-                        <property name="x_options">GTK_FILL</property>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkEntry" id="datum_entry">
+                      <widget class="GtkEntry" id="cell_ref_entry">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="editable">False</property>
+                        <property name="width_chars">25</property>
                       </widget>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                 <property name="column_spacing">2</property>
                 <property name="row_spacing">1</property>
                 <child>
-                  <widget class="GtkLabel" id="decimals_label">
+                  <widget class="GtkHBox" id="hbox2">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Decimal Places:</property>
-                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                    <child>
+                      <widget class="GtkLabel" id="width_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Width:</property>
+                        <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="pack_type">GTK_PACK_END</property>
+                      </packing>
+                    </child>
                   </widget>
                   <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
+                    <property name="y_options">GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkEntry" id="width_entry">
+                  <widget class="GtkEntry" id="decimals_entry">
                     <property name="width_request">25</property>
+                    <property name="visible">True</property>
                     <property name="can_focus">True</property>
                   </widget>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
                     <property name="y_options"></property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkEntry" id="decimals_entry">
+                  <widget class="GtkEntry" id="width_entry">
                     <property name="width_request">25</property>
-                    <property name="visible">True</property>
                     <property name="can_focus">True</property>
                   </widget>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
                     <property name="y_options"></property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkHBox" id="hbox2">
+                  <widget class="GtkLabel" id="decimals_label">
                     <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkLabel" id="width_label">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Width:</property>
-                        <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="pack_type">GTK_PACK_END</property>
-                      </packing>
-                    </child>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Decimal Places:</property>
+                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
                   </widget>
                   <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
+                    <property name="y_options"></property>
                   </packing>
                 </child>
               </widget>
                     <property name="n_columns">2</property>
                     <property name="row_spacing">5</property>
                     <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox2">
+                      <widget class="GtkScrolledWindow" id="scrolledwindow3">
                         <property name="visible">True</property>
-                        <property name="border_width">5</property>
-                        <child>
-                          <widget class="GtkButton" id="val_labs_add">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="label">gtk-add</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="val_labs_change">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="label">gtk-apply</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</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_ETCHED_IN</property>
                         <child>
-                          <widget class="GtkButton" id="val_labs_remove">
+                          <widget class="GtkTreeView" id="treeview1">
                             <property name="visible">True</property>
-                            <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="label">gtk-remove</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
+                            <property name="headers_visible">False</property>
+                            <property name="enable_search">False</property>
                           </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
                         </child>
                       </widget>
                       <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
                         <property name="top_attach">1</property>
                         <property name="bottom_attach">2</property>
                         <property name="x_options">GTK_FILL</property>
+                        <property name="y_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
                         <property name="column_spacing">5</property>
                         <property name="row_spacing">4</property>
                         <child>
-                          <widget class="GtkLabel" id="label5">
+                          <widget class="GtkHBox" id="hbox4">
                             <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Value:</property>
+                            <child>
+                              <widget class="GtkEntry" id="value_entry">
+                                <property name="width_request">85</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="padding">1</property>
+                              </packing>
+                            </child>
                           </widget>
                           <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
                             <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
+                            <property name="y_options">GTK_FILL</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkLabel" id="label6">
+                          <widget class="GtkEntry" id="label_entry">
                             <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Value Label:</property>
+                            <property name="can_focus">True</property>
                           </widget>
                           <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
                             <property name="top_attach">1</property>
                             <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkEntry" id="label_entry">
+                          <widget class="GtkLabel" id="label6">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Value Label:</property>
                           </widget>
                           <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
                             <property name="top_attach">1</property>
                             <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkHBox" id="hbox4">
+                          <widget class="GtkLabel" id="label5">
                             <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkEntry" id="value_entry">
-                                <property name="width_request">85</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="padding">1</property>
-                              </packing>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Value:</property>
                           </widget>
                           <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
                             <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
+                            <property name="y_options"></property>
                           </packing>
                         </child>
                       </widget>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow3">
+                      <widget class="GtkVButtonBox" id="vbuttonbox2">
                         <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_ETCHED_IN</property>
+                        <property name="border_width">5</property>
                         <child>
-                          <widget class="GtkTreeView" id="treeview1">
+                          <widget class="GtkButton" id="val_labs_add">
                             <property name="visible">True</property>
+                            <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
-                            <property name="headers_visible">False</property>
-                            <property name="enable_search">False</property>
+                            <property name="can_default">True</property>
+                            <property name="label">gtk-add</property>
+                            <property name="use_stock">True</property>
+                            <property name="response_id">0</property>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="val_labs_change">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="can_default">True</property>
+                            <property name="label">gtk-apply</property>
+                            <property name="use_stock">True</property>
+                            <property name="response_id">0</property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="val_labs_remove">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="can_default">True</property>
+                            <property name="label">gtk-remove</property>
+                            <property name="use_stock">True</property>
+                            <property name="response_id">0</property>
                           </widget>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
                         </child>
                       </widget>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
                         <property name="top_attach">1</property>
                         <property name="bottom_attach">2</property>
                         <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
                       </packing>
                     </child>
                   </widget>
         <property name="n_rows">2</property>
         <property name="n_columns">2</property>
         <child>
-          <widget class="GtkVButtonBox" id="vbuttonbox5">
+          <widget class="GtkVBox" id="vbox7">
             <property name="visible">True</property>
-            <property name="border_width">5</property>
-            <property name="spacing">5</property>
-            <property name="layout_style">GTK_BUTTONBOX_START</property>
             <child>
-              <widget class="GtkButton" id="missing_val_ok">
+              <widget class="GtkRadioButton" id="range_missing">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-ok</property>
-                <property name="use_stock">True</property>
+                <property name="label" translatable="yes">_Range plus one optional discrete missing value</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
                 <property name="response_id">0</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">no_missing</property>
               </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
             </child>
             <child>
-              <widget class="GtkButton" id="missing_val_cancel">
+              <widget class="GtkVBox" id="vbox8">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-cancel</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
+                <property name="spacing">5</property>
+                <child>
+                  <widget class="GtkHBox" id="hbox7">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkHBox" id="hbox8">
+                        <property name="visible">True</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="mnemonic_widget">mv-low</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">20</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>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox9">
+                        <property name="visible">True</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="mnemonic_widget">mv-high</property>
+                          </widget>
+                          <packing>
+                            <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>
+                          </widget>
+                          <packing>
+                            <property name="padding">5</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="fill">False</property>
+                        <property name="padding">20</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkHBox" id="hbox6">
+                    <property name="visible">True</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="mnemonic_widget">mv-discrete</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">20</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>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
               </widget>
               <packing>
                 <property name="position">1</property>
               </packing>
             </child>
-            <child>
-              <widget class="GtkButton" id="help_button_missing_values">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="label">gtk-help</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
           </widget>
           <packing>
-            <property name="left_attach">1</property>
             <property name="right_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="x_options">GTK_FILL</property>
           </packing>
         </child>
         <child>
           </packing>
         </child>
         <child>
-          <widget class="GtkVBox" id="vbox7">
+          <widget class="GtkVButtonBox" id="vbuttonbox5">
             <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="spacing">5</property>
+            <property name="layout_style">GTK_BUTTONBOX_START</property>
             <child>
-              <widget class="GtkRadioButton" id="range_missing">
+              <widget class="GtkButton" id="missing_val_ok">
                 <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="focus_on_click">False</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-ok</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="missing_val_cancel">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">True</property>
                 <property name="response_id">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">no_missing</property>
               </widget>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkVBox" id="vbox8">
+              <widget class="GtkButton" id="help_button_missing_values">
                 <property name="visible">True</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkHBox" id="hbox7">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox8">
-                        <property name="visible">True</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="mnemonic_widget">mv-low</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="padding">20</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>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox9">
-                        <property name="visible">True</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="mnemonic_widget">mv-high</property>
-                          </widget>
-                          <packing>
-                            <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>
-                          </widget>
-                          <packing>
-                            <property name="padding">5</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="fill">False</property>
-                        <property name="padding">20</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox6">
-                    <property name="visible">True</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="mnemonic_widget">mv-discrete</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">20</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>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
               </widget>
               <packing>
-                <property name="position">1</property>
+                <property name="position">2</property>
               </packing>
             </child>
           </widget>
           <packing>
+            <property name="left_attach">1</property>
             <property name="right_attach">2</property>
-            <property name="top_attach">1</property>
-            <property name="bottom_attach">2</property>
-            <property name="x_options">GTK_FILL</property>
           </packing>
         </child>
       </widget>
index 9af3d737cddd03561101c97460a7b9fed7712eab..a49d2c5b2ca066f893a283d70a3f1440e88873c8 100644 (file)
@@ -43,6 +43,8 @@ struct data_editor
   GtkAction *invoke_variable_info_dialog;
   GtkAction *invoke_find_dialog;
   GtkAction *invoke_rank_dialog;
+  GtkAction *invoke_recode_same_dialog;
+  GtkAction *invoke_recode_different_dialog;
 
   GtkAction *invoke_descriptives_dialog;
 
index 3f72522117a08dd8034605125d5a130fc3ca45c7..723a65e4a3bf5751b0923961db90bdf36000e989 100644 (file)
@@ -136,6 +136,103 @@ set_dest_model (GtkTreeView *dest, PsppireDict *dict)
 
   gtk_tree_view_column_set_sizing (col, GTK_TREE_VIEW_COLUMN_FIXED);
 
-  gtk_tree_view_append_column (GTK_TREE_VIEW(dest), col);
+  gtk_tree_view_append_column (GTK_TREE_VIEW (dest), col);
+}
+
+
+
+/* Returns FALSE if the variables represented by the union of the rows
+   currently selected by SOURCE widget, and contents of the DEST
+   widget, are of different types.
+
+   In other words, this function when passed as the argument to
+   psppire_selector_set_allow, ensures that the selector selects only
+   string  variables, or only numeric variables, not a mixture.
+*/
+gboolean
+homogeneous_types (GtkWidget *source, GtkWidget *dest)
+{
+  gboolean ok;
+  GtkTreeIter iter;
+  gboolean retval = TRUE;
+
+  GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (source));
+
+  PsppireDict *dict;
+  GtkTreeSelection *selection;
+  enum val_type type = -1;
+  GList *list, *l;
+
+  while (GTK_IS_TREE_MODEL_FILTER (model))
+    {
+      model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
+    }
+
+  dict = PSPPIRE_DICT (model);
+
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (source));
+
+  list = gtk_tree_selection_get_selected_rows (selection, &model);
+
+  /* Iterate through the selection of the source treeview */
+  for (l = list; l ; l = l->next)
+    {
+      GtkTreePath *path = l->data;
+      GtkTreePath *fpath;
+      gint *idx;
+
+      const struct variable *v;
+
+      fpath = gtk_tree_model_filter_convert_path_to_child_path (GTK_TREE_MODEL_FILTER (model), path);
+
+      idx = gtk_tree_path_get_indices (fpath);
+
+      v = psppire_dict_get_variable (dict, idx[0]);
+
+      if ( type != -1 )
+       {
+         if ( var_get_type (v) != type )
+           {
+             retval = FALSE;
+             break;
+           }
+       }
+
+      type = var_get_type (v);
+    }
+
+  g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
+  g_list_free (list);
+
+  if ( retval == FALSE )
+    return FALSE;
+
+  /* now deal with the dest widget */
+  model = gtk_tree_view_get_model (GTK_TREE_VIEW (dest));
+
+  for (ok = gtk_tree_model_get_iter_first (model, &iter);
+       ok;
+       ok = gtk_tree_model_iter_next (model, &iter))
+    {
+      gint idx;
+      const struct variable *v;
+      gtk_tree_model_get (model, &iter, 0, &idx, -1);
+
+      v = psppire_dict_get_variable (dict, idx);
+
+      if ( type != -1 )
+       {
+         if ( var_get_type (v) != type )
+           {
+             retval = FALSE;
+             break;
+           }
+       }
+
+      type = var_get_type (v);
+    }
+
+
+  return retval;
 }
 
index b952e9cbab54d89373cd027f7e55255be2af2eda..4dd11cb7864822a52045ccd0fe3e9c8b03bfcff1 100644 (file)
@@ -55,4 +55,15 @@ void cell_var_name (GtkTreeViewColumn *tree_column,
 void set_dest_model (GtkTreeView *dest, PsppireDict *dict);
 
 
+/* Returns FALSE if the variables represented by the union of the rows
+   currently selected by SOURCE widget, and contents of the DEST
+   widget, are of different types.
+
+   In other words, this function when passed as the argument to
+   psppire_selector_set_allow, ensures that the selector selects only
+   string  variables, or only numeric variables, not a mixture.
+*/
+gboolean homogeneous_types (GtkWidget *source, GtkWidget *dest);
+
+
 #endif
index 5ed0e98845c9b8e74282e07deb14dc5e256e2f24..9cbd6f0f2a9d9bf6991da032358d344e25d505a6 100644 (file)
@@ -297,3 +297,46 @@ marshaller_VOID__INT_INT_INT (GClosure     *closure,
             g_marshal_value_peek_int (param_values + 3),
             data2);
 }
+
+/* Create a deep copy of SRC */
+GtkListStore *
+clone_list_store (const GtkListStore *src)
+{
+  GtkTreeIter src_iter;
+  gboolean ok;
+  gint i;
+  const gint n_cols =  gtk_tree_model_get_n_columns (GTK_TREE_MODEL (src));
+  GType *types = g_malloc (sizeof (*types) *  n_cols);
+
+  int row = 0;
+  GtkListStore *dest;
+
+  for (i = 0 ; i < n_cols; ++i )
+    types[i] = gtk_tree_model_get_column_type (GTK_TREE_MODEL (src), i);
+
+  dest = gtk_list_store_newv (n_cols, types);
+
+  for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (src),
+                                          &src_iter);
+       ok;
+       ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (src), &src_iter))
+    {
+      GtkTreeIter dest_iter;
+      gtk_list_store_append  (dest, &dest_iter);
+
+      for (i = 0 ; i < n_cols; ++i )
+       {
+         GValue val = {0};
+
+         gtk_tree_model_get_value (GTK_TREE_MODEL (src), &src_iter, i, &val);
+         gtk_list_store_set_value (dest, &dest_iter, i, &val);
+
+         g_value_unset (&val);
+       }
+      row++;
+    }
+
+  return dest;
+}
+
+
index eb50bdd2648d404f00e57545d9830090431eeaa6..377066176f5257528a15db5e6eb715062c93d603 100644 (file)
@@ -67,4 +67,8 @@ void marshaller_VOID__INT_INT_INT (GClosure     *closure,
                                   gpointer      marshal_data);
 
 
+/* Create a deep copy of SRC */
+GtkListStore * clone_list_store (const GtkListStore *src);
+
+
 #endif
index f94756ec23808eda5f1187430c33c5cc14db5d0d..b3cff6be7143d7d9da574de56e1e76c8328795f5 100644 (file)
@@ -371,6 +371,7 @@ list_store_changed (struct contrasts_subdialog *csd)
 }
 
 
+
 /* Copy the contrasts array into the local array */
 static GArray *
 clone_contrasts_array (GArray *src_array)
@@ -383,7 +384,7 @@ clone_contrasts_array (GArray *src_array)
 
   for (i = 0 ; i < src_array->len ; ++i )
     {
-      gboolean ok;
+
       GtkTreeIter src_iter;
       GtkListStore *src = g_array_index (src_array, GtkListStore*, i);
       GtkListStore *dest;
@@ -393,21 +394,7 @@ clone_contrasts_array (GArray *src_array)
                                           &src_iter))
        continue;
 
-      dest = gtk_list_store_new (1, G_TYPE_DOUBLE);
-
-      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL(src),
-                                              &src_iter);
-          ok;
-          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (src), &src_iter))
-       {
-         gdouble v;
-         GtkTreeIter dest_iter;
-
-         gtk_tree_model_get (GTK_TREE_MODEL (src), &src_iter, 0, &v, -1);
-
-         gtk_list_store_append  (dest, &dest_iter);
-         gtk_list_store_set (dest, &dest_iter, 0, v, -1);
-       }
+      dest = clone_list_store (src);
 
       g_array_append_val (dest_array, dest);
     }
index 0de169c2dc41647ff78d8acb2fdac6c28a0f7b78..b85229d2ea381540e7c13ce650da9312136b4f3c 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+
+/*
+  This widget is a GtkBox which looks roughly like:
+
+  +-----------------------------+
+  |+------------+  +----------+        |
+  ||   Add      |  |         | |
+  |+------------+  |         | |
+  |                |         | |
+  |+------------+  |         | |
+  ||   Edit     |  |         | |
+  |+------------+  |         | |
+  |               |          | |
+  |+------------+  |         | |
+  ||  Remove    |  |         | |
+  |+------------+  +----------+        |
+  +-----------------------------+
+
+*/
+
 #include <gtk/gtk.h>
 
 #include "psppire-acr.h"
 
 static void psppire_acr_init (PsppireAcr *);
 
-enum {
-  COLUMN_DOUBLE,
-  n_COLUMNS
-};
-
-
 GType
 psppire_acr_get_type (void)
 {
@@ -53,29 +67,99 @@ psppire_acr_get_type (void)
   return acr_type;
 }
 
+
+static gboolean row_is_selected (const PsppireAcr *acr);
+
+
+static gboolean
+value_from_entry (gint col, GValue *val, gpointer data)
+{
+  GtkEntry *entry = data;
+  const gchar *text = gtk_entry_get_text (entry);
+  gdouble x = g_strtod (text, 0);
+
+  g_value_init (val, G_TYPE_DOUBLE);
+  g_value_set_double (val, x);
+
+  return TRUE;
+}
+
+
+/* Returns true, if there's text in the entry */
+static gboolean
+entry_not_empty (gpointer data)
+{
+  GtkEntry *entry = data;
+
+  const char *text = gtk_entry_get_text (entry);
+
+  return !g_str_equal (text, "");
+}
+
+
 static void
-on_add_button_clicked (PsppireAcr *acr)
+clear_entry (gpointer data)
 {
-  GtkTreeIter iter;
-  gdouble x;
+  GtkEntry *entry = data;
+  gtk_entry_set_text (entry, "");
+}
+
+
+static void
+on_entry_change (GtkEntry *entry, PsppireAcr *acr)
+{
+  gtk_widget_set_sensitive (acr->add_button, acr->enabled (entry));
+
+  gtk_widget_set_sensitive (acr->change_button, acr->enabled (entry)
+                           && row_is_selected (acr));
+}
+
+void
+psppire_acr_set_entry  (PsppireAcr *acr, GtkEntry *entry)
+{
+  acr->get_value = value_from_entry;
+  acr->get_value_data = entry;
+  acr->enabled = entry_not_empty;
+  acr->enabled_data = entry;
+  acr->update = clear_entry;
+  acr->update_data = entry;
+
+  g_signal_connect (entry, "changed", G_CALLBACK (on_entry_change), acr);
+}
 
-  const gchar *text = gtk_entry_get_text (acr->entry);
-  x = g_strtod (text, 0);
 
+/* Callback for when the Add button is clicked.
+   It appends an item to the list. */
+static void
+on_add_button_clicked (PsppireAcr *acr)
+{
+  gint i;
+  GtkTreeIter iter;
   gtk_list_store_append (acr->list_store, &iter);
 
-  gtk_list_store_set (acr->list_store, &iter,
-                     COLUMN_DOUBLE, x,
-                     -1);
+  for (i = 0 ;
+       i < gtk_tree_model_get_n_columns (GTK_TREE_MODEL (acr->list_store));
+       ++i)
+    {
+      static GValue value;
+      if ( ! acr->get_value (i, &value, acr->get_value_data) )
+       continue;
 
-  gtk_entry_set_text (acr->entry, "");
+      gtk_list_store_set_value (acr->list_store, &iter,
+                               i, &value);
+      g_value_unset (&value);
+    }
+
+  if (acr->update) acr->update (acr->update_data);
 }
 
+
+/* Callback for when the Changed button is clicked.
+   It replaces the currently selected entry. */
 static void
 on_change_button_clicked (PsppireAcr *acr)
 {
-  const gchar *text;
-  GValue value = {0};
+  gint i;
   GtkTreeModel *model = GTK_TREE_MODEL (acr->list_store);
 
   GList *l=
@@ -88,16 +172,28 @@ on_change_button_clicked (PsppireAcr *acr)
 
   gtk_tree_model_get_iter (model, &iter, path);
 
-  text = gtk_entry_get_text (acr->entry);
+  for (i = 0 ;
+       i < gtk_tree_model_get_n_columns (GTK_TREE_MODEL (acr->list_store));
+       ++i)
+    {
+      static GValue value;
+      if ( ! acr->get_value (i, &value, acr->get_value_data) )
+       continue;
 
-  g_value_init (&value, G_TYPE_DOUBLE);
-  g_value_set_double (&value, g_strtod (text, NULL));
-  gtk_list_store_set_value (acr->list_store, &iter, 0, &value);
+      gtk_list_store_set_value (acr->list_store, &iter,
+                               i, &value);
+      g_value_unset (&value);
+    }
 
   g_list_foreach (l, (GFunc) gtk_tree_path_free, NULL);
   g_list_free (l);
+
+  if ( acr->update) acr->update (acr->update_data);
 }
 
+
+/* Callback for when the remove button is clicked.
+   It deletes the currently selected entry. */
 static void
 on_remove_button_clicked (PsppireAcr *acr)
 {
@@ -119,15 +215,10 @@ on_remove_button_clicked (PsppireAcr *acr)
   g_list_free (l);
 }
 
+/* Returns true if there is a row currently selected.
+   False otherwise. */
 static gboolean
-value_present (const PsppireAcr *acr)
-{
-  const char *text = gtk_entry_get_text (acr->entry);
-  return !g_str_equal (text, "");
-}
-
-static gboolean
-row_is_selected (PsppireAcr *acr)
+row_is_selected (const PsppireAcr *acr)
 {
   gboolean result;
   GtkTreeModel *model = GTK_TREE_MODEL (acr->list_store);
@@ -143,6 +234,8 @@ row_is_selected (PsppireAcr *acr)
 }
 
 
+/* Callback which occurs when an item in the treeview
+   is selected */
 static void
 on_select (GtkTreeSelection *selection, gpointer data)
 {
@@ -151,10 +244,21 @@ on_select (GtkTreeSelection *selection, gpointer data)
   gtk_widget_set_sensitive (acr->remove_button, row_is_selected (acr));
 
   gtk_widget_set_sensitive (acr->change_button,
-                           row_is_selected (acr) && value_present (acr));
+                           row_is_selected (acr)
+                           );
 }
 
 
+void
+psppire_acr_set_enabled (PsppireAcr *acr, gboolean status)
+{
+
+  gtk_widget_set_sensitive (acr->add_button, status);
+
+  gtk_widget_set_sensitive (acr->change_button, status
+                           && row_is_selected (acr));
+}
+
 
 static void
 psppire_acr_init (PsppireAcr *acr)
@@ -169,6 +273,11 @@ psppire_acr_init (PsppireAcr *acr)
   acr->change_button = gtk_button_new_from_stock (GTK_STOCK_EDIT);
   acr->remove_button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
 
+  acr->get_value = NULL;
+  acr->get_value_data = NULL;
+  acr->enabled = NULL;
+  acr->update = NULL;
+
   gtk_widget_set_sensitive (acr->change_button, FALSE);
   gtk_widget_set_sensitive (acr->remove_button, FALSE);
   gtk_widget_set_sensitive (acr->add_button, FALSE);
@@ -215,19 +324,16 @@ psppire_acr_init (PsppireAcr *acr)
   gtk_widget_show_all (sw);
 
   {
-    GtkCellRenderer *renderer;
-    GtkTreeViewColumn *column;
-
-    renderer = gtk_cell_renderer_text_new ();
-    column = gtk_tree_view_column_new_with_attributes ("header",
-                                                      renderer,
-                                                      "text", COLUMN_DOUBLE,
-                                                      NULL);
+    GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
+    GtkTreeViewColumn *column =
+      gtk_tree_view_column_new_with_attributes ("value",
+                                               renderer,
+                                               "text", 0,
+                                               NULL);
 
     gtk_tree_view_append_column (acr->tv, column);
   }
 
-  acr->entry = NULL;
 }
 
 
@@ -237,23 +343,6 @@ psppire_acr_new (void)
   return GTK_WIDGET (g_object_new (psppire_acr_get_type (), NULL));
 }
 
-static void
-on_entry_change (GtkEntry *entry, PsppireAcr *acr)
-{
-  gtk_widget_set_sensitive (acr->add_button, value_present (acr));
-
-  gtk_widget_set_sensitive (acr->change_button, value_present (acr)
-                           && row_is_selected (acr));
-}
-
-void
-psppire_acr_set_entry  (PsppireAcr *acr, GtkEntry *entry)
-{
-  acr->entry = entry;
-
-  g_signal_connect (entry, "changed", G_CALLBACK (on_entry_change), acr);
-}
-
 
 
 /* Set the widget's treemodel */
@@ -267,3 +356,19 @@ psppire_acr_set_model (PsppireAcr *acr, GtkListStore *liststore)
 
   gtk_widget_set_sensitive (GTK_WIDGET (acr), liststore != NULL);
 }
+
+
+void
+psppire_acr_set_enable_func (PsppireAcr *acr, EnabledFunc func, gpointer p)
+{
+  acr->enabled = func;
+  acr->enabled_data = p;
+}
+
+void
+psppire_acr_set_get_value_func (PsppireAcr *acr,
+                               GetValueFunc getvalue, gpointer data)
+{
+  acr->get_value_data = data;
+  acr->get_value = getvalue;
+}
index 9983a9efb55aed0fd6c22ca6b2f8d7023f6c681f..ba38631d22dadbce0c10fcba79ca65609e08ee3b 100644 (file)
@@ -35,7 +35,8 @@
   |+------------+  +----------+        |
   +-----------------------------+
 
-  It interacts with a GtkEntry, which  allows items to be added to its internal list.
+  It interacts with an external widget, such as a GtkEntry.
+  It maintains a list of items controlled by the three buttons.
   This implementation deals only with g_double values.
  */
 
@@ -59,20 +60,33 @@ G_BEGIN_DECLS
 typedef struct _PsppireAcr       PsppireAcr;
 typedef struct _PsppireAcrClass  PsppireAcrClass;
 
-/* All members are private. */
+typedef gboolean (*GetValueFunc) (gint, GValue *, gpointer);
+typedef gboolean (*EnabledFunc) (gpointer);
+typedef void (*UpdateCallbackFunc) (gpointer);
+
 struct _PsppireAcr
 {
   GtkHBox parent;
 
-  /* <private> */
-  GtkEntry *entry;
+
   GtkListStore *list_store;
 
   GtkTreeView *tv;
   GtkTreeSelection *selection;
+
+  /* The buttons */
   GtkWidget *add_button;
   GtkWidget *change_button;
   GtkWidget *remove_button;
+
+  GetValueFunc get_value;
+  gpointer get_value_data;
+
+  EnabledFunc enabled;
+  gpointer enabled_data;
+
+  UpdateCallbackFunc update;
+  gpointer update_data;
 };
 
 
@@ -82,11 +96,20 @@ struct _PsppireAcrClass
 };
 
 
-GType          psppire_acr_get_type        (void);
-GtkWidget*     psppire_acr_new             (void);
 
-void           psppire_acr_set_entry       (PsppireAcr *, GtkEntry *);
-void           psppire_acr_set_model       (PsppireAcr *, GtkListStore *);
+GType       psppire_acr_get_type        (void);
+GtkWidget*  psppire_acr_new             (void);
+
+void        psppire_acr_set_model       (PsppireAcr *, GtkListStore *);
+void        psppire_acr_set_get_value_func (PsppireAcr *, GetValueFunc,
+                                           gpointer);
+
+void        psppire_acr_set_enable_func (PsppireAcr *, EnabledFunc, gpointer);
+
+void        psppire_acr_set_enabled (PsppireAcr *, gboolean);
+void        psppire_acr_set_entry  (PsppireAcr *, GtkEntry *);
+
+
 
 G_END_DECLS
 
index 90080094f8e2e5d4d4a22ea8ce1a09862abcca96..b0d8a7a34f22a51d7a5e38cdc44da7ec23a60461 100644 (file)
@@ -106,6 +106,8 @@ psppire_dialog_get_property (GObject         *object,
          g_value_set_enum (value, PSPPIRE_VERTICAL);
        else if ( GTK_IS_HBOX (dialog->box))
          g_value_set_enum (value, PSPPIRE_HORIZONTAL);
+       else if ( GTK_IS_TABLE (dialog->box))
+         g_value_set_enum (value, PSPPIRE_TABULAR);
       }
       break;
     default:
@@ -125,13 +127,21 @@ dialog_set_orientation (PsppireDialog *dialog, const GValue *orval)
       gtk_container_remove (GTK_CONTAINER (dialog), dialog->box);
     }
 
-  if ( orientation == PSPPIRE_HORIZONTAL)
+  switch ( orientation )
     {
+    case PSPPIRE_HORIZONTAL:
       dialog->box = gtk_hbox_new (FALSE, 5);
-    }
-  else
-    {
+      break;
+    case PSPPIRE_VERTICAL:
       dialog->box = gtk_vbox_new (FALSE, 5);
+      break;
+    case PSPPIRE_TABULAR:
+      dialog->box = gtk_table_new (2, 3, FALSE);
+      g_object_set (dialog->box,
+                   "row-spacing", 5,
+                   "column-spacing", 5,
+                   NULL);
+      break;
     }
 
   gtk_container_add (GTK_CONTAINER (dialog), dialog->box);
@@ -277,8 +287,8 @@ psppire_dialog_new (void)
 }
 
 
-static void
-notify_change (PsppireDialog *dialog)
+void
+psppire_dialog_notify_change (PsppireDialog *dialog)
 {
   if ( dialog->contents_are_valid )
     {
@@ -290,7 +300,7 @@ notify_change (PsppireDialog *dialog)
 
 
 /* Descend the widget tree, connecting appropriate signals to the
-   notify_change callback */
+   psppire_dialog_notify_change callback */
 static void
 connect_notify_signal (GtkWidget *w, gpointer data)
 {
@@ -315,28 +325,33 @@ connect_notify_signal (GtkWidget *w, gpointer data)
 
   if ( GTK_IS_TOGGLE_BUTTON (w))
     {
-      g_signal_connect_swapped (w, "toggled", G_CALLBACK (notify_change),
+      g_signal_connect_swapped (w, "toggled",
+                               G_CALLBACK (psppire_dialog_notify_change),
                                dialog);
     }
 
   if ( PSPPIRE_IS_SELECTOR (w))
     {
-      g_signal_connect_swapped (w, "selected", G_CALLBACK (notify_change),
+      g_signal_connect_swapped (w, "selected",
+                               G_CALLBACK (psppire_dialog_notify_change),
                                dialog);
 
-      g_signal_connect_swapped (w, "de-selected", G_CALLBACK (notify_change),
+      g_signal_connect_swapped (w, "de-selected",
+                               G_CALLBACK (psppire_dialog_notify_change),
                                dialog);
     }
 
   if ( GTK_IS_EDITABLE (w))
     {
-      g_signal_connect_swapped (w, "changed", G_CALLBACK (notify_change),
+      g_signal_connect_swapped (w, "changed",
+                               G_CALLBACK (psppire_dialog_notify_change),
                                dialog);
     }
 
   if ( GTK_IS_CELL_EDITABLE (w))
     {
-      g_signal_connect_swapped (w, "editing-done", G_CALLBACK (notify_change),
+      g_signal_connect_swapped (w, "editing-done",
+                               G_CALLBACK (psppire_dialog_notify_change),
                                dialog);
     }
 
@@ -344,7 +359,8 @@ connect_notify_signal (GtkWidget *w, gpointer data)
     {
       GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w));
 
-      g_signal_connect_swapped (buffer, "changed", G_CALLBACK (notify_change),
+      g_signal_connect_swapped (buffer, "changed",
+                               G_CALLBACK (psppire_dialog_notify_change),
                                dialog);
     }
 
@@ -355,9 +371,23 @@ connect_notify_signal (GtkWidget *w, gpointer data)
       GtkTreeSelection *selection =
        gtk_tree_view_get_selection (tv);
       GtkTreeViewColumn *col;
+      GtkTreeModel *model = gtk_tree_view_get_model (tv);
+
+      g_signal_connect_swapped (model, "row-changed",
+                               G_CALLBACK (psppire_dialog_notify_change),
+                               dialog);
+
+      g_signal_connect_swapped (model, "row-deleted",
+                               G_CALLBACK (psppire_dialog_notify_change),
+                               dialog);
+
+      g_signal_connect_swapped (model, "row-inserted",
+                               G_CALLBACK (psppire_dialog_notify_change),
+                               dialog);
 
       g_signal_connect_swapped (selection, "changed",
-                               G_CALLBACK (notify_change), dialog);
+                               G_CALLBACK (psppire_dialog_notify_change),
+                               dialog);
 
       while ((col = gtk_tree_view_get_column (tv, i++)))
        {
@@ -367,7 +397,7 @@ connect_notify_signal (GtkWidget *w, gpointer data)
            {
              if ( GTK_IS_CELL_RENDERER_TOGGLE (renderers->data))
                g_signal_connect_swapped (renderers->data, "toggled",
-                                         G_CALLBACK (notify_change), dialog);
+                                         G_CALLBACK (psppire_dialog_notify_change), dialog);
              renderers = renderers->next;
            }
          g_list_free (start);
@@ -418,6 +448,7 @@ psppire_orientation_get_type (void)
        {
          { PSPPIRE_HORIZONTAL, "PSPPIRE_HORIZONTAL", "Horizontal" },
          { PSPPIRE_VERTICAL,   "PSPPIRE_VERTICAL",   "Vertical" },
+         { PSPPIRE_TABULAR,   "PSPPIRE_TABULAR",   "Tabular" },
          { 0, NULL, NULL }
        };
 
index bd51a4c40da9b4ec3ebf963526121f09453a627a..05215ce984e2b14bd332aad5bb02f86ffd25d2ef 100644 (file)
@@ -70,6 +70,8 @@ gint           psppire_dialog_run             (PsppireDialog *);
 void           psppire_dialog_set_valid_predicate (PsppireDialog *,
                                                   ContentsAreValid,
                                                   gpointer );
+void           psppire_dialog_notify_change (PsppireDialog *);
+
 
 
 GType psppire_orientation_get_type (void);
@@ -78,7 +80,8 @@ GType psppire_orientation_get_type (void);
 typedef enum
   {
     PSPPIRE_HORIZONTAL,
-    PSPPIRE_VERTICAL
+    PSPPIRE_VERTICAL,
+    PSPPIRE_TABULAR
   } PsppireOrientation;
 
 #define G_TYPE_PSPPIRE_ORIENTATION (psppire_orientation_get_type ())
index 5ec051bb9a98c8f83ed4a87f67bf4eab4e74399c..bd990de8b2b6c4e7b18d4ce793ec53711e8ec5c7 100644 (file)
@@ -126,6 +126,9 @@ enum
 };
 
 
+static void on_activate (PsppireSelector *selector, gpointer data);
+
+
 static void
 psppire_selector_set_property (GObject         *object,
                               guint            prop_id,
@@ -230,16 +233,23 @@ psppire_selector_base_finalize(PsppireSelectorClass *class,
 }
 
 
+
 static void
 psppire_selector_init (PsppireSelector *selector)
 {
   selector->arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
   selector->filtered_source = NULL;
 
+  selector->action = gtk_action_new ("select", NULL, NULL, NULL);
+
+  gtk_action_connect_proxy (selector->action, GTK_WIDGET (selector));
+
   gtk_container_add (GTK_CONTAINER (selector), selector->arrow);
 
   gtk_widget_show (selector->arrow);
 
+  g_signal_connect_swapped (selector->action, "activate", G_CALLBACK (on_activate), selector);
+
   selector->selecting = FALSE;
 }
 
@@ -311,9 +321,14 @@ on_source_select (GtkTreeSelection *treeselection, gpointer data)
 
   set_direction (selector, PSPPIRE_SELECTOR_SOURCE_TO_DEST);
 
-  if ( GTK_IS_ENTRY (selector->dest) )
+  if ( selector->allow_selection )
+    {
+      gtk_action_set_sensitive (selector->action,
+                               selector->allow_selection (selector->source, selector->dest));
+    }
+  else if ( GTK_IS_ENTRY (selector->dest) )
     {
-      gtk_widget_set_sensitive (GTK_WIDGET (selector),
+      gtk_action_set_sensitive (selector->action,
                                gtk_tree_selection_count_selected_rows
                                (treeselection) <= 1 );
     }
@@ -325,6 +340,8 @@ on_dest_treeview_select (GtkTreeSelection *treeselection, gpointer data)
 {
   PsppireSelector *selector = data;
 
+  gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (selector->source)));
+
   set_direction (selector, PSPPIRE_SELECTOR_DEST_TO_SOURCE);
 }
 
@@ -470,12 +487,14 @@ on_row_activate (GtkTreeView       *tree_view,
 {
   PsppireSelector *selector  = data;
 
-  select_selection (selector);
+  gtk_action_activate (selector->action);
 }
 
-/* Callback for when the selector button is clicked */
+/* Callback for when the selector button is clicked,
+   or other event which causes the selector's action to occur.
+ */
 static void
-on_click (PsppireSelector *selector, gpointer data)
+on_activate (PsppireSelector *selector, gpointer data)
 {
   switch (selector->direction)
     {
@@ -690,6 +709,7 @@ on_entry_dest_select (GtkWidget *widget, GdkEventFocus *event, gpointer data)
 {
   PsppireSelector * selector = data;
 
+  gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (selector->source)));
   set_direction (selector, PSPPIRE_SELECTOR_DEST_TO_SOURCE);
 
   return FALSE;
@@ -767,8 +787,6 @@ psppire_selector_set_subjects (PsppireSelector *selector,
        selector->filter = is_item_in_dest;
     }
 
-  g_signal_connect (selector, "clicked", G_CALLBACK (on_click), NULL);
-
   if ( GTK_IS_TREE_VIEW (source))
     set_tree_view_source (selector, GTK_TREE_VIEW (source) );
   else
@@ -795,6 +813,14 @@ psppire_selector_set_subjects (PsppireSelector *selector,
 
 
 
+void
+psppire_selector_set_allow        (PsppireSelector *selector , AllowSelectionFunc *allow)
+{
+  selector->allow_selection = allow;
+}
+
+
+
 GType
 psppire_selector_orientation_get_type (void)
 {
index f5ca4e9a94f76663a9f9be020193452d90b5a2b3..6385c14c2155b48ae2d7a3664d4e8cf058f54e49 100644 (file)
@@ -22,6 +22,7 @@
 #include <glib.h>
 #include <glib-object.h>
 #include <gtk/gtkbutton.h>
+#include <gtk/gtkaction.h>
 #include <gtk/gtkarrow.h>
 #include <gtk/gtktreemodel.h>
 #include <gtk/gtktreemodelfilter.h>
@@ -47,6 +48,9 @@ typedef void SelectItemsFunc (GtkTreeIter iter,
                              GtkWidget *dest,
                              GtkTreeModel *source_model);
 
+/* Function to determine if items may be selected */
+typedef gboolean AllowSelectionFunc (GtkWidget *src, GtkWidget *dest);
+
 
 /* Function to determine whether an item in MODEL, pointed to by ITER
    is currently selected.
@@ -70,6 +74,7 @@ struct _PsppireSelector
 
   /* <private> */
   GtkWidget *arrow;
+  GtkAction *action;
 
   enum psppire_selector_dir direction;
   GtkWidget *source;
@@ -87,6 +92,8 @@ struct _PsppireSelector
 
   SelectItemsFunc *select_items;
   FilterItemsFunc *filter;
+
+  AllowSelectionFunc *allow_selection;
 };
 
 struct _PsppireSelectorClass
@@ -106,6 +113,9 @@ void       psppire_selector_set_subjects    (PsppireSelector *,
                                             SelectItemsFunc *,
                                             FilterItemsFunc * );
 
+void      psppire_selector_set_allow        (PsppireSelector *, AllowSelectionFunc *);
+
+
 GType psppire_selector_orientation_get_type (void) G_GNUC_CONST;
 
 
diff --git a/src/ui/gui/recode-dialog.c b/src/ui/gui/recode-dialog.c
new file mode 100644 (file)
index 0000000..103c85c
--- /dev/null
@@ -0,0 +1,1556 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2007  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+/* This module implements the RECODE dialog.
+
+   It has two forms.  One for recoding values into the same variable.
+   The second for recoding into different variables.
+*/
+
+#include <config.h>
+
+#include "recode-dialog.h"
+
+#include <gtk/gtk.h>
+#include <gtksheet/gtksheet.h>
+
+#include <language/syntax-string-source.h>
+#include <ui/gui/data-editor.h>
+#include <ui/gui/dialog-common.h>
+#include <ui/gui/dict-display.h>
+#include <ui/gui/helper.h>
+#include <ui/gui/psppire-dialog.h>
+#include <ui/gui/psppire-var-store.h>
+#include <ui/gui/syntax-editor.h>
+#include <libpspp/syntax-gen.h>
+
+#include "psppire-acr.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
+/* Define a boxed type to represent a value which is a candidate
+   to replace an existing value */
+
+enum new_value_type
+ {
+   NV_NUMERIC,
+   NV_STRING,
+   NV_SYSMIS,
+   NV_COPY
+ };
+
+
+struct new_value
+{
+  enum new_value_type type;
+  union {
+    double v;
+    gchar *s;
+  } v;
+};
+
+
+static struct new_value *
+new_value_copy (struct new_value *nv)
+{
+  struct new_value *copy = g_memdup (nv, sizeof (*copy));
+
+  if ( nv->type == NV_STRING )
+    copy->v.s = strdup (nv->v.s);
+
+  return copy;
+}
+
+
+static void
+new_value_free (struct new_value *nv)
+{
+  if ( nv->type == NV_STRING )
+    g_free (nv->v.s);
+
+  g_free (nv);
+}
+
+
+static void
+new_value_to_string (const GValue *src, GValue *dest)
+{
+  const struct new_value *nv = g_value_get_boxed (src);
+
+  g_assert (nv);
+
+  switch (nv->type)
+    {
+    case NV_NUMERIC:
+      {
+       gchar *text = g_strdup_printf ("%g", nv->v.v);
+       g_value_set_string (dest, text);
+       g_free (text);
+      }
+      break;
+    case NV_STRING:
+      g_value_set_string (dest, nv->v.s);
+      break;
+    case NV_COPY:
+      g_value_set_string (dest, "COPY");
+      break;
+    case NV_SYSMIS:
+      g_value_set_string (dest, "SYSMIS");
+      break;
+    default:
+      /* Shouldn't ever happen */
+      g_warning ("Invalid type in new recode value");
+      g_value_set_string (dest, "???");
+      break;
+    }
+}
+
+static GType
+new_value_get_type (void)
+{
+  static GType t = 0;
+
+  if (t == 0 )
+    {
+      t = g_boxed_type_register_static  ("psppire-recode-new-values",
+                                        (GBoxedCopyFunc) new_value_copy,
+                                        (GBoxedFreeFunc) new_value_free);
+
+      g_value_register_transform_func (t, G_TYPE_STRING,
+                                      new_value_to_string);
+    }
+
+  return t;
+}
+
+
+\f
+
+
+/* A boxed type representing a value, or a range of values which may
+   potentially be replaced by something */
+
+enum old_value_type
+ {
+   OV_NUMERIC,
+   OV_STRING,
+   OV_SYSMIS,
+   OV_MISSING,
+   OV_RANGE,
+   OV_LOW_UP,
+   OV_HIGH_DOWN,
+   OV_ELSE
+ };
+
+struct old_value
+ {
+   enum old_value_type type;
+   union {
+     double v;
+     gchar *s;
+     double range[2];
+   } v;
+ };
+
+
+static struct old_value *
+old_value_copy (struct old_value *ov)
+{
+  struct old_value *copy = g_memdup (ov, sizeof (*copy));
+
+  if ( ov->type == OV_STRING )
+    copy->v.s = g_strdup (ov->v.s);
+
+  return copy;
+}
+
+
+static void
+old_value_free (struct old_value *ov)
+{
+  if (ov->type == OV_STRING)
+    g_free (ov->v.s);
+  g_free (ov);
+}
+
+static void
+old_value_to_string (const GValue *src, GValue *dest)
+{
+  const struct old_value *ov = g_value_get_boxed (src);
+
+  switch (ov->type)
+    {
+    case OV_NUMERIC:
+      {
+       gchar *text = g_strdup_printf ("%g", ov->v.v);
+       g_value_set_string (dest, text);
+       g_free (text);
+      }
+      break;
+    case OV_STRING:
+      g_value_set_string (dest, ov->v.s);
+      break;
+    case OV_MISSING:
+      g_value_set_string (dest, "MISSING");
+      break;
+    case OV_SYSMIS:
+      g_value_set_string (dest, "SYSMIS");
+      break;
+    case OV_ELSE:
+      g_value_set_string (dest, "ELSE");
+      break;
+    case OV_RANGE:
+      {
+       gchar *text;
+       char en_dash[6] = {0,0,0,0,0,0};
+
+       g_unichar_to_utf8 (0x2013, en_dash);
+
+       text = g_strdup_printf ("%g %s %g",
+                                      ov->v.range[0],
+                                      en_dash,
+                                      ov->v.range[1]);
+       g_value_set_string (dest, text);
+       g_free (text);
+      }
+      break;
+    case OV_LOW_UP:
+      {
+       gchar *text;
+       char en_dash[6] = {0,0,0,0,0,0};
+
+       g_unichar_to_utf8 (0x2013, en_dash);
+
+       text = g_strdup_printf ("LOWEST %s %g",
+                               en_dash,
+                               ov->v.range[1]);
+
+       g_value_set_string (dest, text);
+       g_free (text);
+      }
+      break;
+    case OV_HIGH_DOWN:
+      {
+       gchar *text;
+       char en_dash[6] = {0,0,0,0,0,0};
+
+       g_unichar_to_utf8 (0x2013, en_dash);
+
+       text = g_strdup_printf ("%g %s HIGHEST",
+                               ov->v.range[0],
+                               en_dash);
+
+       g_value_set_string (dest, text);
+       g_free (text);
+      }
+      break;
+    default:
+      g_warning ("Invalid type in old recode value");
+      g_value_set_string (dest, "???");
+      break;
+    };
+}
+
+static GType
+old_value_get_type (void)
+{
+  static GType t = 0;
+
+  if (t == 0 )
+    {
+      t = g_boxed_type_register_static  ("psppire-recode-old-values",
+                                        (GBoxedCopyFunc) old_value_copy,
+                                        (GBoxedFreeFunc) old_value_free);
+
+      g_value_register_transform_func     (t, G_TYPE_STRING,
+                                          old_value_to_string);
+    }
+
+  return t;
+}
+
+\f
+
+enum
+  {
+    BUTTON_NEW_VALUE,
+    BUTTON_NEW_COPY,
+    BUTTON_NEW_SYSMIS,
+    BUTTON_OLD_VALUE,
+    BUTTON_OLD_SYSMIS,
+    BUTTON_OLD_MISSING,
+    BUTTON_OLD_RANGE,
+    BUTTON_OLD_LOW_UP,
+    BUTTON_OLD_HIGH_DOWN,
+    BUTTON_OLD_ELSE,
+    n_BUTTONS
+  };
+
+struct recode_dialog
+{
+  PsppireDict *dict;
+
+  GtkWidget *dialog;
+  PsppireDialog *old_and_new_dialog;
+
+  GtkWidget *dict_treeview;
+  GtkWidget *variable_treeview;
+  GtkWidget *toggle[n_BUTTONS];
+
+  GtkWidget *strings_box;
+  GtkWidget *convert_button;
+  GtkWidget *new_copy_label;
+
+  GtkWidget *ov_value_entry;
+  GtkWidget *new_value_entry;
+
+  GtkWidget *ov_range_lower_entry;
+  GtkWidget *ov_range_upper_entry;
+  GtkWidget *ov_low_up_entry;
+  GtkWidget *ov_high_down_entry;
+
+  GtkListStore *value_map;
+  GtkListStore *local_store;
+
+  /* Indicates that the INTO {new variables} form of the dialog
+     is being used */
+  gboolean different;
+
+  PsppireAcr *acr;
+
+  gboolean input_var_is_string;
+
+  GtkListStore *var_map;
+  GtkWidget *new_name_entry;
+  GtkWidget *new_label_entry;
+  GtkWidget *change_button;
+
+  GtkWidget *string_button;
+  GtkWidget *width_entry;
+};
+
+
+static void run_old_and_new_dialog (struct recode_dialog *rd);
+
+static void
+refresh (PsppireDialog *dialog, struct recode_dialog *rd)
+{
+  gtk_widget_set_sensitive (rd->change_button, FALSE);
+  gtk_widget_set_sensitive (rd->new_name_entry, FALSE);
+  gtk_widget_set_sensitive (rd->new_label_entry, FALSE);
+
+
+  if ( rd->different )
+    gtk_list_store_clear (GTK_LIST_STORE (rd->var_map));
+  else
+    {
+      GtkTreeModel *vars =
+       gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview));
+
+      gtk_list_store_clear (GTK_LIST_STORE (vars));
+    }
+
+  gtk_list_store_clear (GTK_LIST_STORE (rd->value_map));
+}
+
+static char * generate_syntax (const struct recode_dialog *rd);
+
+enum {
+  COL_OLD,
+  COL_NEW_NAME,
+  COL_NEW_LABEL,
+  n_COLS
+};
+
+enum {
+  COL_VALUE_OLD,
+  COL_VALUE_NEW,
+  n_COL_VALUES
+};
+
+/* Dialog is valid iff at least one variable has been selected,
+   AND the list of mappings is not empty.
+ */
+static gboolean
+dialog_state_valid (gpointer data)
+{
+  GtkTreeIter not_used;
+  struct recode_dialog *rd = data;
+
+  if ( ! rd->value_map )
+    return FALSE;
+
+  if ( ! gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->value_map),
+                                       &not_used) )
+    return FALSE;
+
+  if ( rd->different )
+    {
+      GtkTreeIter iter;
+
+      gboolean ok;
+
+      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->var_map),
+                                              &iter);
+          ok;
+          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (rd->var_map),
+                                         &iter))
+       {
+         gchar *name = NULL;
+
+         gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
+                             COL_NEW_NAME, &name, -1);
+
+         if ( name == NULL )
+           return FALSE;
+
+         g_free (name);
+       }
+    }
+  else
+    {
+      GtkTreeModel *vars =
+       gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview));
+
+      if ( !gtk_tree_model_get_iter_first (vars, &not_used))
+       return FALSE;
+
+    }
+
+  return TRUE;
+}
+
+static void
+on_old_new_show (struct recode_dialog *rd)
+{
+  gtk_toggle_button_set_active
+    (GTK_TOGGLE_BUTTON (rd->toggle[BUTTON_OLD_VALUE]), TRUE);
+
+  g_signal_emit_by_name (rd->toggle[BUTTON_OLD_VALUE], "toggled");
+
+  gtk_toggle_button_set_active
+    (GTK_TOGGLE_BUTTON (rd->toggle[BUTTON_NEW_VALUE]), TRUE);
+
+  g_signal_emit_by_name (rd->toggle[BUTTON_NEW_VALUE], "toggled");
+
+  g_object_set (rd->toggle[BUTTON_NEW_COPY],
+               "visible", rd->different, NULL);
+
+  g_object_set (rd->new_copy_label,
+               "visible", rd->different, NULL);
+
+  g_object_set (rd->strings_box,
+               "visible", rd->different, NULL);
+}
+
+/* Sets the sensitivity of TARGET dependent upon the active status
+   of BUTTON */
+static void
+toggle_sensitivity (GtkToggleButton *button, GtkWidget *target)
+{
+  gboolean state = gtk_toggle_button_get_active (button);
+
+  /*  g_print ("%s Setting %p (%s) to %d because of %p\n",
+      __FUNCTION__, target, gtk_widget_get_name (target), state, button); */
+
+  gtk_widget_set_sensitive (target, state);
+}
+
+static void recode_dialog (struct data_editor *de, gboolean diff);
+
+
+/* Pops up the Recode Same version of the dialog box */
+void
+recode_same_dialog (GObject *o, gpointer data)
+{
+  struct data_editor *de = data;
+
+  recode_dialog (de, FALSE);
+}
+
+/* Pops up the Recode Different version of the dialog box */
+void
+recode_different_dialog (GObject *o, gpointer data)
+{
+  struct data_editor *de = data;
+
+  recode_dialog (de, TRUE);
+}
+
+static void
+render_new_var_name (GtkTreeViewColumn *tree_column,
+                    GtkCellRenderer *cell,
+                    GtkTreeModel *tree_model,
+                    GtkTreeIter *iter,
+                    gpointer data)
+{
+  gchar *new_var_name = NULL;
+
+  gtk_tree_model_get (tree_model, iter, COL_NEW_NAME, &new_var_name, -1);
+
+  g_object_set (cell, "text", new_var_name, NULL);
+
+  g_free (new_var_name);
+}
+
+
+/* This might need to be changed to something less naive.
+   In particular, what happends with dates, etc?
+ */
+static gchar *
+num_to_string (gdouble x)
+{
+  return g_strdup_printf ("%g", x);
+}
+
+/* Callback which gets called when a new row is selected
+   in the acr's variable treeview.
+   We use if to set the togglebuttons and entries to correspond to the
+   selected row.
+*/
+static void
+on_acr_selection_change (GtkTreeSelection *selection, gpointer data)
+{
+  struct recode_dialog *rd = data;
+  GtkTreeModel *model = NULL;
+  GtkTreeIter iter;
+
+  GValue ov_value = {0};
+  GValue nv_value = {0};
+  struct old_value *ov = NULL;
+  struct new_value *nv = NULL;
+
+  if ( ! gtk_tree_selection_get_selected (selection, &model, &iter) )
+    return;
+
+
+  gtk_tree_model_get_value (GTK_TREE_MODEL (model), &iter,
+                           COL_VALUE_OLD, &ov_value);
+
+  gtk_tree_model_get_value (GTK_TREE_MODEL (model), &iter,
+                           COL_VALUE_NEW, &nv_value);
+
+  ov = g_value_get_boxed (&ov_value);
+  nv = g_value_get_boxed (&nv_value);
+
+  if (nv)
+    {
+      switch (nv->type)
+       {
+       case NV_NUMERIC:
+         {
+           gchar *str = num_to_string (nv->v.v);
+
+           gtk_toggle_button_set_active
+             (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_NEW_VALUE]), TRUE);
+
+           gtk_entry_set_text (GTK_ENTRY (rd->new_value_entry), str);
+           g_free (str);
+         }
+         break;
+       case NV_STRING:
+         gtk_toggle_button_set_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_NEW_VALUE]), TRUE);
+
+         gtk_entry_set_text (GTK_ENTRY (rd->new_value_entry), nv->v.s);
+         break;
+       case NV_SYSMIS:
+         gtk_toggle_button_set_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_NEW_SYSMIS]), TRUE);
+
+         break;
+       case NV_COPY:
+         gtk_toggle_button_set_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_NEW_COPY]), TRUE);
+
+         break;
+       default:
+         g_warning ("Invalid new value type");
+         break;
+       }
+
+      g_value_unset (&nv_value);
+    }
+
+  if ( ov )
+    {
+    switch (ov->type)
+      {
+      case OV_STRING:
+         gtk_toggle_button_set_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_OLD_VALUE]), TRUE);
+
+         gtk_entry_set_text (GTK_ENTRY (rd->ov_value_entry), ov->v.s);
+       break;
+
+      case OV_NUMERIC:
+       {
+         gchar *str;
+
+         gtk_toggle_button_set_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_OLD_VALUE]), TRUE);
+
+         str = num_to_string (ov->v.v);
+
+         gtk_entry_set_text (GTK_ENTRY (rd->ov_value_entry), str);
+
+         g_free (str);
+       }
+       break;
+
+      case OV_SYSMIS:
+       gtk_toggle_button_set_active
+         (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_OLD_SYSMIS]), TRUE);
+       break;
+
+      case OV_MISSING:
+       gtk_toggle_button_set_active
+         (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_OLD_MISSING]), TRUE);
+       break;
+
+      case OV_RANGE:
+       {
+         gchar *str;
+
+         gtk_toggle_button_set_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_OLD_RANGE]), TRUE);
+
+         str = num_to_string (ov->v.range[0]);
+
+         gtk_entry_set_text (GTK_ENTRY (rd->ov_range_lower_entry), str);
+
+         g_free (str);
+
+
+         str = num_to_string (ov->v.range[1]);
+
+         gtk_entry_set_text (GTK_ENTRY (rd->ov_range_upper_entry), str);
+
+         g_free (str);
+       }
+       break;
+
+      case OV_LOW_UP:
+       {
+         gchar *str = num_to_string (ov->v.range[1]);
+
+         gtk_toggle_button_set_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_OLD_LOW_UP]), TRUE);
+
+         gtk_entry_set_text (GTK_ENTRY (rd->ov_low_up_entry), str);
+
+         g_free (str);
+       }
+       break;
+
+      case OV_HIGH_DOWN:
+       {
+         gchar *str = num_to_string (ov->v.range[0]);
+
+         gtk_toggle_button_set_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_OLD_HIGH_DOWN]), TRUE);
+
+         gtk_entry_set_text (GTK_ENTRY (rd->ov_high_down_entry), str);
+
+         g_free (str);
+       }
+       break;
+
+      case OV_ELSE:
+       gtk_toggle_button_set_active
+         (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_OLD_ELSE]), TRUE);
+       break;
+
+      default:
+       g_warning ("Unknown old value type");
+       break;
+      };
+    g_value_unset (&ov_value);
+    }
+}
+
+/* Callback which gets called when a new row is selected
+   in the variable treeview.
+   It sets the name and label entry widgets to reflect the
+   currently selected row.
+ */
+static void
+on_selection_change (GtkTreeSelection *selection, gpointer data)
+{
+  struct recode_dialog *rd = data;
+  GtkTreeModel *model = GTK_TREE_MODEL (rd->var_map);
+
+  GList *rows = gtk_tree_selection_get_selected_rows (selection, &model);
+
+  if ( rows && !rows->next)
+    {
+      /* Exactly one row is selected */
+
+      gboolean ok;
+      GtkTreeIter iter;
+      gchar *name = NULL;
+      gchar *label = NULL;
+
+      gtk_widget_set_sensitive  (rd->change_button, TRUE);
+      gtk_widget_set_sensitive  (rd->new_name_entry, TRUE);
+      gtk_widget_set_sensitive  (rd->new_label_entry, TRUE);
+
+      ok = gtk_tree_model_get_iter (model, &iter, (GtkTreePath*) rows->data);
+
+      gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
+                         COL_NEW_NAME, &name,
+                         COL_NEW_LABEL, &label,
+                         -1);
+
+      gtk_entry_set_text (GTK_ENTRY (rd->new_name_entry), name ? name : "");
+      gtk_entry_set_text (GTK_ENTRY (rd->new_label_entry), label ? label : "");
+
+      g_free (name);
+      g_free (label);
+    }
+  else
+    {
+      gtk_widget_set_sensitive  (rd->change_button, FALSE);
+      gtk_widget_set_sensitive  (rd->new_name_entry, FALSE);
+      gtk_widget_set_sensitive  (rd->new_label_entry, FALSE);
+
+      gtk_entry_set_text (GTK_ENTRY (rd->new_name_entry), "");
+      gtk_entry_set_text (GTK_ENTRY (rd->new_label_entry), "");
+    }
+
+  g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
+  g_list_free (rows);
+}
+
+static void
+on_string_toggled (GtkToggleButton *b, struct recode_dialog *rd)
+{
+  gboolean active;
+  if (! rd->input_var_is_string )
+    return ;
+
+  active = gtk_toggle_button_get_active (b);
+  gtk_widget_set_sensitive (rd->convert_button, !active);
+}
+
+
+static void
+on_convert_toggled (GtkToggleButton *b, struct recode_dialog *rd)
+{
+  gboolean active;
+
+  g_return_if_fail (rd->input_var_is_string);
+
+  active = gtk_toggle_button_get_active (b);
+  gtk_widget_set_sensitive (rd->string_button, !active);
+}
+
+
+static void
+on_change_clicked (GObject *obj, gpointer data)
+{
+  struct recode_dialog *rd = data;
+  GtkTreeModel *model = GTK_TREE_MODEL (rd->var_map);
+  GtkTreeIter iter;
+  GtkTreeSelection *selection =
+    gtk_tree_view_get_selection (GTK_TREE_VIEW (rd->variable_treeview));
+
+  GList *rows = gtk_tree_selection_get_selected_rows (selection, &model);
+
+  const gchar *dest_var_name =
+    gtk_entry_get_text (GTK_ENTRY (rd->new_name_entry));
+
+  const gchar *dest_var_label =
+    gtk_entry_get_text (GTK_ENTRY (rd->new_label_entry));
+
+  if ( NULL == rows )
+    return;
+
+  gtk_tree_model_get_iter (model, &iter, rows->data);
+
+  gtk_list_store_set (rd->var_map, &iter,
+                     COL_NEW_NAME, dest_var_name,
+                     COL_NEW_LABEL, dest_var_label,
+                     -1);
+
+  g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
+  g_list_free (rows);
+}
+
+
+/* If there's nothing selected in the variable treeview,
+   then automatically select the first item */
+static void
+select_something (GtkTreeModel *treemodel,
+                 GtkTreePath  *arg1,
+                 GtkTreeIter  *arg2,
+                 gpointer      data)
+{
+  struct recode_dialog *rd = data;
+  GtkTreeSelection *sel;
+
+  sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (rd->variable_treeview));
+
+  if ( gtk_tree_selection_count_selected_rows (sel) < 1)
+    {
+      GtkTreeIter iter;
+
+      gtk_tree_model_get_iter_first   (treemodel, &iter);
+
+      gtk_tree_selection_select_iter  (sel, &iter);
+    }
+}
+
+
+/* Callback for the new_value_entry and new_value_togglebutton widgets.
+   It's used to enable/disable the acr. */
+static void
+set_acr (struct recode_dialog *rd)
+{
+  const gchar *text;
+
+  if ( !gtk_toggle_button_get_active
+       (GTK_TOGGLE_BUTTON (rd->toggle[BUTTON_NEW_VALUE])))
+    {
+      psppire_acr_set_enabled (rd->acr, TRUE);
+      return;
+    }
+
+  text = gtk_entry_get_text (GTK_ENTRY (rd->new_value_entry));
+
+  psppire_acr_set_enabled (rd->acr, !g_str_equal (text, ""));
+}
+
+static void
+recode_dialog (struct data_editor *de, gboolean diff)
+{
+  gint response;
+
+  struct recode_dialog rd;
+
+  GladeXML *xml = XML_NEW ("recode.glade");
+
+
+  GtkWidget *selector = get_widget_assert (xml, "psppire-selector1");
+
+  GtkWidget *oldandnew = get_widget_assert (xml, "button1");
+
+
+  GtkWidget *output_variable_box = get_widget_assert (xml,"frame4");
+
+  GtkSheet *var_sheet =
+    GTK_SHEET (get_widget_assert (de->xml, "variable_sheet"));
+
+
+  PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
+
+  rd.change_button = get_widget_assert (xml, "change-button");
+
+  rd.dialog = get_widget_assert   (xml, "recode-dialog");
+  rd.dict_treeview = get_widget_assert (xml, "treeview1");
+  rd.variable_treeview =   get_widget_assert (xml, "treeview2");
+  rd.new_name_entry = get_widget_assert (xml, "dest-name-entry");
+  rd.new_label_entry = get_widget_assert (xml, "dest-label-entry");
+
+  rd.dict = vs->dict;
+
+  rd.value_map = gtk_list_store_new (2,
+                                    old_value_get_type (),
+                                    new_value_get_type ()
+                                    );
+
+  g_object_set (output_variable_box, "visible", diff, NULL);
+
+  if ( diff )
+    gtk_window_set_title (GTK_WINDOW (rd.dialog),
+                         _("Recode into Different Variables"));
+  else
+    gtk_window_set_title (GTK_WINDOW (rd.dialog),
+                         _("Recode into Same Variables"));
+
+  rd.different = diff;
+
+  gtk_window_set_transient_for (GTK_WINDOW (rd.dialog), de->parent.window);
+
+
+  attach_dictionary_to_treeview (GTK_TREE_VIEW (rd.dict_treeview),
+                                vs->dict,
+                                GTK_SELECTION_MULTIPLE, NULL);
+
+
+  if ( ! rd.different )
+    {
+      set_dest_model (GTK_TREE_VIEW (rd.variable_treeview), vs->dict);
+    }
+  else
+    {
+      GtkTreeSelection *sel;
+      GtkTreeViewColumn *col;
+      GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
+
+      rd.var_map = gtk_list_store_new (n_COLS, G_TYPE_INT,
+                                                   G_TYPE_STRING,
+                                                   G_TYPE_STRING);
+
+
+
+      gtk_tree_view_set_model (GTK_TREE_VIEW (rd.variable_treeview),
+                              GTK_TREE_MODEL (rd.var_map));
+
+      col = gtk_tree_view_column_new_with_attributes (_("Old"),
+                                                 renderer,
+                                                 "text", NULL,
+                                                 NULL);
+
+      gtk_tree_view_column_set_cell_data_func (col, renderer,
+                                              cell_var_name,
+                                              vs->dict, 0);
+
+
+      gtk_tree_view_append_column (GTK_TREE_VIEW (rd.variable_treeview), col);
+
+
+      renderer = gtk_cell_renderer_text_new ();
+
+      col = gtk_tree_view_column_new_with_attributes (_("New"),
+                                                 renderer,
+                                                 "text", NULL,
+                                                 NULL);
+
+      gtk_tree_view_column_set_cell_data_func (col, renderer,
+                                              render_new_var_name,
+                                              NULL, NULL);
+
+
+      gtk_tree_view_append_column (GTK_TREE_VIEW (rd.variable_treeview), col);
+
+      g_object_set (rd.variable_treeview, "headers-visible", TRUE, NULL);
+
+      g_signal_connect (rd.change_button, "clicked",
+                       G_CALLBACK (on_change_clicked),  &rd);
+
+      sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (rd.variable_treeview));
+      g_signal_connect (sel, "changed",
+                       G_CALLBACK (on_selection_change), &rd);
+
+      g_signal_connect (rd.var_map, "row-inserted",
+                       G_CALLBACK (select_something), &rd);
+    }
+
+
+
+  psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
+                                rd.dict_treeview,
+                                rd.variable_treeview,
+                                insert_source_row_into_tree_view,
+                                NULL);
+
+  psppire_selector_set_allow (PSPPIRE_SELECTOR (selector), homogeneous_types);
+
+  /* Set up the Old & New Values subdialog */
+  {
+    rd.string_button = get_widget_assert (xml, "checkbutton1");
+    rd.width_entry   = get_widget_assert (xml, "spinbutton1");
+
+    rd.convert_button           = get_widget_assert (xml, "checkbutton2");
+
+    rd.ov_range_lower_entry = get_widget_assert (xml, "entry5");
+    rd.ov_range_upper_entry  = get_widget_assert (xml, "entry3");
+    rd.ov_low_up_entry       = get_widget_assert (xml, "entry6");
+    rd.ov_high_down_entry    = get_widget_assert (xml, "entry7");
+
+    rd.new_value_entry = get_widget_assert (xml, "entry1");
+    rd.ov_value_entry  = get_widget_assert (xml, "entry2");
+
+    rd.toggle[BUTTON_NEW_VALUE]  = get_widget_assert (xml, "radiobutton1");
+    rd.toggle[BUTTON_NEW_SYSMIS] = get_widget_assert (xml, "radiobutton2");
+    rd.toggle[BUTTON_NEW_COPY]   = get_widget_assert (xml, "radiobutton3");
+    rd.toggle[BUTTON_OLD_VALUE]  = get_widget_assert (xml, "radiobutton4");
+    rd.toggle[BUTTON_OLD_SYSMIS] = get_widget_assert (xml, "radiobutton6");
+    rd.toggle[BUTTON_OLD_MISSING]= get_widget_assert (xml, "radiobutton7");
+    rd.toggle[BUTTON_OLD_RANGE]  = get_widget_assert (xml, "radiobutton8");
+    rd.toggle[BUTTON_OLD_LOW_UP] = get_widget_assert (xml, "radiobutton10");
+    rd.toggle[BUTTON_OLD_HIGH_DOWN] = get_widget_assert (xml, "radiobutton5");
+    rd.toggle[BUTTON_OLD_ELSE]   = get_widget_assert (xml, "radiobutton11");
+
+    rd.new_copy_label = get_widget_assert (xml, "label3");
+    rd.strings_box    = get_widget_assert (xml, "table3");
+
+    rd.old_and_new_dialog =
+      PSPPIRE_DIALOG (get_widget_assert (xml, "old-new-values-dialog"));
+
+    gtk_window_set_transient_for (GTK_WINDOW (rd.old_and_new_dialog),
+                                 de->parent.window);
+
+    rd.acr = PSPPIRE_ACR (get_widget_assert (xml, "psppire-acr1"));
+
+    g_signal_connect_swapped (rd.toggle[BUTTON_NEW_VALUE], "toggled",
+                     G_CALLBACK (set_acr), &rd);
+
+    g_signal_connect_swapped (rd.new_value_entry, "changed",
+                     G_CALLBACK (set_acr), &rd);
+
+    {
+      GtkTreeSelection *sel;
+      /* Remove the ACR's default column.  We don't like it */
+      GtkTreeViewColumn *column = gtk_tree_view_get_column (rd.acr->tv, 0);
+      gtk_tree_view_remove_column (rd.acr->tv, column);
+
+
+      column =
+       gtk_tree_view_column_new_with_attributes (_("Old"),
+                                                 gtk_cell_renderer_text_new (),
+                                                 "text", 0,
+                                                 NULL);
+
+      gtk_tree_view_append_column (rd.acr->tv, column);
+
+      column =
+       gtk_tree_view_column_new_with_attributes (_("New"),
+                                                 gtk_cell_renderer_text_new (),
+                                                 "text", 1,
+                                                 NULL);
+
+      gtk_tree_view_append_column (rd.acr->tv, column);
+      g_object_set (rd.acr->tv, "headers-visible", TRUE, NULL);
+
+
+      sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (rd.acr->tv));
+      g_signal_connect (sel, "changed",
+                       G_CALLBACK (on_acr_selection_change), &rd);
+    }
+
+
+    g_signal_connect_swapped (oldandnew, "clicked",
+                             G_CALLBACK (run_old_and_new_dialog), &rd);
+
+
+    g_signal_connect (rd.toggle[BUTTON_NEW_VALUE], "toggled",
+                     G_CALLBACK (toggle_sensitivity), rd.new_value_entry);
+
+    g_signal_connect (rd.toggle[BUTTON_OLD_VALUE], "toggled",
+                     G_CALLBACK (toggle_sensitivity), rd.ov_value_entry);
+
+    g_signal_connect (rd.toggle[BUTTON_OLD_RANGE], "toggled",
+                     G_CALLBACK (toggle_sensitivity),
+                     get_widget_assert (xml, "entry3"));
+
+    g_signal_connect (rd.toggle[BUTTON_OLD_RANGE], "toggled",
+                     G_CALLBACK (toggle_sensitivity),
+                     get_widget_assert (xml, "entry5"));
+
+    g_signal_connect (rd.toggle[BUTTON_OLD_LOW_UP], "toggled",
+                     G_CALLBACK (toggle_sensitivity), rd.ov_low_up_entry);
+
+    g_signal_connect (rd.toggle[BUTTON_OLD_HIGH_DOWN], "toggled",
+                     G_CALLBACK (toggle_sensitivity), rd.ov_high_down_entry);
+
+    g_signal_connect (rd.string_button, "toggled",
+                     G_CALLBACK (toggle_sensitivity), rd.width_entry);
+
+    g_signal_connect (rd.string_button, "toggled",
+                     G_CALLBACK (on_string_toggled), &rd);
+
+    g_signal_connect (rd.convert_button, "toggled",
+                     G_CALLBACK (on_convert_toggled), &rd);
+
+    g_signal_connect_swapped (rd.old_and_new_dialog, "show",
+                             G_CALLBACK (on_old_new_show), &rd);
+  }
+
+  g_signal_connect (rd.dialog, "refresh", G_CALLBACK (refresh),  &rd);
+
+
+  psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (rd.dialog),
+                                     dialog_state_valid, &rd);
+
+  response = psppire_dialog_run (PSPPIRE_DIALOG (rd.dialog));
+
+  switch (response)
+    {
+    case GTK_RESPONSE_OK:
+      {
+       gchar *syntax = generate_syntax (&rd);
+       struct getl_interface *sss = create_syntax_string_source (syntax);
+       execute_syntax (sss);
+
+       g_free (syntax);
+      }
+      break;
+    case PSPPIRE_RESPONSE_PASTE:
+      {
+       gchar *syntax = generate_syntax (&rd);
+
+       struct syntax_editor *se =
+         (struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL);
+
+       gtk_text_buffer_insert_at_cursor (se->buffer, syntax, -1);
+
+       g_free (syntax);
+      }
+      break;
+    default:
+      break;
+    }
+
+  g_object_unref (xml);
+}
+
+/* Initialise VAL to reflect the current status of RD */
+static gboolean
+set_old_value (GValue *val, const struct recode_dialog *rd)
+{
+  const gchar *text = NULL;
+  struct old_value ov;
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                    (rd->toggle [BUTTON_OLD_VALUE])))
+    {
+      text = gtk_entry_get_text (GTK_ENTRY (rd->ov_value_entry));
+      if ( rd->input_var_is_string )
+       {
+         ov.type = OV_STRING;
+         ov.v.s = g_strdup (text);
+       }
+      else
+       {
+         ov.type = OV_NUMERIC;
+         ov.v.v = g_strtod (text, 0);
+       }
+    }
+  else if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                         (rd->toggle [BUTTON_OLD_MISSING])))
+    {
+      ov.type = OV_MISSING;
+    }
+  else if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                         (rd->toggle [BUTTON_OLD_SYSMIS])))
+    {
+      ov.type = OV_SYSMIS;
+    }
+  else if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                         (rd->toggle [BUTTON_OLD_ELSE])))
+    {
+      ov.type = OV_ELSE;
+    }
+  else if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                         (rd->toggle [BUTTON_OLD_RANGE])))
+    {
+      const gchar *text;
+      text = gtk_entry_get_text (GTK_ENTRY (rd->ov_range_lower_entry));
+
+      ov.type = OV_RANGE;
+      ov.v.range[0] = g_strtod (text, 0);
+
+      text = gtk_entry_get_text (GTK_ENTRY (rd->ov_range_upper_entry));
+      ov.v.range[1] = g_strtod (text, 0);
+    }
+  else if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                         (rd->toggle [BUTTON_OLD_LOW_UP])))
+    {
+      const gchar *text =
+       gtk_entry_get_text (GTK_ENTRY (rd->ov_low_up_entry));
+
+      ov.type = OV_LOW_UP;
+      ov.v.range[1] = g_strtod (text, 0);
+    }
+  else if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                         (rd->toggle [BUTTON_OLD_HIGH_DOWN])))
+    {
+      const gchar *text =
+       gtk_entry_get_text (GTK_ENTRY (rd->ov_high_down_entry));
+
+      ov.type = OV_HIGH_DOWN;
+      ov.v.range[0] = g_strtod (text, 0);
+    }
+  else
+    return FALSE;
+
+  g_value_init (val, old_value_get_type ());
+  g_value_set_boxed (val, &ov);
+
+  return TRUE;
+}
+
+
+/* Initialse VAL to reflect the current status of RD */
+static gboolean
+set_new_value (GValue *val, const struct recode_dialog *rd)
+{
+  const gchar *text = NULL;
+  struct new_value nv;
+
+  if ( gtk_toggle_button_get_active
+       (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_NEW_VALUE])))
+    {
+      text = gtk_entry_get_text (GTK_ENTRY (rd->new_value_entry));
+
+      nv.type = NV_NUMERIC;
+      if (
+         (! rd->different && rd->input_var_is_string) ||
+         ( rd->different &&
+           gtk_toggle_button_get_active
+              (GTK_TOGGLE_BUTTON (rd->string_button)))
+         )
+       {
+         nv.type = NV_STRING;
+       }
+
+      if ( nv.type == NV_STRING )
+       nv.v.s = g_strdup (text);
+      else
+       nv.v.v = g_strtod (text, 0);
+    }
+  else if ( gtk_toggle_button_get_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_NEW_COPY])))
+    {
+      nv.type = NV_COPY;
+    }
+
+  else if ( gtk_toggle_button_get_active
+           (GTK_TOGGLE_BUTTON (rd->toggle [BUTTON_NEW_SYSMIS])))
+    {
+      nv.type = NV_SYSMIS;
+    }
+  else
+    return FALSE;
+
+  g_value_init (val, new_value_get_type ());
+  g_value_set_boxed (val, &nv);
+
+  return TRUE;
+}
+
+
+/* A function to set a value in a column in the ACR */
+gboolean
+set_value (gint col, GValue  *val, gpointer data)
+{
+  struct recode_dialog *rd = data;
+
+  switch ( col )
+    {
+    case COL_VALUE_OLD:
+      set_old_value (val, rd);
+      break;
+    case COL_VALUE_NEW:
+      set_new_value (val, rd);
+      break;
+    default:
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+static void
+run_old_and_new_dialog (struct recode_dialog *rd)
+{
+  gint response;
+  rd->local_store = clone_list_store (rd->value_map);
+
+  g_object_ref (rd->local_store);
+
+  psppire_acr_set_model (rd->acr, rd->local_store);
+  psppire_acr_set_get_value_func (rd->acr, set_value, rd);
+
+  gtk_window_set_title (GTK_WINDOW (rd->old_and_new_dialog),
+                       rd->different
+                       ? _("Recode into Different Variables: Old and New Values ")
+                       : _("Recode into Same Variables: Old and New Values")
+                       );
+
+
+  {
+    /* Find the type of the first variable (it's invariant that
+       all variables are of the same type) */
+    const struct variable *v;
+    gint idx;
+    GtkTreeIter iter;
+    GtkTreeModel *model =
+      gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview));
+
+    gboolean not_empty = gtk_tree_model_get_iter_first (model, &iter);
+
+    g_return_if_fail (not_empty);
+
+    gtk_tree_model_get (model, &iter, 0, &idx, -1);
+
+    v = psppire_dict_get_variable (rd->dict, idx);
+
+    rd->input_var_is_string = var_is_alpha (v);
+
+    gtk_widget_set_sensitive (rd->toggle [BUTTON_OLD_SYSMIS],
+                             var_is_numeric (v));
+    gtk_widget_set_sensitive (rd->toggle [BUTTON_OLD_RANGE],
+                             var_is_numeric (v));
+    gtk_widget_set_sensitive (rd->toggle [BUTTON_OLD_LOW_UP],
+                             var_is_numeric (v));
+    gtk_widget_set_sensitive (rd->toggle [BUTTON_OLD_HIGH_DOWN],
+                             var_is_numeric (v));
+    gtk_widget_set_sensitive (rd->toggle [BUTTON_NEW_SYSMIS],
+                             var_is_numeric (v));
+
+    gtk_widget_set_sensitive (rd->convert_button, var_is_alpha (v));
+  }
+
+
+  response = psppire_dialog_run (rd->old_and_new_dialog);
+  psppire_acr_set_model (rd->acr, NULL);
+
+
+  if ( response == PSPPIRE_RESPONSE_CONTINUE )
+      rd->value_map = clone_list_store (rd->local_store);
+
+
+  psppire_dialog_notify_change (PSPPIRE_DIALOG (rd->dialog));
+}
+
+
+/* Generate a syntax fragment for NV and append it to STR */
+static void
+new_value_append_syntax (GString *str, const struct new_value *nv)
+{
+  switch (nv->type)
+    {
+    case NV_NUMERIC:
+      g_string_append_printf (str, "%g", nv->v.v);
+      break;
+    case NV_STRING:
+      {
+       struct string ds;
+       ds_init_cstr (&ds, nv->v.s);
+       gen_quoted_string (&ds);
+       g_string_append (str, ds_cstr (&ds));
+       ds_destroy (&ds);
+      }
+      break;
+    case NV_COPY:
+      g_string_append (str, "COPY");
+      break;
+    case NV_SYSMIS:
+      g_string_append (str, "SYSMIS");
+      break;
+    default:
+      /* Shouldn't ever happen */
+      g_warning ("Invalid type in new recode value");
+      g_string_append (str, "???");
+      break;
+    }
+}
+
+
+/* Generate a syntax fragment for NV and append it to STR */
+static void
+old_value_append_syntax (GString *str, const struct old_value *ov)
+{
+  switch (ov->type)
+    {
+    case OV_NUMERIC:
+      g_string_append_printf (str, "%g", ov->v.v);
+      break;
+    case OV_STRING:
+      {
+       struct string ds;
+       ds_init_cstr (&ds, ov->v.s);
+       gen_quoted_string (&ds);
+       g_string_append (str, ds_cstr (&ds));
+       ds_destroy (&ds);
+      }
+      break;
+    case OV_MISSING:
+      g_string_append (str, "MISSING");
+      break;
+    case OV_SYSMIS:
+      g_string_append (str, "SYSMIS");
+      break;
+    case OV_ELSE:
+      g_string_append (str, "ELSE");
+      break;
+    case OV_RANGE:
+      g_string_append_printf (str, "%g THRU %g",
+                             ov->v.range[0],
+                             ov->v.range[1]);
+      break;
+    case OV_LOW_UP:
+      g_string_append_printf (str, "LOWEST THRU %g",
+                             ov->v.range[1]);
+      break;
+    case OV_HIGH_DOWN:
+      g_string_append_printf (str, "%g THRU HIGHEST",
+                             ov->v.range[0]);
+      break;
+    default:
+      g_warning ("Invalid type in old recode value");
+      g_string_append (str, "???");
+      break;
+    };
+}
+
+
+
+static char *
+generate_syntax (const struct recode_dialog *rd)
+{
+  gboolean ok;
+  GtkTreeIter iter;
+  gchar *text;
+
+  GString *str = g_string_sized_new (100);
+
+  /* Declare new string variables if applicable */
+  if ( rd->different &&
+       gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->string_button)))
+    {
+      GtkTreeIter iter;
+
+
+      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->var_map),
+                                              &iter);
+          ok;
+          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (rd->var_map), &iter))
+       {
+         gchar *name = NULL;
+
+         gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
+                             COL_NEW_NAME, &name, -1);
+
+         g_string_append (str, "\nSTRING ");
+         g_string_append (str, name);
+         g_string_append_printf (str, " (A%d).",
+                                 (int)
+                                 gtk_spin_button_get_value (GTK_SPIN_BUTTON (rd->width_entry) )
+                                 );
+
+         g_free (name);
+       }
+    }
+
+  g_string_append (str, "\nRECODE ");
+
+  append_variable_names (str, rd->dict, GTK_TREE_VIEW (rd->variable_treeview));
+
+  g_string_append (str, "\n\t");
+
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->convert_button)))
+    {
+      g_string_append (str, "(CONVERT) ");
+    }
+
+  for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->value_map),
+                                          &iter);
+       ok;
+       ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (rd->value_map), &iter))
+    {
+      GValue ov_value = {0};
+      GValue nv_value = {0};
+      struct old_value *ov;
+      struct new_value *nv;
+      gtk_tree_model_get_value (GTK_TREE_MODEL (rd->value_map), &iter,
+                               COL_VALUE_OLD, &ov_value);
+
+      gtk_tree_model_get_value (GTK_TREE_MODEL (rd->value_map), &iter,
+                               COL_VALUE_NEW, &nv_value);
+
+      ov = g_value_get_boxed (&ov_value);
+      nv = g_value_get_boxed (&nv_value);
+
+      g_string_append (str, "(");
+
+      old_value_append_syntax (str, ov);
+      g_string_append (str, " = ");
+      new_value_append_syntax (str, nv);
+
+      g_string_append (str, ") ");
+      g_value_unset (&ov_value);
+      g_value_unset (&nv_value);
+    }
+
+
+  if ( rd->different )
+    {
+      GtkTreeIter iter;
+      g_string_append (str, "\n\tINTO ");
+
+      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->var_map),
+                                              &iter);
+          ok;
+          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (rd->var_map), &iter))
+       {
+         gchar *name = NULL;
+
+         gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
+                             COL_NEW_NAME, &name, -1);
+
+         g_string_append (str, name);
+         g_string_append (str, " ");
+
+         g_free (name);
+       }
+    }
+
+  g_string_append (str, ".");
+
+
+  /* If applicable, set labels for the new variables. */
+  if ( rd->different )
+    {
+      GtkTreeIter iter;
+
+      for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->var_map),
+                                              &iter);
+          ok;
+          ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (rd->var_map), &iter))
+       {
+         struct string ls;
+         gchar *label = NULL;
+         gchar *name = NULL;
+
+         gtk_tree_model_get (GTK_TREE_MODEL (rd->var_map), &iter,
+                             COL_NEW_NAME, &name,
+                             COL_NEW_LABEL, &label, -1);
+
+         if ( 0 == strcmp (label, "") )
+           {
+             g_free (name);
+             g_free (label);
+             continue;
+           }
+
+         ds_init_cstr (&ls, label);
+         g_free (label);
+         gen_quoted_string (&ls);
+
+         g_string_append_printf (str, "\nVARIABLE LABELS %s %s.",
+                                 name, ds_cstr (&ls));
+
+         g_free (name);
+         ds_destroy (&ls);
+       }
+    }
+
+
+  g_string_append (str, "\nEXECUTE.\n");
+
+
+  text = str->str;
+
+  g_string_free (str, FALSE);
+
+  return text;
+}
diff --git a/src/ui/gui/recode-dialog.h b/src/ui/gui/recode-dialog.h
new file mode 100644 (file)
index 0000000..8f251e1
--- /dev/null
@@ -0,0 +1,26 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2007  Free Software Foundation
+
+   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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef __RECODE_DIALOG_H
+#define __RECODE_DIALOG_H
+
+
+#include <gtk/gtk.h>
+
+void recode_same_dialog (GObject *o, gpointer data);
+void recode_different_dialog (GObject *o, gpointer data);
+
+#endif
diff --git a/src/ui/gui/recode.glade b/src/ui/gui/recode.glade
new file mode 100644 (file)
index 0000000..38fe21c
--- /dev/null
@@ -0,0 +1,988 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.2.2 on Sat Nov 10 12:40:56 2007 by john@marilyn-->
+<glade-interface>
+  <requires lib="psppire"/>
+  <widget class="PsppireDialog" id="old-new-values-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <widget class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">5</property>
+        <child>
+          <widget class="GtkFrame" id="frame2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <property name="right_padding">5</property>
+                <child>
+                  <widget class="GtkTable" id="table2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="n_rows">11</property>
+                    <property name="n_columns">2</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment11">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <widget class="GtkEntry" id="entry7">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">9</property>
+                        <property name="bottom_attach">10</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment10">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <widget class="GtkEntry" id="entry6">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">7</property>
+                        <property name="bottom_attach">8</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="response_id">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton6">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="response_id">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton7">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="response_id">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton8">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="response_id">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton10">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="response_id">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">6</property>
+                        <property name="bottom_attach">7</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="response_id">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">8</property>
+                        <property name="bottom_attach">9</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Value:</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label7">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">System-Missing</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label8">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">System-or user-missing</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkVBox" id="vbox2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment9">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="xscale">0</property>
+                            <child>
+                              <widget class="GtkEntry" id="entry5">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label9">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">through</property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment7">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="xscale">0</property>
+                            <child>
+                              <widget class="GtkEntry" id="entry3">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">5</property>
+                        <property name="bottom_attach">6</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label11">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Range, LOWEST thru value</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">6</property>
+                        <property name="bottom_attach">7</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label12">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Range, value thru HIGHEST</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">8</property>
+                        <property name="bottom_attach">9</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton11">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="response_id">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton4</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">10</property>
+                        <property name="bottom_attach">11</property>
+                        <property name="x_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label13">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">All other values</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">10</property>
+                        <property name="bottom_attach">11</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <widget class="GtkEntry" id="entry2">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label10">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Range:</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Old Value</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <widget class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <widget class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <widget class="GtkTable" id="table1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">3</property>
+                        <property name="n_columns">2</property>
+                        <child>
+                          <widget class="GtkRadioButton" id="radiobutton1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="response_id">0</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="x_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkRadioButton" id="radiobutton2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="response_id">0</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                          </widget>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkRadioButton" id="radiobutton3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="response_id">0</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="x_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">System Missing</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Copy old values</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment2">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="xscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox1">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <widget class="GtkLabel" id="label4">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="xalign">1</property>
+                                    <property name="label" translatable="yes">Value: </property>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkEntry" id="entry1">
+                                    <property name="visible">True</property>
+                                    <property name="sensitive">False</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">New Value</property>
+                    <property name="use_markup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="PsppireAcr" id="psppire-acr1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">5</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkTable" id="table3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">2</property>
+                <child>
+                  <widget class="GtkCheckButton" id="checkbutton1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="x_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="checkbutton2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label14">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Convert numeric strings to numbers ('5' -&gt; 5)</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkLabel" id="label15">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Output variables are strings</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <widget class="GtkLabel" id="label16">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">Width: </property>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkSpinButton" id="spinbutton1">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="adjustment">8 1 255 1 8 0</property>
+                            <property name="numeric">True</property>
+                            <property name="update_policy">GTK_UPDATE_IF_VALID</property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">10</property>
+                <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="pack_type">GTK_PACK_END</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="PsppireDialog" id="recode-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title">Recode into Same Variables</property>
+    <property name="modal">True</property>
+    <property name="orientation">PSPPIRE_TABULAR</property>
+    <child internal-child="hbox">
+      <widget class="GtkTable" id="dialog-hbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="n_rows">3</property>
+        <property name="n_columns">4</property>
+        <property name="column_spacing">5</property>
+        <property name="row_spacing">5</property>
+        <child>
+          <widget class="GtkLabel" id="label22">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+          </widget>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+            <property name="y_options"></property>
+          </packing>
+        </child>
+        <child>
+          <widget class="PsppireSelector" id="psppire-selector1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </widget>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="x_options"></property>
+            <property name="y_options"></property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHBox" id="hbox4">
+            <property name="visible">True</property>
+            <property name="sensitive">False</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">5</property>
+            <child>
+              <widget class="GtkButton" id="button2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">If...</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label18">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">(optional case selection condition)</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="right_attach">4</property>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+            <property name="y_options"></property>
+          </packing>
+        </child>
+        <child>
+          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </widget>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="right_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkScrolledWindow" id="scrolledwindow2">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+            <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+            <child>
+              <widget class="GtkTreeView" id="treeview1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="headers_visible">False</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="bottom_attach">3</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkLabel" id="label23">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+          </widget>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="x_options"></property>
+            <property name="y_options"></property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkFrame" id="frame4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment8">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkLabel" id="label20">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Name:</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="dest-name-entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label21">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Label:</property>
+                      </widget>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="dest-label-entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </widget>
+                      <packing>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHButtonBox" id="hbuttonbox3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <widget class="GtkButton" id="change-button">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Change</property>
+                            <property name="response_id">0</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">5</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label19">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Output Variable</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="right_attach">4</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkVBox" id="vbox4">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">5</property>
+            <child>
+              <widget class="GtkFrame" id="frame3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <child>
+                  <widget class="GtkAlignment" id="alignment4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+                        <child>
+                          <widget class="GtkTreeView" id="treeview2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label17">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Variables:</property>
+                    <property name="use_markup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="xalign">0</property>
+                <property name="xscale">0</property>
+                <child>
+                  <widget class="GtkHButtonBox" id="hbuttonbox1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkButton" id="button1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Old and New Values</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="right_attach">3</property>
+            <property name="bottom_attach">2</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>