From: John Darrington Date: Sat, 20 Jan 2007 00:02:13 +0000 (+0000) Subject: Patch #5676 (syntax string source). X-Git-Tag: v0.6.0~583 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f157150f5fe225224e407161fb7f899d34b8b18;p=pspp-builds.git Patch #5676 (syntax string source). Fixed some warnings. Made make distcheck work. --- diff --git a/po/de.po b/po/de.po index 7cb2f7e1..ecf83cb4 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.2\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-01-03 18:41+0900\n" +"POT-Creation-Date: 2007-01-20 08:53+0900\n" "PO-Revision-Date: 2006-05-26 17:49+0800\n" "Last-Translator: John Darrington \n" "Language-Team: German \n" @@ -176,42 +176,42 @@ msgstr "" msgid "Month number %f is not between 1 and 12." msgstr "" -#: src/data/dictionary.c:721 +#: src/data/dictionary.c:710 msgid "" "At least one case in the data file had a weight value that was user-missing, " "system-missing, zero, or negative. These case(s) were ignored." msgstr "" -#: src/data/dictionary.c:1206 +#: src/data/dictionary.c:1219 msgid "Variable suffix too large." msgstr "" -#: src/data/fastfile.c:535 +#: src/data/fastfile.c:540 #, c-format msgid "%s: Removing temporary file: %s." msgstr "" -#: src/data/fastfile.c:659 +#: src/data/fastfile.c:664 #, c-format msgid "Error writing temporary file: %s." msgstr "" -#: src/data/fastfile.c:687 +#: src/data/fastfile.c:692 #, c-format msgid "%s: Opening temporary file: %s." msgstr "" -#: src/data/fastfile.c:731 +#: src/data/fastfile.c:736 #, c-format msgid "%s: Seeking temporary file: %s." msgstr "" -#: src/data/fastfile.c:753 +#: src/data/fastfile.c:758 #, c-format msgid "%s: Reading temporary file: %s." msgstr "" -#: src/data/fastfile.c:756 +#: src/data/fastfile.c:761 #, c-format msgid "%s: Temporary file ended unexpectedly." msgstr "" @@ -309,13 +309,13 @@ msgid "%s variables are not compatible with %s format %s." msgstr "" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1084 +#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1086 #: src/ui/gui/psppire-var-store.c:482 msgid "String" msgstr "Zeichenkette" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:980 +#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:982 #: src/ui/gui/psppire-var-store.c:475 msgid "Numeric" msgstr "Nummer" @@ -1164,17 +1164,17 @@ msgstr "" msgid "expecting COMM or TAPE" msgstr "" -#: src/language/data-io/get.c:349 src/language/data-io/get.c:363 -#: src/language/data-io/get.c:388 +#: src/language/data-io/get.c:348 src/language/data-io/get.c:362 +#: src/language/data-io/get.c:387 #, c-format msgid "expecting %s or %s" msgstr "" -#: src/language/data-io/get.c:593 src/language/data-io/print.c:177 +#: src/language/data-io/get.c:592 src/language/data-io/print.c:177 msgid "expecting a valid subcommand" msgstr "" -#: src/language/data-io/get.c:626 +#: src/language/data-io/get.c:625 #, c-format msgid "" "Cannot rename %s as %s because there already exists a variable named %s. To " @@ -1182,75 +1182,75 @@ msgid "" "as \"/RENAME (A=B)(B=C)(C=A)\", or equivalently, \"/RENAME (A B C=B C A)\"." msgstr "" -#: src/language/data-io/get.c:652 +#: src/language/data-io/get.c:651 msgid "`=' expected after variable list." msgstr "" -#: src/language/data-io/get.c:659 +#: src/language/data-io/get.c:658 #, c-format msgid "" "Number of variables on left side of `=' (%d) does not match number of " "variables on right side (%d), in parenthesized group %d of RENAME subcommand." msgstr "" -#: src/language/data-io/get.c:672 +#: src/language/data-io/get.c:671 #, c-format msgid "Requested renaming duplicates variable name %s." msgstr "" -#: src/language/data-io/get.c:702 +#: src/language/data-io/get.c:701 msgid "Cannot DROP all variables from dictionary." msgstr "" -#: src/language/data-io/get.c:879 +#: src/language/data-io/get.c:878 msgid "The active file may not be specified more than once." msgstr "" -#: src/language/data-io/get.c:887 +#: src/language/data-io/get.c:886 msgid "Cannot specify the active file since no active file has been defined." msgstr "" -#: src/language/data-io/get.c:894 +#: src/language/data-io/get.c:893 msgid "" "MATCH FILES may not be used after TEMPORARY when the active file is an input " "source. Temporary transformations will be made permanent." msgstr "" -#: src/language/data-io/get.c:931 +#: src/language/data-io/get.c:930 msgid "Multiple IN subcommands for a single FILE or TABLE." msgstr "" -#: src/language/data-io/get.c:951 +#: src/language/data-io/get.c:950 msgid "BY may appear at most once." msgstr "" -#: src/language/data-io/get.c:972 +#: src/language/data-io/get.c:971 #, c-format msgid "File %s lacks BY variable %s." msgstr "" -#: src/language/data-io/get.c:986 +#: src/language/data-io/get.c:985 msgid "FIRST may appear at most once." msgstr "" -#: src/language/data-io/get.c:1000 +#: src/language/data-io/get.c:999 msgid "LAST may appear at most once." msgstr "" -#: src/language/data-io/get.c:1041 +#: src/language/data-io/get.c:1040 msgid "BY is required when TABLE is specified." msgstr "" -#: src/language/data-io/get.c:1046 +#: src/language/data-io/get.c:1045 msgid "BY is required when IN is specified." msgstr "" -#: src/language/data-io/get.c:1075 +#: src/language/data-io/get.c:1074 #, c-format msgid "IN variable name %s duplicates an existing variable name." msgstr "" -#: src/language/data-io/get.c:1484 +#: src/language/data-io/get.c:1482 #, c-format msgid "" "Variable %s in file %s (%s) has different type or width from the same " @@ -2259,8 +2259,8 @@ msgstr "" msgid "Group2" msgstr "" -#: src/language/stats/binomial.c:208 src/language/stats/chisquare.c:236 -#: src/language/stats/chisquare.c:296 src/language/stats/crosstabs.q:825 +#: src/language/stats/binomial.c:208 src/language/stats/chisquare.c:237 +#: src/language/stats/chisquare.c:297 src/language/stats/crosstabs.q:825 #: src/language/stats/crosstabs.q:1025 src/language/stats/crosstabs.q:1748 #: src/language/stats/examine.q:909 src/language/stats/frequencies.q:1222 #: src/language/stats/oneway.q:306 src/language/stats/oneway.q:470 @@ -2268,7 +2268,7 @@ msgstr "" msgid "Total" msgstr "" -#: src/language/stats/binomial.c:253 src/language/stats/chisquare.c:259 +#: src/language/stats/binomial.c:253 src/language/stats/chisquare.c:260 #: src/language/stats/crosstabs.q:1143 src/language/stats/crosstabs.q:1184 msgid "Category" msgstr "" @@ -2294,46 +2294,46 @@ msgstr "" msgid "Exact Sig. (%d-tailed)" msgstr "" -#: src/language/stats/chisquare.c:208 +#: src/language/stats/chisquare.c:209 #, c-format msgid "" "CHISQUARE test specified %d expected values, but %d distinct values were " "encountered in variable %s." msgstr "" -#: src/language/stats/chisquare.c:220 src/language/stats/chisquare.c:260 +#: src/language/stats/chisquare.c:221 src/language/stats/chisquare.c:261 msgid "Observed N" msgstr "" -#: src/language/stats/chisquare.c:221 src/language/stats/chisquare.c:261 +#: src/language/stats/chisquare.c:222 src/language/stats/chisquare.c:262 msgid "Expected N" msgstr "" -#: src/language/stats/chisquare.c:222 src/language/stats/chisquare.c:262 +#: src/language/stats/chisquare.c:223 src/language/stats/chisquare.c:263 #: src/language/stats/regression.q:313 msgid "Residual" msgstr "" -#: src/language/stats/chisquare.c:255 +#: src/language/stats/chisquare.c:256 msgid "Frequencies" msgstr "" -#: src/language/stats/chisquare.c:309 +#: src/language/stats/chisquare.c:310 msgid "Test Statistics" msgstr "" -#: src/language/stats/chisquare.c:323 +#: src/language/stats/chisquare.c:324 msgid "Chi-Square" msgstr "" -#: src/language/stats/chisquare.c:324 src/language/stats/crosstabs.q:1119 +#: src/language/stats/chisquare.c:325 src/language/stats/crosstabs.q:1119 #: src/language/stats/oneway.q:279 src/language/stats/oneway.q:680 #: src/language/stats/regression.q:307 src/language/stats/t-test.q:981 #: src/language/stats/t-test.q:1173 src/language/stats/t-test.q:1266 msgid "df" msgstr "" -#: src/language/stats/chisquare.c:325 +#: src/language/stats/chisquare.c:326 msgid "Asymp. Sig." msgstr "" @@ -3126,45 +3126,45 @@ msgstr "" msgid "Does not assume equal" msgstr "" -#: src/language/stats/rank.q:223 +#: src/language/stats/rank.q:221 #, c-format msgid "%s of %s by %s" msgstr "" -#: src/language/stats/rank.q:228 +#: src/language/stats/rank.q:226 #, c-format msgid "%s of %s" msgstr "" -#: src/language/stats/rank.q:725 +#: src/language/stats/rank.q:726 msgid "Cannot create new rank variable. All candidates in use." msgstr "" -#: src/language/stats/rank.q:820 +#: src/language/stats/rank.q:819 msgid "Variables Created By RANK" msgstr "" -#: src/language/stats/rank.q:844 +#: src/language/stats/rank.q:843 #, c-format msgid "%s into %s(%s of %s using %s BY %s)" msgstr "" -#: src/language/stats/rank.q:855 +#: src/language/stats/rank.q:854 #, c-format msgid "%s into %s(%s of %s BY %s)" msgstr "" -#: src/language/stats/rank.q:869 +#: src/language/stats/rank.q:868 #, c-format msgid "%s into %s(%s of %s using %s)" msgstr "" -#: src/language/stats/rank.q:879 +#: src/language/stats/rank.q:878 #, c-format msgid "%s into %s(%s of %s)" msgstr "" -#: src/language/stats/rank.q:892 +#: src/language/stats/rank.q:891 msgid "" "FRACTION has been specified, but NORMAL and PROPORTION rank functions have " "not been requested. The FRACTION subcommand will be ignored." @@ -4102,32 +4102,59 @@ msgstr "" msgid "Style of bevel around the custom entry button" msgstr "" -#: src/ui/gui/data-editor.c:391 src/ui/gui/data-editor.glade:428 +#: src/ui/gui/data-editor.c:154 +#, fuzzy +msgid "Weights" +msgstr "Rechts" + +#: src/ui/gui/data-editor.c:155 +msgid "Weight cases by variable" +msgstr "" + +#: src/ui/gui/data-editor.c:423 src/ui/gui/data-editor.glade:428 msgid "Open" msgstr "Öffen" -#: src/ui/gui/data-editor.c:399 +#: src/ui/gui/data-editor.c:431 msgid "System Files (*.sav)" msgstr "Systemedatein (*.sav)" -#: src/ui/gui/data-editor.c:405 +#: src/ui/gui/data-editor.c:437 msgid "Portable Files (*.por) " msgstr "Tragbardatein (*.por)" -#: src/ui/gui/data-editor.c:411 src/ui/gui/syntax-editor.c:141 -#: src/ui/gui/syntax-editor.c:544 +#: src/ui/gui/data-editor.c:443 src/ui/gui/syntax-editor.c:141 +#: src/ui/gui/syntax-editor.c:531 msgid "All Files" msgstr "Alle Datei" -#: src/ui/gui/data-editor.c:487 +#: src/ui/gui/data-editor.c:519 msgid "Font Selection" msgstr "Schriftwahlung" -#: src/ui/gui/data-editor.c:663 +#: src/ui/gui/data-editor.c:697 +msgid "No Split" +msgstr "" + +#: src/ui/gui/data-editor.c:705 +#, fuzzy +msgid "Split by " +msgstr "Alle Datei" + +#: src/ui/gui/data-editor.c:730 +msgid "Filter off" +msgstr "" + +#: src/ui/gui/data-editor.c:743 +#, c-format +msgid "Filter by %s" +msgstr "" + +#: src/ui/gui/data-editor.c:761 msgid "Weights off" msgstr "" -#: src/ui/gui/data-editor.c:676 +#: src/ui/gui/data-editor.c:774 #, c-format msgid "Weight by %s" msgstr "" @@ -4187,7 +4214,7 @@ msgid "Grid Lines" msgstr "Glitten" #: src/ui/gui/data-editor.glade:223 src/ui/gui/data-editor.glade:633 -#: src/ui/gui/data-editor.glade:1343 src/ui/gui/data-editor.glade:1521 +#: src/ui/gui/data-editor.glade:1345 src/ui/gui/data-editor.glade:1523 msgid "Value Labels" msgstr "Werten" @@ -4210,11 +4237,11 @@ msgid "Insert Cases" msgstr "_Stecken" #: src/ui/gui/data-editor.glade:279 src/ui/gui/data-editor.glade:502 -#: src/ui/gui/data-editor.glade:1891 +#: src/ui/gui/data-editor.glade:1893 msgid "Go To Case" msgstr "" -#: src/ui/gui/data-editor.glade:294 src/ui/gui/data-editor.glade:1956 +#: src/ui/gui/data-editor.glade:294 src/ui/gui/data-editor.glade:1958 msgid "Sort Cases" msgstr "" @@ -4326,124 +4353,124 @@ msgstr "" msgid "Filter Use Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:904 +#: src/ui/gui/data-editor.glade:905 msgid "Weight Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:930 +#: src/ui/gui/data-editor.glade:931 #, fuzzy msgid "Split File Status Area" msgstr "Alle Datei" -#: src/ui/gui/data-editor.glade:959 +#: src/ui/gui/data-editor.glade:961 msgid "Variable Type" msgstr "Variableansicht" -#: src/ui/gui/data-editor.glade:994 src/ui/gui/psppire-var-store.c:476 +#: src/ui/gui/data-editor.glade:996 src/ui/gui/psppire-var-store.c:476 msgid "Comma" msgstr "Komma" -#: src/ui/gui/data-editor.glade:1009 src/ui/gui/psppire-var-store.c:477 +#: src/ui/gui/data-editor.glade:1011 src/ui/gui/psppire-var-store.c:477 msgid "Dot" msgstr "Punkt" -#: src/ui/gui/data-editor.glade:1024 +#: src/ui/gui/data-editor.glade:1026 msgid "Scientific notation" msgstr "Wissenschaftlichnotation" -#: src/ui/gui/data-editor.glade:1039 src/ui/gui/psppire-var-store.c:479 +#: src/ui/gui/data-editor.glade:1041 src/ui/gui/psppire-var-store.c:479 msgid "Date" msgstr "Datum" -#: src/ui/gui/data-editor.glade:1054 src/ui/gui/psppire-var-store.c:480 +#: src/ui/gui/data-editor.glade:1056 src/ui/gui/psppire-var-store.c:480 msgid "Dollar" msgstr "Euro" -#: src/ui/gui/data-editor.glade:1069 +#: src/ui/gui/data-editor.glade:1071 msgid "Custom currency" msgstr "Spezialwährung" -#: src/ui/gui/data-editor.glade:1161 +#: src/ui/gui/data-editor.glade:1163 msgid "positive" msgstr "positiv" -#: src/ui/gui/data-editor.glade:1167 +#: src/ui/gui/data-editor.glade:1169 msgid "negative" msgstr "negativ" -#: src/ui/gui/data-editor.glade:1180 +#: src/ui/gui/data-editor.glade:1182 msgid "Sample" msgstr "Muster" -#: src/ui/gui/data-editor.glade:1230 +#: src/ui/gui/data-editor.glade:1232 msgid "Width:" msgstr "Große:" -#: src/ui/gui/data-editor.glade:1274 +#: src/ui/gui/data-editor.glade:1276 msgid "Decimal Places:" msgstr "Dezimalstellen:" -#: src/ui/gui/data-editor.glade:1441 +#: src/ui/gui/data-editor.glade:1443 msgid "Value Label:" msgstr "Kennsatz:" -#: src/ui/gui/data-editor.glade:1454 +#: src/ui/gui/data-editor.glade:1456 msgid "Value:" msgstr "Werte:" -#: src/ui/gui/data-editor.glade:1587 +#: src/ui/gui/data-editor.glade:1589 msgid "Missing Values" msgstr "Lösewerten" -#: src/ui/gui/data-editor.glade:1605 +#: src/ui/gui/data-editor.glade:1607 msgid "_Range plus one optional discrete missing value" msgstr "Wertebereich und ein optional Lösewert" -#: src/ui/gui/data-editor.glade:1629 +#: src/ui/gui/data-editor.glade:1631 msgid "_Low:" msgstr "_Tief:" -#: src/ui/gui/data-editor.glade:1658 +#: src/ui/gui/data-editor.glade:1660 msgid "_High:" msgstr "_Hoch:" -#: src/ui/gui/data-editor.glade:1699 +#: src/ui/gui/data-editor.glade:1701 msgid "Di_screte value:" msgstr "Di_skretwerte" -#: src/ui/gui/data-editor.glade:1746 +#: src/ui/gui/data-editor.glade:1748 msgid "_No missing values" msgstr "_Kein Lösewerten" -#: src/ui/gui/data-editor.glade:1763 +#: src/ui/gui/data-editor.glade:1765 msgid "_Discrete missing values" msgstr "_Diskret Lösewerten" -#: src/ui/gui/data-editor.glade:1908 +#: src/ui/gui/data-editor.glade:1910 msgid "Case Number:" msgstr "" -#: src/ui/gui/data-editor.glade:2017 +#: src/ui/gui/data-editor.glade:2019 msgid "Sort by:" msgstr "" -#: src/ui/gui/data-editor.glade:2066 src/ui/gui/sort-cases-dialog.c:279 +#: src/ui/gui/data-editor.glade:2068 src/ui/gui/sort-cases-dialog.c:279 msgid "Ascending" msgstr "" -#: src/ui/gui/data-editor.glade:2079 src/ui/gui/sort-cases-dialog.c:281 +#: src/ui/gui/data-editor.glade:2081 src/ui/gui/sort-cases-dialog.c:281 msgid "Descending" msgstr "" -#: src/ui/gui/data-editor.glade:2095 +#: src/ui/gui/data-editor.glade:2097 msgid "Sort Order" msgstr "" -#: src/ui/gui/helper.c:105 +#: src/ui/gui/helper.c:113 msgid "Sorry. The help system hasn't yet been implemented." msgstr "Es gibt noch nicht kein Helpsysteme. Schade!" -#: src/ui/gui/helper.c:128 +#: src/ui/gui/helper.c:136 #, c-format msgid "Cannot open reference manual: %s" msgstr "" @@ -4483,11 +4510,16 @@ msgstr "Unpassend Wert für Variable" msgid "Incorrect range specification" msgstr "Falshe Spannweitebeschreibung" -#: src/ui/gui/psppire-data-store.c:743 +#: src/ui/gui/psppire-buttonbox.c:128 +#, fuzzy +msgid "_Paste" +msgstr "Datum" + +#: src/ui/gui/psppire-data-store.c:750 msgid "var" msgstr "" -#: src/ui/gui/psppire-data-store.c:824 src/ui/gui/psppire-var-store.c:552 +#: src/ui/gui/psppire-data-store.c:831 src/ui/gui/psppire-var-store.c:552 #: src/ui/gui/psppire-var-store.c:562 src/ui/gui/psppire-var-store.c:572 #: src/ui/gui/psppire-var-store.c:770 #, c-format @@ -4517,25 +4549,25 @@ msgid "" " 02110-1301, USA.\n" msgstr "" -#: src/ui/gui/psppire.glade:87 src/ui/gui/psppire.glade:170 -#: src/ui/gui/weight-cases-dialog.c:87 +#: src/ui/gui/psppire.glade:89 src/ui/gui/psppire.glade:191 +#: src/ui/gui/weight-cases-dialog.c:99 msgid "Do not weight cases" msgstr "" -#: src/ui/gui/psppire.glade:96 +#: src/ui/gui/psppire.glade:98 msgid "Weight cases by" msgstr "" -#: src/ui/gui/psppire.glade:125 +#: src/ui/gui/psppire.glade:144 #, fuzzy msgid "Frequency Variable" msgstr "Variableansicht" -#: src/ui/gui/psppire.glade:163 +#: src/ui/gui/psppire.glade:184 msgid "Current Status: " msgstr "" -#: src/ui/gui/psppire-var-select.c:260 src/ui/gui/sort-cases-dialog.c:339 +#: src/ui/gui/psppire-var-select.c:271 src/ui/gui/sort-cases-dialog.c:339 msgid "Var" msgstr "" @@ -4565,12 +4597,12 @@ msgstr "" msgid "Save Syntax" msgstr "Speichern unter" -#: src/ui/gui/syntax-editor.c:135 src/ui/gui/syntax-editor.c:538 +#: src/ui/gui/syntax-editor.c:135 src/ui/gui/syntax-editor.c:525 #, fuzzy msgid "Syntax Files (*.sps) " msgstr "Systemedatein (*.sav)" -#: src/ui/gui/syntax-editor.c:530 +#: src/ui/gui/syntax-editor.c:517 msgid "Open Syntax" msgstr "" @@ -4647,22 +4679,22 @@ msgstr "Ordinalwert" msgid "Scale" msgstr "Skalwert" -#: src/ui/gui/window-manager.c:111 +#: src/ui/gui/window-manager.c:131 #, fuzzy, c-format msgid "Syntax%d" msgstr "Speichern unter" -#: src/ui/gui/window-manager.c:112 src/ui/gui/window-manager.c:140 +#: src/ui/gui/window-manager.c:132 src/ui/gui/window-manager.c:160 #, fuzzy, c-format msgid "%s --- PSPP Syntax Editor" msgstr "PSPP Dateiaufbereiter" -#: src/ui/gui/window-manager.c:115 +#: src/ui/gui/window-manager.c:135 #, fuzzy, c-format msgid "Untitled%d" msgstr "Unbetitelt" -#: src/ui/gui/window-manager.c:116 src/ui/gui/window-manager.c:143 +#: src/ui/gui/window-manager.c:136 src/ui/gui/window-manager.c:163 #, fuzzy, c-format msgid "%s --- PSPP Data Editor" msgstr "PSPP Dateiaufbereiter" diff --git a/po/pspp.pot b/po/pspp.pot index b8febd4b..16c50d2f 100644 --- a/po/pspp.pot +++ b/po/pspp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-01-03 18:41+0900\n" +"POT-Creation-Date: 2007-01-20 08:53+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -175,42 +175,42 @@ msgstr "" msgid "Month number %f is not between 1 and 12." msgstr "" -#: src/data/dictionary.c:721 +#: src/data/dictionary.c:710 msgid "" "At least one case in the data file had a weight value that was user-missing, " "system-missing, zero, or negative. These case(s) were ignored." msgstr "" -#: src/data/dictionary.c:1206 +#: src/data/dictionary.c:1219 msgid "Variable suffix too large." msgstr "" -#: src/data/fastfile.c:535 +#: src/data/fastfile.c:540 #, c-format msgid "%s: Removing temporary file: %s." msgstr "" -#: src/data/fastfile.c:659 +#: src/data/fastfile.c:664 #, c-format msgid "Error writing temporary file: %s." msgstr "" -#: src/data/fastfile.c:687 +#: src/data/fastfile.c:692 #, c-format msgid "%s: Opening temporary file: %s." msgstr "" -#: src/data/fastfile.c:731 +#: src/data/fastfile.c:736 #, c-format msgid "%s: Seeking temporary file: %s." msgstr "" -#: src/data/fastfile.c:753 +#: src/data/fastfile.c:758 #, c-format msgid "%s: Reading temporary file: %s." msgstr "" -#: src/data/fastfile.c:756 +#: src/data/fastfile.c:761 #, c-format msgid "%s: Temporary file ended unexpectedly." msgstr "" @@ -308,13 +308,13 @@ msgid "%s variables are not compatible with %s format %s." msgstr "" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1084 +#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1086 #: src/ui/gui/psppire-var-store.c:482 msgid "String" msgstr "" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:980 +#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:982 #: src/ui/gui/psppire-var-store.c:475 msgid "Numeric" msgstr "" @@ -1159,17 +1159,17 @@ msgstr "" msgid "expecting COMM or TAPE" msgstr "" -#: src/language/data-io/get.c:349 src/language/data-io/get.c:363 -#: src/language/data-io/get.c:388 +#: src/language/data-io/get.c:348 src/language/data-io/get.c:362 +#: src/language/data-io/get.c:387 #, c-format msgid "expecting %s or %s" msgstr "" -#: src/language/data-io/get.c:593 src/language/data-io/print.c:177 +#: src/language/data-io/get.c:592 src/language/data-io/print.c:177 msgid "expecting a valid subcommand" msgstr "" -#: src/language/data-io/get.c:626 +#: src/language/data-io/get.c:625 #, c-format msgid "" "Cannot rename %s as %s because there already exists a variable named %s. To " @@ -1177,75 +1177,75 @@ msgid "" "as \"/RENAME (A=B)(B=C)(C=A)\", or equivalently, \"/RENAME (A B C=B C A)\"." msgstr "" -#: src/language/data-io/get.c:652 +#: src/language/data-io/get.c:651 msgid "`=' expected after variable list." msgstr "" -#: src/language/data-io/get.c:659 +#: src/language/data-io/get.c:658 #, c-format msgid "" "Number of variables on left side of `=' (%d) does not match number of " "variables on right side (%d), in parenthesized group %d of RENAME subcommand." msgstr "" -#: src/language/data-io/get.c:672 +#: src/language/data-io/get.c:671 #, c-format msgid "Requested renaming duplicates variable name %s." msgstr "" -#: src/language/data-io/get.c:702 +#: src/language/data-io/get.c:701 msgid "Cannot DROP all variables from dictionary." msgstr "" -#: src/language/data-io/get.c:879 +#: src/language/data-io/get.c:878 msgid "The active file may not be specified more than once." msgstr "" -#: src/language/data-io/get.c:887 +#: src/language/data-io/get.c:886 msgid "Cannot specify the active file since no active file has been defined." msgstr "" -#: src/language/data-io/get.c:894 +#: src/language/data-io/get.c:893 msgid "" "MATCH FILES may not be used after TEMPORARY when the active file is an input " "source. Temporary transformations will be made permanent." msgstr "" -#: src/language/data-io/get.c:931 +#: src/language/data-io/get.c:930 msgid "Multiple IN subcommands for a single FILE or TABLE." msgstr "" -#: src/language/data-io/get.c:951 +#: src/language/data-io/get.c:950 msgid "BY may appear at most once." msgstr "" -#: src/language/data-io/get.c:972 +#: src/language/data-io/get.c:971 #, c-format msgid "File %s lacks BY variable %s." msgstr "" -#: src/language/data-io/get.c:986 +#: src/language/data-io/get.c:985 msgid "FIRST may appear at most once." msgstr "" -#: src/language/data-io/get.c:1000 +#: src/language/data-io/get.c:999 msgid "LAST may appear at most once." msgstr "" -#: src/language/data-io/get.c:1041 +#: src/language/data-io/get.c:1040 msgid "BY is required when TABLE is specified." msgstr "" -#: src/language/data-io/get.c:1046 +#: src/language/data-io/get.c:1045 msgid "BY is required when IN is specified." msgstr "" -#: src/language/data-io/get.c:1075 +#: src/language/data-io/get.c:1074 #, c-format msgid "IN variable name %s duplicates an existing variable name." msgstr "" -#: src/language/data-io/get.c:1484 +#: src/language/data-io/get.c:1482 #, c-format msgid "" "Variable %s in file %s (%s) has different type or width from the same " @@ -2254,8 +2254,8 @@ msgstr "" msgid "Group2" msgstr "" -#: src/language/stats/binomial.c:208 src/language/stats/chisquare.c:236 -#: src/language/stats/chisquare.c:296 src/language/stats/crosstabs.q:825 +#: src/language/stats/binomial.c:208 src/language/stats/chisquare.c:237 +#: src/language/stats/chisquare.c:297 src/language/stats/crosstabs.q:825 #: src/language/stats/crosstabs.q:1025 src/language/stats/crosstabs.q:1748 #: src/language/stats/examine.q:909 src/language/stats/frequencies.q:1222 #: src/language/stats/oneway.q:306 src/language/stats/oneway.q:470 @@ -2263,7 +2263,7 @@ msgstr "" msgid "Total" msgstr "" -#: src/language/stats/binomial.c:253 src/language/stats/chisquare.c:259 +#: src/language/stats/binomial.c:253 src/language/stats/chisquare.c:260 #: src/language/stats/crosstabs.q:1143 src/language/stats/crosstabs.q:1184 msgid "Category" msgstr "" @@ -2289,46 +2289,46 @@ msgstr "" msgid "Exact Sig. (%d-tailed)" msgstr "" -#: src/language/stats/chisquare.c:208 +#: src/language/stats/chisquare.c:209 #, c-format msgid "" "CHISQUARE test specified %d expected values, but %d distinct values were " "encountered in variable %s." msgstr "" -#: src/language/stats/chisquare.c:220 src/language/stats/chisquare.c:260 +#: src/language/stats/chisquare.c:221 src/language/stats/chisquare.c:261 msgid "Observed N" msgstr "" -#: src/language/stats/chisquare.c:221 src/language/stats/chisquare.c:261 +#: src/language/stats/chisquare.c:222 src/language/stats/chisquare.c:262 msgid "Expected N" msgstr "" -#: src/language/stats/chisquare.c:222 src/language/stats/chisquare.c:262 +#: src/language/stats/chisquare.c:223 src/language/stats/chisquare.c:263 #: src/language/stats/regression.q:313 msgid "Residual" msgstr "" -#: src/language/stats/chisquare.c:255 +#: src/language/stats/chisquare.c:256 msgid "Frequencies" msgstr "" -#: src/language/stats/chisquare.c:309 +#: src/language/stats/chisquare.c:310 msgid "Test Statistics" msgstr "" -#: src/language/stats/chisquare.c:323 +#: src/language/stats/chisquare.c:324 msgid "Chi-Square" msgstr "" -#: src/language/stats/chisquare.c:324 src/language/stats/crosstabs.q:1119 +#: src/language/stats/chisquare.c:325 src/language/stats/crosstabs.q:1119 #: src/language/stats/oneway.q:279 src/language/stats/oneway.q:680 #: src/language/stats/regression.q:307 src/language/stats/t-test.q:981 #: src/language/stats/t-test.q:1173 src/language/stats/t-test.q:1266 msgid "df" msgstr "" -#: src/language/stats/chisquare.c:325 +#: src/language/stats/chisquare.c:326 msgid "Asymp. Sig." msgstr "" @@ -3121,45 +3121,45 @@ msgstr "" msgid "Does not assume equal" msgstr "" -#: src/language/stats/rank.q:223 +#: src/language/stats/rank.q:221 #, c-format msgid "%s of %s by %s" msgstr "" -#: src/language/stats/rank.q:228 +#: src/language/stats/rank.q:226 #, c-format msgid "%s of %s" msgstr "" -#: src/language/stats/rank.q:725 +#: src/language/stats/rank.q:726 msgid "Cannot create new rank variable. All candidates in use." msgstr "" -#: src/language/stats/rank.q:820 +#: src/language/stats/rank.q:819 msgid "Variables Created By RANK" msgstr "" -#: src/language/stats/rank.q:844 +#: src/language/stats/rank.q:843 #, c-format msgid "%s into %s(%s of %s using %s BY %s)" msgstr "" -#: src/language/stats/rank.q:855 +#: src/language/stats/rank.q:854 #, c-format msgid "%s into %s(%s of %s BY %s)" msgstr "" -#: src/language/stats/rank.q:869 +#: src/language/stats/rank.q:868 #, c-format msgid "%s into %s(%s of %s using %s)" msgstr "" -#: src/language/stats/rank.q:879 +#: src/language/stats/rank.q:878 #, c-format msgid "%s into %s(%s of %s)" msgstr "" -#: src/language/stats/rank.q:892 +#: src/language/stats/rank.q:891 msgid "" "FRACTION has been specified, but NORMAL and PROPORTION rank functions have " "not been requested. The FRACTION subcommand will be ignored." @@ -4097,32 +4097,57 @@ msgstr "" msgid "Style of bevel around the custom entry button" msgstr "" -#: src/ui/gui/data-editor.c:391 src/ui/gui/data-editor.glade:428 +#: src/ui/gui/data-editor.c:154 +msgid "Weights" +msgstr "" + +#: src/ui/gui/data-editor.c:155 +msgid "Weight cases by variable" +msgstr "" + +#: src/ui/gui/data-editor.c:423 src/ui/gui/data-editor.glade:428 msgid "Open" msgstr "" -#: src/ui/gui/data-editor.c:399 +#: src/ui/gui/data-editor.c:431 msgid "System Files (*.sav)" msgstr "" -#: src/ui/gui/data-editor.c:405 +#: src/ui/gui/data-editor.c:437 msgid "Portable Files (*.por) " msgstr "" -#: src/ui/gui/data-editor.c:411 src/ui/gui/syntax-editor.c:141 -#: src/ui/gui/syntax-editor.c:544 +#: src/ui/gui/data-editor.c:443 src/ui/gui/syntax-editor.c:141 +#: src/ui/gui/syntax-editor.c:531 msgid "All Files" msgstr "" -#: src/ui/gui/data-editor.c:487 +#: src/ui/gui/data-editor.c:519 msgid "Font Selection" msgstr "" -#: src/ui/gui/data-editor.c:663 +#: src/ui/gui/data-editor.c:697 +msgid "No Split" +msgstr "" + +#: src/ui/gui/data-editor.c:705 +msgid "Split by " +msgstr "" + +#: src/ui/gui/data-editor.c:730 +msgid "Filter off" +msgstr "" + +#: src/ui/gui/data-editor.c:743 +#, c-format +msgid "Filter by %s" +msgstr "" + +#: src/ui/gui/data-editor.c:761 msgid "Weights off" msgstr "" -#: src/ui/gui/data-editor.c:676 +#: src/ui/gui/data-editor.c:774 #, c-format msgid "Weight by %s" msgstr "" @@ -4179,7 +4204,7 @@ msgid "Grid Lines" msgstr "" #: src/ui/gui/data-editor.glade:223 src/ui/gui/data-editor.glade:633 -#: src/ui/gui/data-editor.glade:1343 src/ui/gui/data-editor.glade:1521 +#: src/ui/gui/data-editor.glade:1345 src/ui/gui/data-editor.glade:1523 msgid "Value Labels" msgstr "" @@ -4200,11 +4225,11 @@ msgid "Insert Cases" msgstr "" #: src/ui/gui/data-editor.glade:279 src/ui/gui/data-editor.glade:502 -#: src/ui/gui/data-editor.glade:1891 +#: src/ui/gui/data-editor.glade:1893 msgid "Go To Case" msgstr "" -#: src/ui/gui/data-editor.glade:294 src/ui/gui/data-editor.glade:1956 +#: src/ui/gui/data-editor.glade:294 src/ui/gui/data-editor.glade:1958 msgid "Sort Cases" msgstr "" @@ -4312,123 +4337,123 @@ msgstr "" msgid "Filter Use Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:904 +#: src/ui/gui/data-editor.glade:905 msgid "Weight Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:930 +#: src/ui/gui/data-editor.glade:931 msgid "Split File Status Area" msgstr "" -#: src/ui/gui/data-editor.glade:959 +#: src/ui/gui/data-editor.glade:961 msgid "Variable Type" msgstr "" -#: src/ui/gui/data-editor.glade:994 src/ui/gui/psppire-var-store.c:476 +#: src/ui/gui/data-editor.glade:996 src/ui/gui/psppire-var-store.c:476 msgid "Comma" msgstr "" -#: src/ui/gui/data-editor.glade:1009 src/ui/gui/psppire-var-store.c:477 +#: src/ui/gui/data-editor.glade:1011 src/ui/gui/psppire-var-store.c:477 msgid "Dot" msgstr "" -#: src/ui/gui/data-editor.glade:1024 +#: src/ui/gui/data-editor.glade:1026 msgid "Scientific notation" msgstr "" -#: src/ui/gui/data-editor.glade:1039 src/ui/gui/psppire-var-store.c:479 +#: src/ui/gui/data-editor.glade:1041 src/ui/gui/psppire-var-store.c:479 msgid "Date" msgstr "" -#: src/ui/gui/data-editor.glade:1054 src/ui/gui/psppire-var-store.c:480 +#: src/ui/gui/data-editor.glade:1056 src/ui/gui/psppire-var-store.c:480 msgid "Dollar" msgstr "" -#: src/ui/gui/data-editor.glade:1069 +#: src/ui/gui/data-editor.glade:1071 msgid "Custom currency" msgstr "" -#: src/ui/gui/data-editor.glade:1161 +#: src/ui/gui/data-editor.glade:1163 msgid "positive" msgstr "" -#: src/ui/gui/data-editor.glade:1167 +#: src/ui/gui/data-editor.glade:1169 msgid "negative" msgstr "" -#: src/ui/gui/data-editor.glade:1180 +#: src/ui/gui/data-editor.glade:1182 msgid "Sample" msgstr "" -#: src/ui/gui/data-editor.glade:1230 +#: src/ui/gui/data-editor.glade:1232 msgid "Width:" msgstr "" -#: src/ui/gui/data-editor.glade:1274 +#: src/ui/gui/data-editor.glade:1276 msgid "Decimal Places:" msgstr "" -#: src/ui/gui/data-editor.glade:1441 +#: src/ui/gui/data-editor.glade:1443 msgid "Value Label:" msgstr "" -#: src/ui/gui/data-editor.glade:1454 +#: src/ui/gui/data-editor.glade:1456 msgid "Value:" msgstr "" -#: src/ui/gui/data-editor.glade:1587 +#: src/ui/gui/data-editor.glade:1589 msgid "Missing Values" msgstr "" -#: src/ui/gui/data-editor.glade:1605 +#: src/ui/gui/data-editor.glade:1607 msgid "_Range plus one optional discrete missing value" msgstr "" -#: src/ui/gui/data-editor.glade:1629 +#: src/ui/gui/data-editor.glade:1631 msgid "_Low:" msgstr "" -#: src/ui/gui/data-editor.glade:1658 +#: src/ui/gui/data-editor.glade:1660 msgid "_High:" msgstr "" -#: src/ui/gui/data-editor.glade:1699 +#: src/ui/gui/data-editor.glade:1701 msgid "Di_screte value:" msgstr "" -#: src/ui/gui/data-editor.glade:1746 +#: src/ui/gui/data-editor.glade:1748 msgid "_No missing values" msgstr "" -#: src/ui/gui/data-editor.glade:1763 +#: src/ui/gui/data-editor.glade:1765 msgid "_Discrete missing values" msgstr "" -#: src/ui/gui/data-editor.glade:1908 +#: src/ui/gui/data-editor.glade:1910 msgid "Case Number:" msgstr "" -#: src/ui/gui/data-editor.glade:2017 +#: src/ui/gui/data-editor.glade:2019 msgid "Sort by:" msgstr "" -#: src/ui/gui/data-editor.glade:2066 src/ui/gui/sort-cases-dialog.c:279 +#: src/ui/gui/data-editor.glade:2068 src/ui/gui/sort-cases-dialog.c:279 msgid "Ascending" msgstr "" -#: src/ui/gui/data-editor.glade:2079 src/ui/gui/sort-cases-dialog.c:281 +#: src/ui/gui/data-editor.glade:2081 src/ui/gui/sort-cases-dialog.c:281 msgid "Descending" msgstr "" -#: src/ui/gui/data-editor.glade:2095 +#: src/ui/gui/data-editor.glade:2097 msgid "Sort Order" msgstr "" -#: src/ui/gui/helper.c:105 +#: src/ui/gui/helper.c:113 msgid "Sorry. The help system hasn't yet been implemented." msgstr "" -#: src/ui/gui/helper.c:128 +#: src/ui/gui/helper.c:136 #, c-format msgid "Cannot open reference manual: %s" msgstr "" @@ -4468,11 +4493,15 @@ msgstr "" msgid "Incorrect range specification" msgstr "" -#: src/ui/gui/psppire-data-store.c:743 +#: src/ui/gui/psppire-buttonbox.c:128 +msgid "_Paste" +msgstr "" + +#: src/ui/gui/psppire-data-store.c:750 msgid "var" msgstr "" -#: src/ui/gui/psppire-data-store.c:824 src/ui/gui/psppire-var-store.c:552 +#: src/ui/gui/psppire-data-store.c:831 src/ui/gui/psppire-var-store.c:552 #: src/ui/gui/psppire-var-store.c:562 src/ui/gui/psppire-var-store.c:572 #: src/ui/gui/psppire-var-store.c:770 #, c-format @@ -4501,24 +4530,24 @@ msgid "" " 02110-1301, USA.\n" msgstr "" -#: src/ui/gui/psppire.glade:87 src/ui/gui/psppire.glade:170 -#: src/ui/gui/weight-cases-dialog.c:87 +#: src/ui/gui/psppire.glade:89 src/ui/gui/psppire.glade:191 +#: src/ui/gui/weight-cases-dialog.c:99 msgid "Do not weight cases" msgstr "" -#: src/ui/gui/psppire.glade:96 +#: src/ui/gui/psppire.glade:98 msgid "Weight cases by" msgstr "" -#: src/ui/gui/psppire.glade:125 +#: src/ui/gui/psppire.glade:144 msgid "Frequency Variable" msgstr "" -#: src/ui/gui/psppire.glade:163 +#: src/ui/gui/psppire.glade:184 msgid "Current Status: " msgstr "" -#: src/ui/gui/psppire-var-select.c:260 src/ui/gui/sort-cases-dialog.c:339 +#: src/ui/gui/psppire-var-select.c:271 src/ui/gui/sort-cases-dialog.c:339 msgid "Var" msgstr "" @@ -4547,11 +4576,11 @@ msgstr "" msgid "Save Syntax" msgstr "" -#: src/ui/gui/syntax-editor.c:135 src/ui/gui/syntax-editor.c:538 +#: src/ui/gui/syntax-editor.c:135 src/ui/gui/syntax-editor.c:525 msgid "Syntax Files (*.sps) " msgstr "" -#: src/ui/gui/syntax-editor.c:530 +#: src/ui/gui/syntax-editor.c:517 msgid "Open Syntax" msgstr "" @@ -4627,22 +4656,22 @@ msgstr "" msgid "Scale" msgstr "" -#: src/ui/gui/window-manager.c:111 +#: src/ui/gui/window-manager.c:131 #, c-format msgid "Syntax%d" msgstr "" -#: src/ui/gui/window-manager.c:112 src/ui/gui/window-manager.c:140 +#: src/ui/gui/window-manager.c:132 src/ui/gui/window-manager.c:160 #, c-format msgid "%s --- PSPP Syntax Editor" msgstr "" -#: src/ui/gui/window-manager.c:115 +#: src/ui/gui/window-manager.c:135 #, c-format msgid "Untitled%d" msgstr "" -#: src/ui/gui/window-manager.c:116 src/ui/gui/window-manager.c:143 +#: src/ui/gui/window-manager.c:136 src/ui/gui/window-manager.c:163 #, c-format msgid "%s --- PSPP Data Editor" msgstr "" diff --git a/src/language/automake.mk b/src/language/automake.mk index 21a78a7f..bfd97140 100644 --- a/src/language/automake.mk +++ b/src/language/automake.mk @@ -15,6 +15,8 @@ noinst_LIBRARIES += src/language/liblanguage.a src_language_liblanguage_a_SOURCES = \ src/language/syntax-file.c \ src/language/syntax-file.h \ + src/language/syntax-string-source.c \ + src/language/syntax-string-source.h \ src/language/prompt.c \ src/language/prompt.h \ src/language/command.c \ diff --git a/src/ui/gui/data-editor.c b/src/ui/gui/data-editor.c index 077dff5b..262ae543 100644 --- a/src/ui/gui/data-editor.c +++ b/src/ui/gui/data-editor.c @@ -37,6 +37,7 @@ #include "data-editor.h" #include "syntax-editor.h" +#include #include "window-manager.h" #include "psppire-data-store.h" @@ -348,8 +349,6 @@ click2column (GtkWidget *w, gint col, gpointer data) } - - void new_data_window (GtkMenuItem *menuitem, gpointer parent) { @@ -701,12 +700,6 @@ on_split_change (PsppireDict *dict, gpointer data) { gint i; GString *text; - GtkSheet *var_sheet = - GTK_SHEET (get_widget_assert (de->xml, "variable_sheet")); - - PsppireVarStore *vs = PSPPIRE_VAR_STORE - (gtk_sheet_get_model (var_sheet) ); - struct variable *const * split_vars = dict_get_split_vars (dict->dict); text = g_string_new (_("Split by ")); @@ -786,7 +779,6 @@ on_weight_change (GObject *o, gint weight_index, gpointer data) } } - static void weight_cases_dialog (GObject *o, gpointer data) { @@ -816,20 +808,58 @@ weight_cases_dialog (GObject *o, gpointer data) g_object_unref (xml); - if (response == GTK_RESPONSE_OK) + switch (response) { + case GTK_RESPONSE_OK: + { + struct getl_interface *sss ; const GList *list = psppire_var_select_get_variables (select); - g_assert ( g_list_length (list) <= 1 ); + g_assert ( g_list_length ((GList *)list) <= 1 ); if ( list == NULL) - psppire_dict_set_weight_variable (select->dict, NULL); + { + sss = create_syntax_string_source ("WEIGHT OFF."); + } else { struct variable *var = list->data; - psppire_dict_set_weight_variable (select->dict, var); + sss = create_syntax_string_source ("WEIGHT BY %s.\n", + var_get_name (var)); + } + + execute_syntax (sss); } + break; + case PSPPIRE_RESPONSE_PASTE: + { + struct syntax_editor *se = (struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL); + + const GList *list = psppire_var_select_get_variables (select); + + g_assert ( g_list_length ((GList *)list) <= 1 ); + + if ( list == NULL) + { + gtk_text_buffer_insert_at_cursor (se->buffer, "WEIGHT OFF.", -1); + } + else + { + struct variable *var = list->data; + + gchar *text = g_strdup_printf ("WEIGHT BY %s.", + var_get_name (var)); + + gtk_text_buffer_insert_at_cursor (se->buffer, + text, -1); + + g_free (text); + } + } + break; + default: + break; } } diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 7deb4cbb..4d88c81b 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -1,3 +1,6 @@ +/* This file is a rubbish bin where stuff gets put when it doesn't seem to + belong anywhere else. +*/ #include #include @@ -5,6 +8,7 @@ #include "message-dialog.h" #include #include +#include #include #include @@ -13,6 +17,10 @@ #include #include +#include +#include +#include + #include @@ -129,3 +137,36 @@ reference_manual (GtkMenuItem *menu, gpointer data) } g_clear_error (&err); } + + +extern struct dataset *the_dataset; +extern struct source_stream *the_source_stream; + +void +execute_syntax (struct getl_interface *sss) +{ + struct lexer *lexer; + g_return_if_fail (proc_has_source (the_dataset)); + + lexer = lex_create (the_source_stream); + + getl_append_source (the_source_stream, sss); + + for (;;) + { + const struct dictionary *dict = dataset_dict (the_dataset); + + int result = cmd_parse (lexer, the_dataset, + dict_get_var_cnt (dict) > 0 ? + CMD_STATE_DATA : CMD_STATE_INITIAL); + + if (result == CMD_EOF || result == CMD_FINISH) + break; + } + + getl_abort_noninteractive (the_source_stream); + + lex_destroy (lexer); +} + + diff --git a/src/ui/gui/helper.h b/src/ui/gui/helper.h index 7bf84d47..f5e0f5b0 100644 --- a/src/ui/gui/helper.h +++ b/src/ui/gui/helper.h @@ -45,5 +45,8 @@ void connect_help (GladeXML *); void reference_manual (GtkMenuItem *, gpointer); +struct getl_interface; +void execute_syntax (struct getl_interface *sss); + #endif diff --git a/src/ui/gui/psppire-buttonbox.c b/src/ui/gui/psppire-buttonbox.c index bab2b528..bfa10c94 100644 --- a/src/ui/gui/psppire-buttonbox.c +++ b/src/ui/gui/psppire-buttonbox.c @@ -24,6 +24,12 @@ #include "psppire-buttonbox.h" #include "psppire-dialog.h" +#include + +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + + static void psppire_buttonbox_class_init (PsppireButtonBoxClass *); static void psppire_buttonbox_init (PsppireButtonBox *); @@ -55,9 +61,6 @@ psppire_button_box_get_type (void) return buttonbox_type; } -static GObjectClass *parent_class = NULL; - - static void psppire_buttonbox_class_init (PsppireButtonBoxClass *class) { @@ -88,6 +91,19 @@ ok_button_clicked (GtkWidget *w, gpointer data) } +static void +paste_button_clicked (GtkWidget *w, gpointer data) +{ + PsppireDialog *dialog; + + dialog = PSPPIRE_DIALOG (gtk_widget_get_toplevel (w)); + + dialog->response = PSPPIRE_RESPONSE_PASTE; + + psppire_dialog_close (dialog); +} + + static void refresh_clicked (GtkWidget *w, gpointer data) { @@ -109,6 +125,12 @@ psppire_buttonbox_init (PsppireButtonBox *buttonbox) g_signal_connect (button, "clicked", G_CALLBACK (ok_button_clicked), NULL); gtk_widget_show (button); + button = gtk_button_new_with_mnemonic (_("_Paste")); + g_signal_connect (button, "clicked", G_CALLBACK (paste_button_clicked), + NULL); + gtk_box_pack_start_defaults (GTK_BOX (buttonbox), button); + gtk_widget_show (button); + button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); g_signal_connect (button, "clicked", G_CALLBACK (close_dialog), NULL); gtk_box_pack_start_defaults (GTK_BOX (buttonbox), button); @@ -123,7 +145,7 @@ psppire_buttonbox_init (PsppireButtonBox *buttonbox) gtk_box_pack_start_defaults (GTK_BOX (buttonbox), button); gtk_widget_show (button); - gtk_widget_show (buttonbox); + gtk_widget_show (GTK_WIDGET (buttonbox)); } diff --git a/src/ui/gui/psppire-buttonbox.h b/src/ui/gui/psppire-buttonbox.h index 3e589c85..b9d8ea34 100644 --- a/src/ui/gui/psppire-buttonbox.h +++ b/src/ui/gui/psppire-buttonbox.h @@ -6,7 +6,6 @@ #include #include - G_BEGIN_DECLS #define PSPPIRE_BUTTONBOX_TYPE (psppire_button_box_get_type ()) diff --git a/src/ui/gui/psppire-dialog.h b/src/ui/gui/psppire-dialog.h index 94c6c3db..2748c96b 100644 --- a/src/ui/gui/psppire-dialog.h +++ b/src/ui/gui/psppire-dialog.h @@ -6,6 +6,8 @@ #include #include +#define PSPPIRE_RESPONSE_PASTE 1 + G_BEGIN_DECLS diff --git a/src/ui/gui/psppire-dict.c b/src/ui/gui/psppire-dict.c index 40ddf501..b4503125 100644 --- a/src/ui/gui/psppire-dict.c +++ b/src/ui/gui/psppire-dict.c @@ -684,14 +684,6 @@ psppire_dict_rename_var (PsppireDict *dict, struct variable *v, } -void -psppire_dict_set_weight_variable (PsppireDict *dict, struct variable *v) -{ - g_return_if_fail (v == NULL || var_is_numeric (v)); - dict_set_weight (dict->dict, v); -} - - struct variable * psppire_dict_get_weight_variable (const PsppireDict *dict) { diff --git a/src/ui/gui/psppire-dict.h b/src/ui/gui/psppire-dict.h index bcf31da3..42a13c63 100644 --- a/src/ui/gui/psppire-dict.h +++ b/src/ui/gui/psppire-dict.h @@ -104,7 +104,6 @@ void psppire_dict_rename_var (PsppireDict *dict, struct variable *v, void psppire_dict_replace_dictionary (PsppireDict *, struct dictionary *); -void psppire_dict_set_weight_variable (PsppireDict *, struct variable *); struct variable * psppire_dict_get_weight_variable (const PsppireDict *); diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index b99f2896..529f9880 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -265,5 +265,3 @@ create_icon_factory (void) gtk_icon_factory_add_default (factory); } - - diff --git a/src/ui/gui/syntax-editor-source.c b/src/ui/gui/syntax-editor-source.c index 86054147..c6d8668c 100644 --- a/src/ui/gui/syntax-editor-source.c +++ b/src/ui/gui/syntax-editor-source.c @@ -79,10 +79,8 @@ read_line_from_buffer (struct getl_interface *i, if ( gtk_text_iter_compare (&ses->i, &ses->end) >= 0) return false; - gtk_text_buffer_get_iter_at_line ( ses->se->buffer, - &next_line, - 1 + gtk_text_iter_get_line (&ses->i) - ); + next_line = ses->i; + gtk_text_iter_forward_line (&next_line); text = gtk_text_buffer_get_text (ses->se->buffer, &ses->i, &next_line, diff --git a/src/ui/gui/syntax-editor.c b/src/ui/gui/syntax-editor.c index af6175f6..469ee4f6 100644 --- a/src/ui/gui/syntax-editor.c +++ b/src/ui/gui/syntax-editor.c @@ -212,24 +212,10 @@ on_quit (GtkMenuItem *menuitem, gpointer user_data) } static void -execute_syntax (const struct syntax_editor *se, GtkTextIter start, +editor_execute_syntax (const struct syntax_editor *se, GtkTextIter start, GtkTextIter stop) { - g_return_if_fail (proc_has_source (the_dataset)); - - getl_append_source (the_source_stream, - create_syntax_editor_source (se, start, stop)); - for (;;) - { - const struct dictionary *dict = dataset_dict (the_dataset); - int result = cmd_parse (se->lexer, the_dataset, - dict_get_var_cnt (dict) > 0 ? - CMD_STATE_DATA : CMD_STATE_INITIAL); - if (result == CMD_EOF || result == CMD_FINISH) - break; - } - - getl_abort_noninteractive (the_source_stream); + execute_syntax (create_syntax_editor_source (se, start, stop)); } /* Parse and execute all the text in the buffer */ @@ -239,11 +225,10 @@ on_run_all (GtkMenuItem *menuitem, gpointer user_data) GtkTextIter begin, end; struct syntax_editor *se = user_data; - gtk_text_buffer_get_iter_at_line (se->buffer, &begin, 0); - gtk_text_buffer_get_iter_at_line (se->buffer, &end, -1); - + gtk_text_buffer_get_iter_at_offset (se->buffer, &begin, 0); + gtk_text_buffer_get_iter_at_offset (se->buffer, &end, -1); - execute_syntax (se, begin, end); + editor_execute_syntax (se, begin, end); } /* Parse and execute the currently selected text */ @@ -254,7 +239,7 @@ on_run_selection (GtkMenuItem *menuitem, gpointer user_data) struct syntax_editor *se = user_data; if ( gtk_text_buffer_get_selection_bounds (se->buffer, &begin, &end) ) - execute_syntax (se, begin, end); + editor_execute_syntax (se, begin, end); } @@ -281,7 +266,7 @@ on_run_current_line (GtkMenuItem *menuitem, gpointer user_data) gtk_text_buffer_get_iter_at_line (se->buffer, &begin, line); gtk_text_buffer_get_iter_at_line (se->buffer, &end, line + 1); - execute_syntax (se, begin, end); + editor_execute_syntax (se, begin, end); } @@ -310,7 +295,7 @@ on_run_to_end (GtkMenuItem *menuitem, gpointer user_data) gtk_text_buffer_get_iter_at_line (se->buffer, &begin, line); gtk_text_buffer_get_iter_at_line (se->buffer, &end, -1); - execute_syntax (se, begin, end); + editor_execute_syntax (se, begin, end); } diff --git a/src/ui/gui/window-manager.c b/src/ui/gui/window-manager.c index 51fc95a9..a4f5064d 100644 --- a/src/ui/gui/window-manager.c +++ b/src/ui/gui/window-manager.c @@ -105,7 +105,7 @@ window_create (enum window_type type, const gchar *name) register_window (e); - gtk_widget_show (e->window); + gtk_widget_show (GTK_WIDGET (e->window)); return e; } diff --git a/tests/automake.mk b/tests/automake.mk index c682bbd2..c83dd6e3 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -158,7 +158,7 @@ tests_libpspp_heap_test_SOURCES = \ src/libpspp/pool.c \ src/libpspp/pool.h \ tests/libpspp/heap-test.c -tests_libpspp_heap_test_LDADD = gl/libgl.la +tests_libpspp_heap_test_LDADD = gl/libgl.la @LIBINTL@ tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_formats_inexactify_SOURCES = tests/formats/inexactify.c